[Scons-users] sconsign db access -- different results from python cmdline and scons
Jay Damask
jaydamask at gmail.com
Mon Jun 3 15:50:15 EDT 2013
Hello,
This is a second email related to sconsign.
$ uname -a
Linux wdac-nyk-lx01 3.5.0-25-generic #39-Ubuntu SMP Mon Feb 25 18:26:58 UTC
2013 x86_64 x86_64 x86_64 GNU/Linux
$ scons --version
SCons by Steven Knight et al.:
script: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
engine: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
I find different behavior accessing the SConsign api depending on whether I
use the python command line or put the same code in a custom.py file and
call it from scons.
# $ python
>>> import SCons, SCons.Script, SCons.Node
>>> d_rel_src =
SCons.Script.Dir('#src/build_comm_lib/communications/protocol_buffers')
>>> d_rel_src.sconsign().entries
returns a dictionary of entries where the keys are filenames and the values
are SConsignEntry objects. This result matches the .sconsign.dblite file.
Now, instead when I put the line
print
SCons.Script.Dir('#src/build_comm_lib/communications/protocol_buffers').sconsign().entries
in some custom.py file that scons ends up calling, I can a blank
dictionary. I have played around with all path variations I can think of,
no dice. I can step through the code w/ scons --debug=pdb and get the same
result still.
Is it clear why I'm getting different results? How can I achieve the
behavior of the python cmdline in a custom.py script run by scons?
Thank you,
-Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130603/1fbaf816/attachment.htm
More information about the Scons-users
mailing list