diff options
| -rw-r--r-- | distribute.egg-info/entry_points.txt | 2 | ||||
| -rwxr-xr-x | setuptools/sandbox.py | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d..9fd41758 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index c2f14e7f..37fc60af 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -157,13 +157,16 @@ if hasattr(os, 'devnull'): else: _EXCEPTIONS = [] -if not sys.version < '2.5': - try: - gen_py = os.path.dirname(__import__('win32com.gen_py', - fromlist=['__name__']).__file__) - _EXCEPTIONS.append(gen_py) - except ImportError: - pass +try: + win32com_pkg = os.path.dirname(__import__('win32com').__file__) + gen_py_pkg = os.path.join(win32com_pkg, 'gen_py') + _EXCEPTIONS.append(gen_py_pkg) +except ImportError: + # it appears pywin32 is not installed, so no need to exclude. + pass +except AttributeError: + # unexpected error getting __file__ from win32com + pass class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" |
