summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kern <robert.kern@gmail.com>2007-08-08 22:31:50 +0000
committerRobert Kern <robert.kern@gmail.com>2007-08-08 22:31:50 +0000
commit5da18aa76edac59ce485ff9bc03620b76118ddeb (patch)
tree29f807d75a1b9125f2878afb15dbbc20455e3af8
parentad48c03011ce4395cf8e8c7d38f54bc418830774 (diff)
downloadnumpy-5da18aa76edac59ce485ff9bc03620b76118ddeb.tar.gz
Optionally use setuptools for commands that setuptools customizes.
-rw-r--r--numpy/distutils/command/bdist_rpm.py5
-rw-r--r--numpy/distutils/command/sdist.py7
2 files changed, 10 insertions, 2 deletions
diff --git a/numpy/distutils/command/bdist_rpm.py b/numpy/distutils/command/bdist_rpm.py
index 593dfe878..60e9b5752 100644
--- a/numpy/distutils/command/bdist_rpm.py
+++ b/numpy/distutils/command/bdist_rpm.py
@@ -1,6 +1,9 @@
import os
import sys
-from distutils.command.bdist_rpm import bdist_rpm as old_bdist_rpm
+if 'setuptools' in sys.modules:
+ from setuptools.command.bdist_rpm import bdist_rpm as old_bdist_rpm
+else:
+ from distutils.command.bdist_rpm import bdist_rpm as old_bdist_rpm
class bdist_rpm(old_bdist_rpm):
diff --git a/numpy/distutils/command/sdist.py b/numpy/distutils/command/sdist.py
index 9134fed53..62fce9574 100644
--- a/numpy/distutils/command/sdist.py
+++ b/numpy/distutils/command/sdist.py
@@ -1,4 +1,9 @@
-from distutils.command.sdist import sdist as old_sdist
+import sys
+if 'setuptools' in sys.modules:
+ from setuptools.command.sdist import sdist as old_sdist
+else:
+ from distutils.command.sdist import sdist as old_sdist
+
from numpy.distutils.misc_util import get_data_files
class sdist(old_sdist):