diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2014-02-11 10:43:21 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-02-11 10:43:21 -0500 |
| commit | 4104aa38286858dd73eca1da6da25f2c8a170f1a (patch) | |
| tree | 502c29be9bcabc7a9bb0bb1d45491f7e29d34c53 | |
| parent | 191f5a01dc9bdace571fa8474f4bd50743b65994 (diff) | |
| download | python-setuptools-git-4104aa38286858dd73eca1da6da25f2c8a170f1a.tar.gz | |
Delint site-patch
| -rw-r--r-- | setuptools/site-patch.py | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/setuptools/site-patch.py b/setuptools/site-patch.py index a7166f14..c2168019 100644 --- a/setuptools/site-patch.py +++ b/setuptools/site-patch.py @@ -1,5 +1,6 @@ def __boot(): - import sys, os, os.path + import sys + import os PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): PYTHONPATH = [] @@ -49,13 +50,13 @@ def __boot(): addsitedir(item) sys.__egginsert += oldpos # restore effective old position - - d,nd = makepath(stdpath[0]) + + d, nd = makepath(stdpath[0]) insert_at = None new_path = [] for item in sys.path: - p,np = makepath(item) + p, np = makepath(item) if np==nd and insert_at is None: # We've hit the first 'system' path entry, so added entries go here @@ -67,17 +68,9 @@ def __boot(): # new path after the insert point, back-insert it new_path.insert(insert_at, item) insert_at += 1 - + sys.path[:] = new_path -if __name__=='site': +if __name__=='site': __boot() del __boot - - - - - - - - |
