summaryrefslogtreecommitdiff
path: root/numpy/distutils/mingw32ccompiler.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-12-19 09:32:46 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-12-19 09:32:46 +0000
commitaa1424960fe5779fe8a11499a7112315b7216ac8 (patch)
treefd7eaab0fd31a041776e9ff8f462d53f6d683dae /numpy/distutils/mingw32ccompiler.py
parent34028c1445f5b9124ac52e4fb5434240658d3df3 (diff)
downloadnumpy-aa1424960fe5779fe8a11499a7112315b7216ac8.tar.gz
Actually build the import library for mingw on amd64.
Diffstat (limited to 'numpy/distutils/mingw32ccompiler.py')
-rw-r--r--numpy/distutils/mingw32ccompiler.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py
index ddcce9c06..b95e9e020 100644
--- a/numpy/distutils/mingw32ccompiler.py
+++ b/numpy/distutils/mingw32ccompiler.py
@@ -268,9 +268,21 @@ def build_import_library():
raise ValueError("Unhandled arch %s" % arch)
def _build_import_library_amd64():
+ dll_file = find_python_dll()
+
out_name = "libpython%d%d.a" % tuple(sys.version_info[:2])
out_file = os.path.join(sys.prefix, 'libs', out_name)
- log.info('Building import library (arch=AMD64): "%s"' % (out_file))
+
+ def_name = "python%d%d.def" % tuple(sys.version_info[:2])
+ def_file = os.path.join(sys.prefix,'libs',def_name)
+
+ log.info('Building import library (arch=AMD64): "%s" (from %s)' \
+ % (out_file, dll_file))
+
+ generate_def(dll_file, def_file)
+
+ cmd = ['dlltool', '-d', def_file, '-l', out_file]
+ subprocess.Popen(cmd)
def _build_import_library_x86():
""" Build the import libraries for Mingw32-gcc on Windows