diff options
author | Han Genuit <hangenuit@gmail.com> | 2012-02-21 16:24:58 +0100 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-04-15 11:26:00 -0600 |
commit | c17738ac4093377a991a7d221349f8de6e06c690 (patch) | |
tree | ca2cc638dd0680b18441ebf2d5a698fb9946e70f | |
parent | b0b4afcbf2883e40ddee7a60348caf0736612260 (diff) | |
download | numpy-c17738ac4093377a991a7d221349f8de6e06c690.tar.gz |
BUG: Find only platform-specific dlls in winsxs directory.
-rw-r--r-- | numpy/distutils/mingw32ccompiler.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py index b3aa96e6b..5b9aa3356 100644 --- a/numpy/distutils/mingw32ccompiler.py +++ b/numpy/distutils/mingw32ccompiler.py @@ -250,6 +250,7 @@ def find_python_dll(): # - in system32, # - ortherwise (Sxs), I don't know how to get it. lib_dirs = [] + lib_dirs.append(sys.prefix) lib_dirs.append(os.path.join(sys.prefix, 'lib')) try: lib_dirs.append(os.path.join(os.environ['SYSTEMROOT'], 'system32')) @@ -302,13 +303,16 @@ def generate_def(dll, dfile): def find_dll(dll_name): + arch = {'AMD64' : 'amd64', + 'Intel' : 'x86'}[get_build_architecture()] + def _find_dll_in_winsxs(dll_name): # Walk through the WinSxS directory to find the dll. winsxs_path = os.path.join(os.environ['WINDIR'], 'winsxs') if not os.path.exists(winsxs_path): return None for root, dirs, files in os.walk(winsxs_path): - if dll_name in files: + if dll_name in files and arch in root: return os.path.join(root, dll_name) return None |