summaryrefslogtreecommitdiff
path: root/numpy/distutils/command
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2009-11-12 20:55:40 +0000
committerPauli Virtanen <pav@iki.fi>2009-11-12 20:55:40 +0000
commit3122ee546fc0617e195aeb288abe65b9ae95d983 (patch)
tree718428188769a83c5716f029ad464356b44cb7ae /numpy/distutils/command
parentafbe79aee518504547014c9c657e9ac1098ab6b4 (diff)
downloadnumpy-3122ee546fc0617e195aeb288abe65b9ae95d983.tar.gz
BUG: setuptools does not run install_clib automatically -- run it manually in install_data, if setuptools is present (fix #1194)
Diffstat (limited to 'numpy/distutils/command')
-rw-r--r--numpy/distutils/command/install.py7
-rw-r--r--numpy/distutils/command/install_data.py11
2 files changed, 16 insertions, 2 deletions
diff --git a/numpy/distutils/command/install.py b/numpy/distutils/command/install.py
index 099ad5c16..ad3cc507d 100644
--- a/numpy/distutils/command/install.py
+++ b/numpy/distutils/command/install.py
@@ -10,8 +10,11 @@ from distutils.file_util import write_file
class install(old_install):
- # Always run install_clib - the command is cheap, so no need to bypass it
- sub_commands = old_install.sub_commands + [('install_clib', lambda x: True)]
+ # Always run install_clib - the command is cheap, so no need to bypass it;
+ # but it's not run by setuptools -- so it's run again in install_data
+ sub_commands = old_install.sub_commands + [
+ ('install_clib', lambda x: True)
+ ]
def finalize_options (self):
old_install.finalize_options(self)
diff --git a/numpy/distutils/command/install_data.py b/numpy/distutils/command/install_data.py
index b72737f85..0a2e68ae1 100644
--- a/numpy/distutils/command/install_data.py
+++ b/numpy/distutils/command/install_data.py
@@ -1,3 +1,6 @@
+import sys
+have_setuptools = ('setuptools' in sys.modules)
+
from distutils.command.install_data import install_data as old_install_data
#data installer with improved intelligence over distutils
@@ -5,6 +8,14 @@ from distutils.command.install_data import install_data as old_install_data
#of willy-nilly
class install_data (old_install_data):
+ def run(self):
+ old_install_data.run(self)
+
+ if have_setuptools:
+ # Run install_clib again, since setuptools does not run sub-commands
+ # of install automatically
+ self.run_command('install_clib')
+
def finalize_options (self):
self.set_undefined_options('install',
('install_lib', 'install_dir'),