diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-05-04 06:18:21 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-05-04 06:33:10 -0600 |
commit | 8bc4d4588fbd2111fae0bc5e47c3662f6e48aee5 (patch) | |
tree | 2e179caf45f5b5e770e0503e63a92fa000689945 /numpy/distutils/command/install.py | |
parent | a0cf18394d5ce33514fdc37093bd2f65ad4b0dde (diff) | |
download | numpy-8bc4d4588fbd2111fae0bc5e47c3662f6e48aee5.tar.gz |
BUG: Fix use of setuptools.command.install._install.
This private variable has disappeared in later versions of setuptools.
In older versions of setuptools it is the same as
distutils.command.install.install, so use that instead.
Closes #4664.
Diffstat (limited to 'numpy/distutils/command/install.py')
-rw-r--r-- | numpy/distutils/command/install.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/distutils/command/install.py b/numpy/distutils/command/install.py index 2da21542f..a1dd47755 100644 --- a/numpy/distutils/command/install.py +++ b/numpy/distutils/command/install.py @@ -7,9 +7,10 @@ if 'setuptools' in sys.modules: else: import distutils.command.install as old_install_mod have_setuptools = False -old_install = old_install_mod.install from distutils.file_util import write_file +old_install = old_install_mod.install + class install(old_install): # Always run install_clib - the command is cheap, so no need to bypass it; @@ -28,9 +29,11 @@ class install(old_install): We must pull in the entire code so we can override the level used in the _getframe() call since we wrap this call by one more level. """ + from distutils.command.install import install as distutils_install + # Explicit request for old-style install? Just do it if self.old_and_unmanageable or self.single_version_externally_managed: - return old_install_mod._install.run(self) + return distutils_install.run(self) # Attempt to detect whether we were called from setup() or by another # command. If we were called by setup(), our caller will be the @@ -48,7 +51,7 @@ class install(old_install): # We weren't called from the command line or setup(), so we # should run in backward-compatibility mode to support bdist_* # commands. - old_install_mod._install.run(self) + distutils_install.run(self) else: self.do_egg_install() |