利用者:Juicyfruit/numpy windows
Building numpy 1.8.0 on windows without any external stuff without a fortran compiler in a GPL compatible way:
MSVC 2013:
install python.
fix distutils\msvc9compiler.py
line 649: "if False and mfinfi in not None" as we dont want maifests and they dont work with MSVC 2012+
patch numpy:
diff -ur numpy-1.8.0.orig/numpy/core/setup.py numpy-1.8.0/numpy/core/setup.py
--- numpy-1.8.0.orig/numpy/core/setup.py Mon Mar 3 05:21:22 2014
+++ numpy-1.8.0/numpy/core/setup.py Mon Mar 3 04:54:47 2014
@@ -199,7 +199,7 @@
# Check for complex support
st = config.check_header('complex.h')
- if st:
+ if False and st:
priv.append(('HAVE_COMPLEX_H', 1))
pub.append(('NPY_USE_C99_COMPLEX', 1))
@@ -366,7 +366,7 @@
def check_mathlib(config_cmd):
# Testing the C math library
mathlibs = []
- mathlibs_choices = [[], ['m'], ['cpml']]
+ mathlibs_choices = [[], ['cpml']]
mathlib = os.environ.get('MATHLIB')
if mathlib:
mathlibs_choices.insert(0, mathlib.split(','))
diff -ur numpy-1.8.0.orig/numpy/core/src/private/npy_config.h numpy-1.8.0/numpy/core/src/private/npy_config.h
--- numpy-1.8.0.orig/numpy/core/src/private/npy_config.h Mon Mar 3 05:21:25 2014
+++ numpy-1.8.0/numpy/core/src/private/npy_config.h Mon Mar 3 04:45:22 2014
@@ -6,8 +6,8 @@
/* Disable broken MS math functions */
#if defined(_MSC_VER) || defined(__MINGW32_VERSION)
-#undef HAVE_ATAN2
-#undef HAVE_HYPOT
+//#undef HAVE_ATAN2
+//#undef HAVE_HYPOT
#endif
/* Safe to use ldexp and frexp for long double for MSVC builds */
build with:
python setup.py config --compiler=msvc build --compiler=msvc bdist_wininst
note you need both x64 and x86 versions of python of the same exact version as you are using in blender (3.3)