--- a/src/ldt/distribute_setup.py Mon Apr 18 18:34:49 2011 +0200
+++ b/src/ldt/distribute_setup.py Wed Apr 20 00:55:58 2011 +0200
@@ -13,13 +13,13 @@
This file can also be run as a script to install or upgrade setuptools.
"""
+from distutils import log
+import fnmatch
import os
import sys
-import time
-import fnmatch
+import tarfile
import tempfile
-import tarfile
-from distutils import log
+import time
try:
from site import USER_SITE
@@ -144,7 +144,7 @@
except ImportError:
return _do_download(version, download_base, to_dir, download_delay)
try:
- pkg_resources.require("distribute>="+version)
+ pkg_resources.require("distribute>=" + version)
return
except pkg_resources.VersionConflict:
e = sys.exc_info()[1]
@@ -222,7 +222,7 @@
return function(*args, **kw)
finally:
if patched:
- DirectorySandbox._violation = DirectorySandbox._old
+ DirectorySandbox._violation = DirectorySandbox._old #@UndefinedVariable
del DirectorySandbox._old
return __no_sandbox
@@ -351,7 +351,7 @@
def _under_prefix(location):
if 'install' not in sys.argv:
return True
- args = sys.argv[sys.argv.index('install')+1:]
+ args = sys.argv[sys.argv.index('install') + 1:]
for index, arg in enumerate(args):
for option in ('--root', '--prefix'):
if arg.startswith('%s=' % option):
@@ -359,7 +359,7 @@
return location.startswith(top_dir)
elif arg == option:
if len(args) > index:
- top_dir = args[index+1]
+ top_dir = args[index + 1]
return location.startswith(top_dir)
if arg == '--user' and USER_SITE is not None:
return location.startswith(USER_SITE)