[Scons-users] Doing a build time Glob()

Pico Geyer picogeyer at gmail.com
Thu Nov 28 04:04:52 EST 2013


Hi all.

I'm trying to build an external project (Python) by calling configure/make
from scons and then Install() a subset of that projects files into my own
directory.

I'm not having trouble with build part of the project, however the Install
part goes wrong.
I naively started with something like this:
env.Install('mydir/python/lib/python2.7',
Glob('python_install_dir/lib/python2.7/*.py'))

This of course doesn't work because the Glob() gets run at the SConscript
reading and at that stage the desired files don't exist yet (My
dependencies are setup correctly to build python before trying to install
the files)
If I run my install target twice however, the files will exist and then be
installed correctly.
It's be very clumsy to tell the users of the build to run the install
target twice, so I need a better solution.

I don't suppose there's any built in way to run the Glob at build time,
when the files will exist?

My only idea at this stage is to create my own builder that uses a python
function to list and copy the files.

I'm just wondering if someone else knows of a better solution?

Best regards,
Pico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131128/812517f3/attachment.html


More information about the Scons-users mailing list