[Scons-users] Getting directory in which Sconscript is running

William Blevins wblevins001 at gmail.com
Thu May 1 11:59:59 EDT 2014


See scons 2.3.1 user guide 14.3 for more.
On May 1, 2014 11:55 AM, "William Blevins" <wblevins001 at gmail.com> wrote:


> The '#' symbol always refers to the SConstruct dir, so you can refer as

> '#A' join 'B' and files stay relative to the root src dir.

>

> V/R,

> William

> On May 1, 2014 11:48 AM, "Tom Tanner (BLOOMBERG/ LONDON)" <

> ttanner2 at bloomberg.net> wrote:

>

>> I'd really like to be able to get hold of the current SConscript

>> directory relative to the SConstruct path, so with a directory structure in

>> a repository a little like this:

>>

>> +-SConstruct

>> |

>> +-A

>> |

>> +-B

>> |

>> +-SConscript

>>

>> There will be something I can do in the SConscript that will get me "A/B"

>> (i.e. the relative directory in which things will be built), and <wherever

>> the source is>/A/B, which is the sort of thing I need to stuff in

>> environment variable (for instance for getting the right PYTHONPATH for

>> running python scripts which live in a subdirectory of B).

>>

>> Using Dir('.').rstr() or .rdir() will get you '.'. Throwing

>> srcdir().abspath into the mix will get me the full path to the build

>> directory, not the full path to the source directory.

>>

>>

>>

>> -------------------------------------------------------------------------------

>>

>> _______________________________________________

>> 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/20140501/cc8b8c27/attachment.html


More information about the Scons-users mailing list