[Scons-users] download builder - tips
    Philipp Kraus 
    philipp.kraus at flashpixx.de
       
    Sat Apr  6 20:21:00 EDT 2013
    
    
  
Am 07.04.2013 um 01:59 schrieb William Deegan:
> Phil,
> 
> Sorry my mistake, I thought you were pointing at the whole project.
no problem, I don't want to create for each script dir an own repo, it is a little bit overkill :-)
> Looks like the problem is that you are adding directories to the list of targets in your Unpack emitter.
> Directories depend on their contents by default, so I believe that's what's causing your issue.
> 
> If you add:
>     target = [x for x in target if not x.endswith('/')]
> 
> Before your:
>    return target,source
> in your __emitter.
> 
> The problem should go away.
thanks, great, works fine, but imho it must be x.endswith(os.path.sep), mustn't it
for correct path seperator names?
Phil
> 
> On Apr 6, 2013, at 4:20 PM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:
> 
>> Hi Bill,
>> 
>> all files are there and they reproduce the problem ! I don't see your problem.
>> You can download all files with a git clone or on top of the repo you can also use a Zip download https://github.com/flashpixx/Storage
>> In the subdir "Scons" all data is stored.
>> 
>> Scons / SConstruct is the test build script stored and Scons / site_scons / site_tools all builds are stored. So you need only download the
>> zip, and run scons in the Scons directory
>> 
>> Do you see any problem?
>> 
>> Phil
>>  
>> 
>> 
>> Am 07.04.2013 um 01:12 schrieb Bill Deegan:
>> 
>>> Phil,
>>> 
>>> I'm asking for a minimal system to reproduce the problem.
>>> I don't want to download and debug your entire build.
>>> 
>>> You should be able to reproduce it with just a few files.
>>> 
>>> -Bill
>>> 
>>> 
>>> On Sat, Apr 6, 2013 at 4:04 PM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:
>>> 
>>> Am 07.04.2013 um 00:19 schrieb William Deegan:
>>> 
>>>> Philk
>>>> On Apr 6, 2013, at 2:43 PM, Philipp Kraus <philipp.kraus at flashpixx.de> wrote:
>>>> 
>>>>> On 2013-04-06 02:41:22 +0200, Philipp Kraus said:
>>>>> 
>>>>>> thanks to Dirk and Bill for some nice email. I would like to replace my "dirty hacked Scons script" to a little more general code structure and would like to send them into the Scons community.
>>>>>> I'm primary writing C/C++ code and uses Scons on OSX, Linux, Windows (MSVC & MinGW) for the building process.
>>>>>> Often there exists on my C/C++ project the problem, that the project uses a lot of different libraries eg LAPack, Boost, Dune-FEM .... and these libs must be compiled for the project, so I use Scons for
>>>>>> this building process most with a lot of env.Command code and some hacked builders. With a little time, I have forked out my first "hacked builder" to a more "Scons-Way-Builder".
>>>>>> It is a little short builder, which downloads any URL data into a file. I have pushed the builder in my repo ( https://github.com/flashpixx/Storage/blob/master/Scons/site_scons/site_tools/URLDownload.py )
>>>>>> and a test Sconstruct under https://github.com/flashpixx/Storage/blob/master/Scons/SConstruct
>>>>>> This builder replaces the target on default with the filename of the URL, the env setting URLDOWNLOAD_USEURLFILENAME (true | false) can be enabled / disabled this target replacing
>>>>>> The next forked builders will be an Unpacking builder with flexible tool use (eg 7-Zip under Windows, tar / gzip / bzip under *nix) and a external builder for compiling extracted sources with cmake, MSVC ...
>>>>> 
>>>>> I need a little help, because I get on my builders a cyclic dependency on cleaning or on the second run. If I have got a "clean" directory, everything works fine, the download builder creates
>>>>> the downloaded file and my unpack builder ( https://github.com/flashpixx/Storage/blob/master/Scons/site_scons/site_tools/Unpack.py ) is run and creates the correct extracting file list.
>>>>> If I run after the first run, without cleaning the builder script again, I get an error of the unpack builder that there exists a cyclic depency, an equal error is shown up, if I run "scons -c".
>>>>> 
>>>>> If I replace in the Unpack.py the line 280 (     return target, source ) to  'return "test", source' the error does not occure, so imho the problem exists in the emitter. The unpack builder returns a list of files & directories in an archive and the download builder get the file. So I hope, that I can download, extract and compile the sources in one short step. (The unpack builder works at the moment with *nix systems, Windows calls are not implementated yet)
>>>> 
>>>> Can you paste the output you're getting and any more information?
>>>> Also what would be great is either a simple SConstruct which demonstrates the issue, or a zip file with minimal amount of files/logic which demonstrates the issue.
>>>> 
>>>> The more info, the easier it is to help you!
>>> 
>>> I have post the links to all files, you can download the full code with an example SConstruct: https://github.com/flashpixx/Storage/tree/master/Scons
>>> 
>>> 
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> http://four.pairlist.net/mailman/listinfo/scons-users
>>> 
>>> 
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> http://four.pairlist.net/mailman/listinfo/scons-users
>> 
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> http://four.pairlist.net/mailman/listinfo/scons-users
> 
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130407/471e5f38/attachment.htm>
    
    
More information about the Scons-users
mailing list