Diff below updates py-numpy to 1.17.5. Although there are newer versions I chose to do a small jump, which already caries a lot of changes: https://github.com/numpy/numpy/blob/v1.17.5/doc/changelog/1.16.6-changelog.rst https://github.com/numpy/numpy/blob/v1.17.5/doc/changelog/1.17.1-changelog.rst https://github.com/numpy/numpy/blob/v1.17.5/doc/changelog/1.17.2-changelog.rst https://github.com/numpy/numpy/blob/v1.17.5/doc/changelog/1.17.3-changelog.rst https://github.com/numpy/numpy/blob/v1.17.5/doc/changelog/1.17.4-changelog.rst https://github.com/numpy/numpy/blob/v1.17.5/doc/changelog/1.17.5-changelog.rst
Our version of as(1) doesn't seem to like avx2 and avx512f instructions, which blocked building. As such, I ripped out specific checks. I noticed some new failing tests when running 'make test', however none of these look important. Run tested on amd64 while doing $WORK. I'm not (yet) asking for OKs, instead I'm hoping for some help: - is there a better/preferred fix for the avx2/avx512f-bits? - it would be nice if someone who uses powerpc checks if patches/patch-numpy_core_include_numpy_npy_common_h is still needed - testing... diff --git Makefile Makefile index 5bdaefea1d7..86725d05610 100644 --- Makefile +++ Makefile @@ -2,11 +2,10 @@ COMMENT= fast array and numeric programming library for Python -MODPY_EGG_VERSION= 1.16.5 +MODPY_EGG_VERSION= 1.17.5 DISTNAME= numpy-${MODPY_EGG_VERSION} PKGNAME= py-${DISTNAME} EXTRACT_SUFX= .zip -REVISION= 2 CATEGORIES= math devel diff --git distinfo distinfo index f8c8f20fed7..db4c9830c34 100644 --- distinfo +++ distinfo @@ -1,2 +1,2 @@ -SHA256 (numpy-1.16.5.zip) = i7RS2U6WSzEiBbDeEjjdcgnaRSNDZTqyFLXWgXgOegw= -SIZE (numpy-1.16.5.zip) = 5138208 +SHA256 (numpy-1.17.5.zip) = FlB7pmF/Yq48arFyWub1UDMQJdTZo2m4P21aRwRGw0I= +SIZE (numpy-1.17.5.zip) = 6372153 diff --git patches/patch-numpy_core_include_numpy_npy_common_h patches/patch-numpy_core_include_numpy_npy_common_h index f82775b7c58..87d2e064e3b 100644 --- patches/patch-numpy_core_include_numpy_npy_common_h +++ patches/patch-numpy_core_include_numpy_npy_common_h @@ -10,7 +10,7 @@ types that conflict with C99 (double for *l), therefore failed. Index: numpy/core/include/numpy/npy_common.h --- numpy/core/include/numpy/npy_common.h.orig +++ numpy/core/include/numpy/npy_common.h -@@ -320,14 +320,8 @@ typedef unsigned char npy_bool; +@@ -337,14 +337,8 @@ typedef unsigned char npy_bool; #define NPY_FALSE 0 #define NPY_TRUE 1 diff --git patches/patch-numpy_core_setup_common_py patches/patch-numpy_core_setup_common_py index 32ae66d9d02..2c6ced86a5f 100644 --- patches/patch-numpy_core_setup_common_py +++ patches/patch-numpy_core_setup_common_py @@ -1,5 +1,4 @@ $OpenBSD: patch-numpy_core_setup_common_py,v 1.1 2020/04/02 07:39:09 pirofti Exp $ - Index: numpy/core/setup_common.py --- numpy/core/setup_common.py.orig +++ numpy/core/setup_common.py @@ -12,3 +11,51 @@ Index: numpy/core/setup_common.py OPTIONAL_HEADERS = [ +@@ -138,8 +138,6 @@ OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'), + # broken on OSX 10.11, make sure its not optimized away + ("volatile int r = __builtin_cpu_supports", '"sse"', + "stdio.h", "__BUILTIN_CPU_SUPPORTS"), +- ("volatile int r = __builtin_cpu_supports", '"avx512f"', +- "stdio.h", "__BUILTIN_CPU_SUPPORTS_AVX512F"), + # MMX only needed for icc, but some clangs don't have it + ("_m_from_int64", '0', "emmintrin.h"), + ("_mm_load_ps", '(float*)0', "xmmintrin.h"), # SSE +@@ -150,10 +148,6 @@ OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'), + # check that the linker can handle avx + ("__asm__ volatile", '"vpand %xmm1, %xmm2, %xmm3"', + "stdio.h", "LINK_AVX"), +- ("__asm__ volatile", '"vpand %ymm1, %ymm2, %ymm3"', +- "stdio.h", "LINK_AVX2"), +- ("__asm__ volatile", '"vpaddd %zmm1, %zmm2, %zmm3"', +- "stdio.h", "LINK_AVX512F"), + ("__asm__ volatile", '"xgetbv"', "stdio.h", "XGETBV"), + ] + +@@ -168,10 +162,6 @@ OPTIONAL_FUNCTION_ATTRIBUTES = [('__attribute__((optim + 'attribute_nonnull'), + ('__attribute__((target ("avx")))', + 'attribute_target_avx'), +- ('__attribute__((target ("avx2")))', +- 'attribute_target_avx2'), +- ('__attribute__((target ("avx512f")))', +- 'attribute_target_avx512f'), + ] + + # function attributes with intrinsics +@@ -179,15 +169,7 @@ OPTIONAL_FUNCTION_ATTRIBUTES = [('__attribute__((optim + # gcc 4.8.4 support attributes but not with intrisics + # tested via "#include<%s> int %s %s(void *){code; return 0;};" % (header, attribute, name, code) + # function name will be converted to HAVE_<upper-case-name> preprocessor macro +-OPTIONAL_FUNCTION_ATTRIBUTES_WITH_INTRINSICS = [('__attribute__((target("avx2")))', +- 'attribute_target_avx2_with_intrinsics', +- '__m256 temp = _mm256_set1_ps(1.0)', +- 'immintrin.h'), +- ('__attribute__((target("avx512f")))', +- 'attribute_target_avx512f_with_intrinsics', +- '__m512 temp = _mm512_set1_ps(1.0)', +- 'immintrin.h'), +- ] ++OPTIONAL_FUNCTION_ATTRIBUTES_WITH_INTRINSICS = [] + + # variable attributes tested via "int %s a" % attribute + OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread", "__declspec(thread)"] diff --git patches/patch-numpy_distutils_command_build_src_py patches/patch-numpy_distutils_command_build_src_py index af9acddbde3..e1e4b2ff3e0 100644 --- patches/patch-numpy_distutils_command_build_src_py +++ patches/patch-numpy_distutils_command_build_src_py @@ -6,7 +6,7 @@ WRKOBJDIR has a trailing slash) Index: numpy/distutils/command/build_src.py --- numpy/distutils/command/build_src.py.orig +++ numpy/distutils/command/build_src.py -@@ -370,6 +370,7 @@ class build_src(build_ext.build_ext): +@@ -364,6 +364,7 @@ class build_src(build_ext.build_ext): # incl_dirs.append(self.build_src) build_dir = os.path.join(*([self.build_src]\ +name.split('.')[:-1])) diff --git pkg/PLIST pkg/PLIST index 33405567439..1c431919020 100644 --- pkg/PLIST +++ pkg/PLIST @@ -48,12 +48,15 @@ ${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCA lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_add_newdocs.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_aliased_types.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_asarray.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_dtype.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_dtype_ctypes.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_exceptions.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_internal.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_methods.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_string_helpers.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_type_aliases.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}_ufunc_config.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}arrayprint.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}cversions.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}defchararray.${MODPY_PYC_MAGIC_TAG}pyc @@ -77,9 +80,11 @@ lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}umath.${MODP lib/python${MODPY_VERSION}/site-packages/numpy/core/${MODPY_PYCACHE}umath_tests.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/core/_add_newdocs.py lib/python${MODPY_VERSION}/site-packages/numpy/core/_aliased_types.py +lib/python${MODPY_VERSION}/site-packages/numpy/core/_asarray.py lib/python${MODPY_VERSION}/site-packages/numpy/core/_dtype.py lib/python${MODPY_VERSION}/site-packages/numpy/core/_dtype_ctypes.py @so lib/python${MODPY_VERSION}/site-packages/numpy/core/_dummy.${MODPY_PYC_MAGIC_TAG}so +lib/python${MODPY_VERSION}/site-packages/numpy/core/_exceptions.py lib/python${MODPY_VERSION}/site-packages/numpy/core/_internal.py lib/python${MODPY_VERSION}/site-packages/numpy/core/_methods.py @so lib/python${MODPY_VERSION}/site-packages/numpy/core/_multiarray_tests.${MODPY_PYC_MAGIC_TAG}so @@ -89,6 +94,7 @@ lib/python${MODPY_VERSION}/site-packages/numpy/core/_methods.py lib/python${MODPY_VERSION}/site-packages/numpy/core/_string_helpers.py @so lib/python${MODPY_VERSION}/site-packages/numpy/core/_struct_ufunc_tests.${MODPY_PYC_MAGIC_TAG}so lib/python${MODPY_VERSION}/site-packages/numpy/core/_type_aliases.py +lib/python${MODPY_VERSION}/site-packages/numpy/core/_ufunc_config.py @so lib/python${MODPY_VERSION}/site-packages/numpy/core/_umath_tests.${MODPY_PYC_MAGIC_TAG}so lib/python${MODPY_VERSION}/site-packages/numpy/core/arrayprint.py lib/python${MODPY_VERSION}/site-packages/numpy/core/cversions.py @@ -148,6 +154,11 @@ lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/_locales.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/data/ lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/data/astype_copy.pkl lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/data/recarray_from_file.fits +lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/data/umath-validation-set-README +lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/data/umath-validation-set-cos +lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/data/umath-validation-set-exp +lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/data/umath-validation-set-log +lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/data/umath-validation-set-sin lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_abc.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_api.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_arrayprint.py @@ -177,6 +188,7 @@ lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_print.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_records.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_regression.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_scalar_ctors.py +lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_scalar_methods.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_scalarbuffer.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_scalarinherit.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_scalarmath.py @@ -184,6 +196,7 @@ lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_scalarprint.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_shape_base.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_ufunc.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_umath.py +lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_umath_accuracy.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_umath_complex.py lib/python${MODPY_VERSION}/site-packages/numpy/core/tests/test_unicode.py lib/python${MODPY_VERSION}/site-packages/numpy/core/umath.py @@ -461,19 +474,17 @@ lib/python${MODPY_VERSION}/site-packages/numpy/fft/ lib/python${MODPY_VERSION}/site-packages/numpy/fft/__init__.py ${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/numpy/fft/${MODPY_PYCACHE}/ lib/python${MODPY_VERSION}/site-packages/numpy/fft/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc -lib/python${MODPY_VERSION}/site-packages/numpy/fft/${MODPY_PYCACHE}fftpack.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/numpy/fft/${MODPY_PYCACHE}_pocketfft.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/fft/${MODPY_PYCACHE}helper.${MODPY_PYC_MAGIC_TAG}pyc -lib/python${MODPY_VERSION}/site-packages/numpy/fft/${MODPY_PYCACHE}info.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/fft/${MODPY_PYCACHE}setup.${MODPY_PYC_MAGIC_TAG}pyc -lib/python${MODPY_VERSION}/site-packages/numpy/fft/fftpack.py -@so lib/python${MODPY_VERSION}/site-packages/numpy/fft/fftpack_lite.${MODPY_PYC_MAGIC_TAG}so +lib/python${MODPY_VERSION}/site-packages/numpy/fft/_pocketfft.py +@so lib/python${MODPY_VERSION}/site-packages/numpy/fft/_pocketfft_internal.${MODPY_PYC_MAGIC_TAG}so lib/python${MODPY_VERSION}/site-packages/numpy/fft/helper.py -lib/python${MODPY_VERSION}/site-packages/numpy/fft/info.py lib/python${MODPY_VERSION}/site-packages/numpy/fft/setup.py lib/python${MODPY_VERSION}/site-packages/numpy/fft/tests/ lib/python${MODPY_VERSION}/site-packages/numpy/fft/tests/__init__.py -lib/python${MODPY_VERSION}/site-packages/numpy/fft/tests/test_fftpack.py lib/python${MODPY_VERSION}/site-packages/numpy/fft/tests/test_helper.py +lib/python${MODPY_VERSION}/site-packages/numpy/fft/tests/test_pocketfft.py lib/python${MODPY_VERSION}/site-packages/numpy/lib/ lib/python${MODPY_VERSION}/site-packages/numpy/lib/__init__.py ${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/numpy/lib/${MODPY_PYCACHE}/ @@ -530,8 +541,8 @@ lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/__init__.py lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/ lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/py2-objarr.npy lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/py2-objarr.npz -lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/py3-objarr.npy -lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/py3-objarr.npz +lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/${MODPY_PY_PREFIX}objarr.npy +lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/${MODPY_PY_PREFIX}objarr.npz lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/python3.npy lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/data/win64python2.npy lib/python${MODPY_VERSION}/site-packages/numpy/lib/tests/test__datasource.py @@ -665,16 +676,42 @@ lib/python${MODPY_VERSION}/site-packages/numpy/random/ lib/python${MODPY_VERSION}/site-packages/numpy/random/__init__.py ${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/numpy/random/${MODPY_PYCACHE}/ lib/python${MODPY_VERSION}/site-packages/numpy/random/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/numpy/random/${MODPY_PYCACHE}_pickle.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/random/${MODPY_PYCACHE}info.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/numpy/random/${MODPY_PYCACHE}setup.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/numpy/random/_pickle.py +@so lib/python${MODPY_VERSION}/site-packages/numpy/random/bit_generator.${MODPY_PYC_MAGIC_TAG}so +@so lib/python${MODPY_VERSION}/site-packages/numpy/random/bounded_integers.${MODPY_PYC_MAGIC_TAG}so +@so lib/python${MODPY_VERSION}/site-packages/numpy/random/common.${MODPY_PYC_MAGIC_TAG}so +@so lib/python${MODPY_VERSION}/site-packages/numpy/random/generator.${MODPY_PYC_MAGIC_TAG}so lib/python${MODPY_VERSION}/site-packages/numpy/random/info.py +@so lib/python${MODPY_VERSION}/site-packages/numpy/random/mt19937.${MODPY_PYC_MAGIC_TAG}so @so lib/python${MODPY_VERSION}/site-packages/numpy/random/mtrand.${MODPY_PYC_MAGIC_TAG}so -lib/python${MODPY_VERSION}/site-packages/numpy/random/randomkit.h +@so lib/python${MODPY_VERSION}/site-packages/numpy/random/pcg64.${MODPY_PYC_MAGIC_TAG}so +@so lib/python${MODPY_VERSION}/site-packages/numpy/random/philox.${MODPY_PYC_MAGIC_TAG}so lib/python${MODPY_VERSION}/site-packages/numpy/random/setup.py +@so lib/python${MODPY_VERSION}/site-packages/numpy/random/sfc64.${MODPY_PYC_MAGIC_TAG}so lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/ lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/__init__.py +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/ +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/__init__.py +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/mt19937-testset-1.csv +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/mt19937-testset-2.csv +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/pcg64-testset-1.csv +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/pcg64-testset-2.csv +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/philox-testset-1.csv +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/philox-testset-2.csv +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/sfc64-testset-1.csv +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/data/sfc64-testset-2.csv +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_direct.py +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_generator_mt19937.py +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_generator_mt19937_regressions.py lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_random.py +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_randomstate.py +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_randomstate_regression.py lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_regression.py +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_seed_sequence.py +lib/python${MODPY_VERSION}/site-packages/numpy/random/tests/test_smoke.py lib/python${MODPY_VERSION}/site-packages/numpy/setup.py lib/python${MODPY_VERSION}/site-packages/numpy/testing/ lib/python${MODPY_VERSION}/site-packages/numpy/testing/__init__.py