From 91d942a9da18b77b8a0652bc5f07f2e129b8504e Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 8 Nov 2017 19:25:42 -0800 Subject: 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 Maintainer: Gabe Black --- site_scons/site_init.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'site_scons/site_init.py') 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 -- cgit v1.2.3