numpy: Missed bits, remove _POSIX_BUILD
It is a dependency back to our Python changes that makes our NumPy changes less palatable from an upstreaming perspective. Really, we want to know if Python has been built with GCC, and that is exactly what 'GCC' in sys.version determines.
This commit is contained in:
@@ -1,52 +1,52 @@
|
||||
--- numpy-py2-1.10.0/numpy/distutils/mingw32ccompiler.py 2014-02-19 01:07:43.787600000 +0400
|
||||
+++ numpy-1.10.0/numpy/distutils/mingw32ccompiler.py 2014-02-19 01:26:21.634200000 +0400
|
||||
@@ -91,30 +91,6 @@
|
||||
stdout=subprocess.PIPE)
|
||||
out_string = p.stdout.read()
|
||||
p.stdout.close()
|
||||
-
|
||||
- # Before build with MinGW-W64 generate the python import library
|
||||
- # with gendef and dlltool according to the MingW-W64 FAQ.
|
||||
- # Use the MinGW-W64 provided msvc runtime import libraries.
|
||||
- # Don't call build_import_library() and build_msvcr_library.
|
||||
-
|
||||
- if 'MinGW-W64' not in str(out_string):
|
||||
-
|
||||
- # **changes: eric jones 4/11/01
|
||||
- # 1. Check for import library on Windows. Build if it doesn't
|
||||
- # exist.
|
||||
- build_import_library()
|
||||
-
|
||||
- # Check for custom msvc runtime library on Windows. Build if it
|
||||
- # doesn't exist.
|
||||
- msvcr_success = build_msvcr_library()
|
||||
- msvcr_dbg_success = build_msvcr_library(debug=True)
|
||||
- if msvcr_success or msvcr_dbg_success:
|
||||
- # add preprocessor statement for using customized msvcr lib
|
||||
- self.define_macro('NPY_MINGW_USE_CUSTOM_MSVCR')
|
||||
diff -urN numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py numpy-1.10.2/numpy/distutils/mingw32ccompiler.py
|
||||
--- numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py 2015-11-12 20:04:51.000000000 +0000
|
||||
+++ numpy-1.10.2/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:35:27.818684200 +0000
|
||||
@@ -87,21 +87,23 @@
|
||||
elif self.linker_dll == 'gcc':
|
||||
self.linker = 'g++'
|
||||
|
||||
- # **changes: eric jones 4/11/01
|
||||
- # 1. Check for import library on Windows. Build if it doesn't exist.
|
||||
+ if not 'GCC' in sys.version:
|
||||
|
||||
- build_import_library()
|
||||
+ # **changes: eric jones 4/11/01
|
||||
+ # 1. Check for import library on Windows. Build if it doesn't exist.
|
||||
|
||||
- # Check for custom msvc runtime library on Windows. Build if it doesn't exist.
|
||||
- msvcr_success = build_msvcr_library()
|
||||
- msvcr_dbg_success = build_msvcr_library(debug=True)
|
||||
- if msvcr_success or msvcr_dbg_success:
|
||||
- # add preprocessor statement for using customized msvcr lib
|
||||
- self.define_macro('NPY_MINGW_USE_CUSTOM_MSVCR')
|
||||
-
|
||||
- # Define the MSVC version as hint for MinGW
|
||||
- msvcr_version = '0x%03i0' % int(msvc_runtime_library().lstrip('msvcr'))
|
||||
- self.define_macro('__MSVCRT_VERSION__', msvcr_version)
|
||||
+ build_import_library()
|
||||
+
|
||||
+ # Check for custom msvc runtime library on Windows. Build if it doesn't exist.
|
||||
+ msvcr_success = build_msvcr_library()
|
||||
+ msvcr_dbg_success = build_msvcr_library(debug=True)
|
||||
+ if msvcr_success or msvcr_dbg_success:
|
||||
+ # add preprocessor statement for using customized msvcr lib
|
||||
+ self.define_macro('NPY_MINGW_USE_CUSTOM_MSVCR')
|
||||
+
|
||||
+ # Define the MSVC version as hint for MinGW
|
||||
+ msvcr_version = '0x%03i0' % int(msvc_runtime_library().lstrip('msvcr'))
|
||||
+ self.define_macro('__MSVCRT_VERSION__', msvcr_version)
|
||||
|
||||
# MS_WIN64 should be defined when building for amd64 on windows,
|
||||
# but python headers define it only for MS compilers, which has all
|
||||
--- numpy-py2-1.10.0/numpy/distutils/fcompiler/gnu.py 2014-02-19 01:27:32.252800000 +0400
|
||||
+++ numpy-1.10.0/numpy/distutils/fcompiler/gnu.py 2014-02-19 01:31:29.804200000 +0400
|
||||
@@ -6,6 +6,7 @@
|
||||
import warnings
|
||||
import platform
|
||||
import tempfile
|
||||
+from sysconfig import _POSIX_BUILD
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
|
||||
from numpy.distutils.cpuinfo import cpu
|
||||
@@ -103,7 +103,7 @@
|
||||
diff -urN numpy-1.10.2.orig/numpy/distutils/fcompiler/gnu.py numpy-1.10.2/numpy/distutils/fcompiler/gnu.py
|
||||
--- numpy-1.10.2.orig/numpy/distutils/fcompiler/gnu.py 2015-11-12 20:04:51.000000000 +0000
|
||||
+++ numpy-1.10.2/numpy/distutils/fcompiler/gnu.py 2016-01-02 03:36:30.528498700 +0000
|
||||
@@ -101,7 +101,7 @@
|
||||
pic_flags = ['-fPIC']
|
||||
|
||||
# use -mno-cygwin for g77 when Python is not Cygwin-Python
|
||||
- if sys.platform == 'win32':
|
||||
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
||||
+ if sys.platform == 'win32' and not 'GCC' in sys.version:
|
||||
for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']:
|
||||
executables[key].append('-mno-cygwin')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user