diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-04-04 08:32:28 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-04-04 08:32:28 -0400 |
| commit | 48b63f309650af9e43368cf0d6792ea247ad8663 (patch) | |
| tree | 1c9bbeda525f231bd671c9e9f7ea3c3eedcb5854 /setuptools/sandbox.py | |
| parent | 1bf92e3a3cc1e246b1ecc05c63287bb177939efa (diff) | |
| parent | 9803058dc72867605bdac20d41249c00e8eae415 (diff) | |
| download | python-setuptools-git-48b63f309650af9e43368cf0d6792ea247ad8663.tar.gz | |
Merge with master
Diffstat (limited to 'setuptools/sandbox.py')
| -rwxr-xr-x | setuptools/sandbox.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 85de85ff..23e296b1 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -8,6 +8,9 @@ import re import contextlib import pickle +from setuptools.extern import six +from setuptools.extern.six.moves import builtins, map + import pkg_resources if sys.platform.startswith('java'): @@ -22,9 +25,6 @@ _open = open from distutils.errors import DistutilsError from pkg_resources import working_set -from setuptools import compat -from setuptools.compat import builtins - __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", ] @@ -138,7 +138,7 @@ class ExceptionSaver: return type, exc = map(pickle.loads, self._saved) - compat.reraise(type, exc, self._tb) + six.reraise(type, exc, self._tb) @contextlib.contextmanager @@ -207,8 +207,12 @@ def _needs_hiding(mod_name): True >>> _needs_hiding('distutils') True + >>> _needs_hiding('os') + False + >>> _needs_hiding('Cython') + True """ - pattern = re.compile('(setuptools|pkg_resources|distutils)(\.|$)') + pattern = re.compile('(setuptools|pkg_resources|distutils|Cython)(\.|$)') return bool(pattern.match(mod_name)) |
