From 061593383225fea8a8d2cec48e79e10887ee60a2 Mon Sep 17 00:00:00 2001 From: calvin Date: Thu, 5 Jun 2008 07:14:13 +0000 Subject: [PATCH] Improve sys.path handling git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3785 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- setup.py | 3 ++- test.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a8ff20e8..f13bb8a1 100755 --- a/setup.py +++ b/setup.py @@ -220,11 +220,12 @@ class MyBdistWininst (bdist_wininst, object): # avoid warning of 'install_lib' about installing # into a directory not in sys.path + oldpath = sys.path sys.path.insert(0, os.path.join(self.bdist_dir, 'PURELIB')) install.run() - del sys.path[0] + sys.path = oldpath # And make an archive relative to the root of the # pseudo-installation tree. diff --git a/test.py b/test.py index 57021c32..ed5b2ec1 100755 --- a/test.py +++ b/test.py @@ -850,7 +850,7 @@ def main(argv): cfg.print_import_time = False # Set up the python path - sys.path[0] = cfg.basedir + sys.path.insert(0, cfg.basedir) # Set up tracing before we start importing things tracer = None