From bc196b4df375b2e877165b1692cd702d672cb0fe Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Tue, 4 Aug 2009 09:43:53 +0000 Subject: BUG: fix install_clib failure on win32. When the compiler is customized in build_clib, install_clib did not reuse it, but created a new instance. Instead, we use the build_clib compiler if already instanciated. --- numpy/distutils/command/install_clib.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'numpy/distutils/command') diff --git a/numpy/distutils/command/install_clib.py b/numpy/distutils/command/install_clib.py index 8b8561bb2..cef6c7db4 100644 --- a/numpy/distutils/command/install_clib.py +++ b/numpy/distutils/command/install_clib.py @@ -16,11 +16,15 @@ class install_clib(Command): self.set_undefined_options('install', ('install_lib', 'install_dir')) def run (self): - # We need the compiler to get the library name -> filename association - compiler = new_compiler(compiler=None) - compiler.customize(self.distribution) + build_clib_cmd = get_cmd("build_clib") + build_dir = build_clib_cmd.build_clib - build_dir = get_cmd("build_clib").build_clib + # We need the compiler to get the library name -> filename association + if not build_clib_cmd.compiler: + compiler = new_compiler(compiler=None) + compiler.customize(self.distribution) + else: + compiler = build_clib.compiler for l in self.distribution.installed_libraries: target_dir = os.path.join(self.install_dir, l.target_dir) -- cgit v1.2.1