diff options
author | marscher <m.scherer@fu-berlin.de> | 2015-11-18 14:18:09 +0100 |
---|---|---|
committer | marscher <m.scherer@fu-berlin.de> | 2015-11-18 14:18:09 +0100 |
commit | 67ad531efa3ed80bad0dee39e6ee238c010a1382 (patch) | |
tree | acdc88dedd6e6bd73c0f64d1c63e57f6e55d3ea3 | |
parent | 210ecc62b02d594c1e6bcba4a2bd8fd48c124315 (diff) | |
download | cython-67ad531efa3ed80bad0dee39e6ee238c010a1382.tar.gz |
do not import setuptools
-rw-r--r-- | Cython/Build/Dependencies.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py index 2a826ac85..d10fd1462 100644 --- a/Cython/Build/Dependencies.py +++ b/Cython/Build/Dependencies.py @@ -644,9 +644,9 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet= module_metadata = {} # workaround for setuptools - try: - from setuptools.extension import Extension as Extension_setuptools - except ImportError: + if 'setuptools' in sys.modules: + Extension_setuptools = sys.modules['setuptools'].Extension + else: # dummy class, in case we do not have setuptools class Extension_setuptools(Extension): pass |