[Scons-users] Importing Module That is a Build Product

Keith F Prussing kprussing74 at gmail.com
Fri Sep 16 09:21:01 EDT 2016


On 2016-09-15, Fred Wright wrote:
>
>I think the real issue here is something different:  Although SCons adds
>SConstruct's directory to sys.path prior to running it, it undoes that
>change prior to running the builders, which means that the script
>directory isn't included in the module search path during the latter
>phase.  I'm not sure what the rationale is for the "undo" but it's
>certainly a source of trouble. :-)

Ah, I didn't realize that the current directory was removed from the 
module search path after the initial parsing phase.  That would 
definitely explain why I was able to import modules at parse time but 
not this generated module.  I has simply assumed that the search path 
was the same as in a regular Python session.

Keith

-- 
Keith F Prussing


More information about the Scons-users mailing list