diff options
author | cookedm <cookedm@localhost> | 2006-06-28 19:05:48 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-06-28 19:05:48 +0000 |
commit | d5a14e423b8ef4dce76d377d95b41e1665fa2945 (patch) | |
tree | 1d436e1e19ceeb73cbdf11056a292a0bdc9a8f45 /numpy/distutils/core.py | |
parent | 59ae2e878fa70c47e7df5b948934aafb26ddd022 (diff) | |
download | numpy-d5a14e423b8ef4dce76d377d95b41e1665fa2945.tar.gz |
Don't import setuptools by default, but do use it if it has been imported.
The setupegg.py script can be used instead of setup.py to use setuptools.
Diffstat (limited to 'numpy/distutils/core.py')
-rw-r--r-- | numpy/distutils/core.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/numpy/distutils/core.py b/numpy/distutils/core.py index 1dd8c509f..9da40d439 100644 --- a/numpy/distutils/core.py +++ b/numpy/distutils/core.py @@ -1,16 +1,15 @@ import sys from distutils.core import * -try: + +if 'setuptools' in sys.modules: + have_setuptools = True from setuptools import setup as old_setup - # very old setuptools don't have this - from setuptools.command import bdist_egg # easy_install imports math, it may be picked up from cwd from setuptools.command import develop, easy_install - have_setuptools = 1 -except ImportError: +else: from distutils.core import setup as old_setup - have_setuptools = 0 + have_setuptools = False from numpy.distutils.extension import Extension from numpy.distutils.command import config |