Mehdi
Mehdi

Reputation: 113

How to change default scons site_dir path?

I have a directory called it site_scons which I keep my custom python files for path enviroment, function definitions, dictionary overwrites and flags for my target build. However, I have to put this directory either in my $HOME/.scons or in my local project to have scons find it. Otherwise I have to use --site-dir to let scons know where the custom path of these python files are when for example using them by env.Tool("posix2").

Does anyone know how I can set the default to my custom path so I don't use --site-dir every time I run scons?

Upvotes: 0

Views: 992

Answers (1)

Hai Vu
Hai Vu

Reputation: 40733

How about using the SCONSFLAGS environment variable? See reference here:

http://scons.org/doc/production/HTML/scons-user.html#idm140113665470208

export SCONSFLAGS="--site-dir=/path/to/dir"

Also, You might want to edit the environment variable SCONS_LIB_DIR to point to your directory:

export SCONS_LIB_DIR=/path/to/dir

Upvotes: 2

Related Questions