[Bf-committers] SCons convoluted for installing files,

Campbell Barton ideasman42 at gmail.com
Sat Oct 22 02:51:14 CEST 2011


On Sat, Oct 22, 2011 at 5:11 AM, Lars Krueger <lars_e_krueger at gmx.de> wrote:
> 1. Are you really sure the code snippets handle the file names identically? Is it a fair comparison? The scons file seems to handle _svn folders, while cmake doesn't (explicitly). The scons file has the ability to handle multiple paths, although only one is used, etc. In general, scons "takes things literally" and does not handle platform dependencies implicitely (_svn vs. .svn). I think that was a conscious design decision.

I think is is a fair comparison, they are not exactly the same, but
not in any important way from what I can tell.

Ignoring _svn is not common, I found its because of a windows only
ASP.NET workaround,
http://svn.apache.org/repos/asf/subversion/trunk/notes/asp-dot-net-hack.txt

When searching for this quite a few links pointed to blender's SCons
files and I didn't find other projects using it.

Nevertheless we could have 'PATTERN _svn EXCLUDE' in cmake too, my
point is  that walking the filesystem is overkill when you want to
recursively copy a directory and ignore some files.


> 2. scons allows multiple installs:
>  env.Install( whereTo, list-of-where-froms)
>
> How about a class that abstracts these platform-issues (e.g. filter the not-to-be-installed files) so that you only have to walk the source tree and call the respective method of the instance of the platform class.
>
> If you have multiple places where stuff like this appears, make a function.

Yep, this would be good, I'm not especially fussed if its a class or a
function, some functionality CopyDir(from, to, exclude) should be
used, though I'd have expected scons could already do this.
>From searching I found discussions about scons glob vs python glob vs
own hand written glob... but its hard to get an idea of whats normal
in this case.
>From looking over the docs I can't see anything close.
http://www.scons.org/doc/production/HTML/scons-user.html

> 3. I don't know enough about Macs, but why do you need to call "cp" yourself? env.Install should do that.

It shouldn't, its quite strange that it does this, at a guess it could
be because of how scons sets up OSX app bundle.

>
> -------- Original-Nachricht --------
>> Datum: Fri, 21 Oct 2011 20:18:55 +1100
>> Von: Campbell Barton <ideasman42 at gmail.com>
>> An: bf-blender developers <bf-committers at blender.org>
>> Betreff: [Bf-committers] SCons convoluted for installing files,
>
>> Today I moved some files from a different place and found scons to be
>> more complicated then seems reasonable (and took a while to update for
>> the changed locations).
>>
>> Comparison - copying "release/scripts/" for scons/cmake:
>>
>> http://wiki.blender.org/index.php/User:Ideasman42/SConsNotSimpleInstallingFiles
>>
>> Surely SCons has better facilities to copy a directory?
>>
>> --
>> - Campbell
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
> --
> Dr. Lars Krueger
>
>
> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
- Campbell


More information about the Bf-committers mailing list