From f531cfb60fd0e4dec69354bfd61109defa99ea5e Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Sat, 20 Dec 2008 17:32:33 +0000 Subject: Remove handling of MS_WIN64 in commands: deal with it in mingw tool only. --- numpy/distutils/command/build_ext.py | 8 -------- numpy/distutils/mingw32ccompiler.py | 5 +++++ 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'numpy') diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py index 8d26718d0..904cb9067 100644 --- a/numpy/distutils/command/build_ext.py +++ b/numpy/distutils/command/build_ext.py @@ -278,14 +278,6 @@ class build_ext (old_build_ext): c_sources += cxx_sources cxx_sources = [] - # MS_WIN64 should be defined when building for amd64 on windows, but - # python headers define it only for MS compilers, which has all kind of - # bad consequences, like using Py_ModuleInit4 instead of - # Py_ModuleInit4_64, etc... So we add it here - if self.compiler.compiler_type == 'mingw32' and \ - get_build_architecture() == 'AMD64': - macros.append(('MS_WIN64', None)) - # Set Fortran/C++ compilers for compilation and linking. if ext.language=='f90': fcompiler = self._f90_compiler diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py index 74984b5a4..15da9471b 100644 --- a/numpy/distutils/mingw32ccompiler.py +++ b/numpy/distutils/mingw32ccompiler.py @@ -93,6 +93,11 @@ class Mingw32CCompiler(distutils.cygwinccompiler.CygwinCCompiler): # linker_exe='gcc -mno-cygwin', # linker_so='%s --driver-name g++ -mno-cygwin -mdll -static %s' # % (self.linker, entry_point)) + + # MS_WIN64 should be defined when building for amd64 on windows, but + # python headers define it only for MS compilers, which has all kind of + # bad consequences, like using Py_ModuleInit4 instead of + # Py_ModuleInit4_64, etc... So we add it here if get_build_architecture() == 'AMD64': self.set_executables( compiler='gcc -DMS_WIN64 -mno-cygwin -O0 -Wall', -- cgit v1.2.1