diff options
author | Gabe Black <gabeblack@google.com> | 2017-11-08 19:25:42 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-11-10 13:17:15 +0000 |
commit | 91d942a9da18b77b8a0652bc5f07f2e129b8504e (patch) | |
tree | a882b3c8f2ad7c37aab747429621ff12432d4312 /site_scons/site_init.py | |
parent | 902b3e34beaadaa2ac2932a9ff93f08008a4b16f (diff) | |
download | gem5-91d942a9da18b77b8a0652bc5f07f2e129b8504e.tar.xz |
scons: Move python path management out of the SConstruct.
Make site_init.py manage sys.path, and the "default" tool set
PYTHONPATH on any environment that's created. The paths to add are
tracked in a common gem5_python_paths.py.
Change-Id: I3387d4394d47a2f9c83322644cfd05909c6890fa
Reviewed-on: https://gem5-review.googlesource.com/5564
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'site_scons/site_init.py')
-rw-r--r-- | site_scons/site_init.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/site_scons/site_init.py b/site_scons/site_init.py index 505fe6acb..6d9d24d30 100644 --- a/site_scons/site_init.py +++ b/site_scons/site_init.py @@ -38,6 +38,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from gem5_python_paths import extra_python_paths + # Check for recent-enough Python and SCons versions. try: # Really old versions of scons only take two options for the @@ -66,3 +68,5 @@ For more details, see: http://gem5.org/wiki/index.php/Using_a_non-default_Python_installation """ raise + +sys.path[1:1] = extra_python_paths |