Improve sys.path handling

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3785 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2008-06-05 07:14:13 +00:00
parent e8a4744643
commit 0615933832
2 changed files with 3 additions and 2 deletions

View file

@ -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.

View file

@ -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