diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-09-30 10:33:08 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-09-30 10:33:08 +0200 |
commit | 57b70b8ebcfa25aa046ed35a55b63684d88fa5c6 (patch) | |
tree | d63b79733ab4e41e19778c4e4b876a4252c2d929 /dev-python/numpy/files | |
parent | dev-python/aesara: Remove old (diff) | |
download | gentoo-57b70b8ebcfa25aa046ed35a55b63684d88fa5c6.tar.gz gentoo-57b70b8ebcfa25aa046ed35a55b63684d88fa5c6.tar.bz2 gentoo-57b70b8ebcfa25aa046ed35a55b63684d88fa5c6.zip |
dev-python/numpy: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/numpy/files')
7 files changed, 0 insertions, 781 deletions
diff --git a/dev-python/numpy/files/numpy-1.22.0-no-hardcode-blasv2.patch b/dev-python/numpy/files/numpy-1.22.0-no-hardcode-blasv2.patch deleted file mode 100644 index d87a16a4b6c9..000000000000 --- a/dev-python/numpy/files/numpy-1.22.0-no-hardcode-blasv2.patch +++ /dev/null @@ -1,50 +0,0 @@ -Originally added in: https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-python/numpy/files?id=e5ce90a04e79f6413604e96e4803cb95ada7c859 -https://bugs.gentoo.org/567938 ---- a/numpy/distutils/system_info.py -+++ b/numpy/distutils/system_info.py -@@ -505,33 +505,7 @@ def get_info(name, notfound_action=0): - 'blas_armpl': blas_armpl_info, - 'lapack_armpl': lapack_armpl_info, - 'fftw3_armpl': fftw3_armpl_info, -- 'atlas': atlas_info, # use lapack_opt or blas_opt instead -- 'atlas_threads': atlas_threads_info, # ditto -- 'atlas_blas': atlas_blas_info, -- 'atlas_blas_threads': atlas_blas_threads_info, -- 'lapack_atlas': lapack_atlas_info, # use lapack_opt instead -- 'lapack_atlas_threads': lapack_atlas_threads_info, # ditto -- 'atlas_3_10': atlas_3_10_info, # use lapack_opt or blas_opt instead -- 'atlas_3_10_threads': atlas_3_10_threads_info, # ditto -- 'atlas_3_10_blas': atlas_3_10_blas_info, -- 'atlas_3_10_blas_threads': atlas_3_10_blas_threads_info, -- 'lapack_atlas_3_10': lapack_atlas_3_10_info, # use lapack_opt instead -- 'lapack_atlas_3_10_threads': lapack_atlas_3_10_threads_info, # ditto -- 'flame': flame_info, # use lapack_opt instead -- 'mkl': mkl_info, -- # openblas which may or may not have embedded lapack -- 'openblas': openblas_info, # use blas_opt instead -- # openblas with embedded lapack -- 'openblas_lapack': openblas_lapack_info, # use blas_opt instead -- 'openblas_clapack': openblas_clapack_info, # use blas_opt instead -- 'blis': blis_info, # use blas_opt instead -- 'lapack_mkl': lapack_mkl_info, # use lapack_opt instead -- 'blas_mkl': blas_mkl_info, # use blas_opt instead - 'accelerate': accelerate_info, # use blas_opt instead -- 'openblas64_': openblas64__info, -- 'openblas64__lapack': openblas64__lapack_info, -- 'openblas_ilp64': openblas_ilp64_info, -- 'openblas_ilp64_lapack': openblas_ilp64_lapack_info, - 'x11': x11_info, - 'fft_opt': fft_opt_info, - 'fftw': fftw_info, -@@ -951,10 +925,7 @@ class system_info: - return [b for b in [a.strip() for a in libs.split(',')] if b] - - def get_libraries(self, key='libraries'): -- if hasattr(self, '_lib_names'): -- return self.get_libs(key, default=self._lib_names) -- else: -- return self.get_libs(key, '') -+ return self.get_libs(key, '') - - def library_extensions(self): - c = customized_ccompiler() diff --git a/dev-python/numpy/files/numpy-1.24.3-fix-c++-linkage.patch b/dev-python/numpy/files/numpy-1.24.3-fix-c++-linkage.patch deleted file mode 100644 index ae7d5ba0ea49..000000000000 --- a/dev-python/numpy/files/numpy-1.24.3-fix-c++-linkage.patch +++ /dev/null @@ -1,25 +0,0 @@ -https://bugs.gentoo.org/893962 -https://github.com/numpy/numpy/issues/23122 -https://github.com/numpy/numpy/pull/23601 - -From 0a0240bcdad5daa0b84781719b3f8a002ef0f82b Mon Sep 17 00:00:00 2001 -From: Ralf Gommers <ralf.gommers@gmail.com> -Date: Sun, 16 Apr 2023 22:23:38 +0100 -Subject: [PATCH] BLD: use the C++ linker to link `_multiarray_umath.so` - -This gets rid of undefined symbol issues for `assert`. - -Closes gh-23122 -Closes gh-23595 ---- a/numpy/core/setup.py -+++ b/numpy/core/setup.py -@@ -1010,9 +1010,6 @@ def generate_umath_doc_header(ext, build_dir): - svml_objs.sort() - - config.add_extension('_multiarray_umath', -- # Forcing C language even though we have C++ sources. -- # It forces the C linker and don't link C++ runtime. -- language = 'c', - sources=multiarray_src + umath_src + - common_src + - [generate_config_h, diff --git a/dev-python/numpy/files/numpy-1.25.0-skip-python3.12-irrelevant-tests.patch b/dev-python/numpy/files/numpy-1.25.0-skip-python3.12-irrelevant-tests.patch deleted file mode 100644 index cd829c5ef08e..000000000000 --- a/dev-python/numpy/files/numpy-1.25.0-skip-python3.12-irrelevant-tests.patch +++ /dev/null @@ -1,187 +0,0 @@ -https://github.com/numpy/numpy/commit/515403f2c637cb58f8dc326d88dd6f768f027cf4 -https://github.com/numpy/numpy/commit/b0872b858e2e6ebc394e95c81a024dcf1573c690 -https://github.com/numpy/numpy/commit/e42fc93b54a6d41dab72d86921f96e5ebc4c4198 -https://github.com/numpy/numpy/commit/4552b6cb0083502f731794e961cd30b9b62ba2e3 - -From 515403f2c637cb58f8dc326d88dd6f768f027cf4 Mon Sep 17 00:00:00 2001 -From: Ralf Gommers <ralf.gommers@gmail.com> -Date: Sun, 18 Jun 2023 15:56:23 +0200 -Subject: [PATCH] TST: disable `test_new_policy` test for memory allocator. - -This is way too slow, running a large part of the test suite twice. -Issue 23975 tracks changing how this feature is tested. ---- - numpy/core/tests/test_mem_policy.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/numpy/core/tests/test_mem_policy.py b/numpy/core/tests/test_mem_policy.py -index b4e2f65916c..0855d60771a 100644 ---- a/numpy/core/tests/test_mem_policy.py -+++ b/numpy/core/tests/test_mem_policy.py -@@ -359,7 +359,7 @@ def test_thread_locality(get_module): - assert np.core.multiarray.get_handler_name() == orig_policy_name - - --@pytest.mark.slow -+@pytest.mark.skip(reason="too slow, see gh-23975") - def test_new_policy(get_module): - a = np.arange(10) - orig_policy_name = np.core.multiarray.get_handler_name(a) - -From b0872b858e2e6ebc394e95c81a024dcf1573c690 Mon Sep 17 00:00:00 2001 -From: Ralf Gommers <ralf.gommers@gmail.com> -Date: Mon, 19 Jun 2023 11:07:19 +0200 -Subject: [PATCH] TST: skip refcount related tests on py312 - -Python 3.12 has immortal refcounts; the initial and final -values will be the same when accessing `sys.getrefcount` inside a -test. - -Closes gh-23986 ---- a/numpy/core/tests/test_dtype.py -+++ b/numpy/core/tests/test_dtype.py -@@ -755,6 +755,11 @@ def iter_struct_object_dtypes(): - yield pytest.param(dt, p, 12, obj, id="<structured subarray 2>") - - -+@pytest.mark.skipif( -+ sys.version_info >= (3, 12), -+ reason="Python 3.12 has immortal refcounts, this test will no longer " -+ "work. See gh-23986" -+) - @pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts") - class TestStructuredObjectRefcounting: - """These tests cover various uses of complicated structured types which ---- a/numpy/core/tests/test_regression.py -+++ b/numpy/core/tests/test_regression.py -@@ -1465,6 +1465,10 @@ def test_structured_arrays_with_objects1(self): - x[x.nonzero()] = x.ravel()[:1] - assert_(x[0, 1] == x[0, 0]) - -+ @pytest.mark.skipif( -+ sys.version_info >= (3, 12), -+ reason="Python 3.12 has immortal refcounts, this test no longer works." -+ ) - @pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts") - def test_structured_arrays_with_objects2(self): - # Ticket #1299 second test - -From e42fc93b54a6d41dab72d86921f96e5ebc4c4198 Mon Sep 17 00:00:00 2001 -From: Ralf Gommers <ralf.gommers@gmail.com> -Date: Mon, 19 Jun 2023 11:14:38 +0200 -Subject: [PATCH] TST: skip memory allocator and `array_interface` tests on - py312 - -They require numpy.distutils, which isn't available on >=3.12 -The `numpy.testing.extbuild` utility will need changing to make this -work again. Could either use plain `setuptools` or `meson`. ---- a/numpy/core/tests/test_array_interface.py -+++ b/numpy/core/tests/test_array_interface.py -@@ -128,6 +128,9 @@ def get_module(tmp_path): - more_init=more_init) - - -+# FIXME: numpy.testing.extbuild uses `numpy.distutils`, so this won't work on -+# Python 3.12 and up. -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - @pytest.mark.slow - def test_cstruct(get_module): - ---- a/numpy/core/tests/test_mem_policy.py -+++ b/numpy/core/tests/test_mem_policy.py -@@ -9,6 +9,11 @@ - import sys - - -+# FIXME: numpy.testing.extbuild uses `numpy.distutils`, so this won't work on -+# Python 3.12 and up. It's an internal test utility, so for now we just skip -+# these tests. -+ -+ - @pytest.fixture - def get_module(tmp_path): - """ Add a memory policy that returns a false pointer 64 bytes into the -@@ -213,6 +218,7 @@ def get_module(tmp_path): - more_init=more_init) - - -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - def test_set_policy(get_module): - - get_handler_name = np.core.multiarray.get_handler_name -@@ -241,6 +247,7 @@ def test_set_policy(get_module): - assert get_handler_name() == orig_policy_name - - -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - def test_default_policy_singleton(get_module): - get_handler_name = np.core.multiarray.get_handler_name - -@@ -262,6 +269,7 @@ def test_default_policy_singleton(get_module): - assert def_policy_1 is def_policy_2 is get_module.get_default_policy() - - -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - def test_policy_propagation(get_module): - # The memory policy goes hand-in-hand with flags.owndata - -@@ -320,6 +328,7 @@ async def async_test_context_locality(get_module): - assert np.core.multiarray.get_handler_name() == orig_policy_name - - -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - def test_context_locality(get_module): - if (sys.implementation.name == 'pypy' - and sys.pypy_version_info[:3] < (7, 3, 6)): -@@ -341,6 +350,7 @@ def concurrent_thread2(get_module, event): - get_module.set_secret_data_policy() - - -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - def test_thread_locality(get_module): - orig_policy_name = np.core.multiarray.get_handler_name() - -@@ -359,6 +369,7 @@ def test_thread_locality(get_module): - assert np.core.multiarray.get_handler_name() == orig_policy_name - - -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - @pytest.mark.skip(reason="too slow, see gh-23975") - def test_new_policy(get_module): - a = np.arange(10) -@@ -388,6 +399,8 @@ def test_new_policy(get_module): - c = np.arange(10) - assert np.core.multiarray.get_handler_name(c) == orig_policy_name - -+ -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - @pytest.mark.xfail(sys.implementation.name == "pypy", - reason=("bad interaction between getenv and " - "os.environ inside pytest")) -@@ -420,6 +433,8 @@ def test_switch_owner(get_module, policy): - else: - os.environ['NUMPY_WARN_IF_NO_MEM_POLICY'] = oldval - -+ -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="no numpy.distutils") - def test_owner_is_base(get_module): - a = get_module.get_array_with_base() - with pytest.warns(UserWarning, match='warn_on_free'): - - -From 4552b6cb0083502f731794e961cd30b9b62ba2e3 Mon Sep 17 00:00:00 2001 -From: Ralf Gommers <ralf.gommers@gmail.com> -Date: Mon, 19 Jun 2023 12:07:32 +0200 -Subject: [PATCH] TST: skip test using `np.load` on py2-saved .npy file on - py312 - ---- a/numpy/lib/tests/test_format.py -+++ b/numpy/lib/tests/test_format.py -@@ -527,6 +527,7 @@ def test_load_padded_dtype(tmpdir, dt): - assert_array_equal(arr, arr1) - - -+@pytest.mark.skipif(sys.version_info >= (3, 12), reason="see gh-23988") - @pytest.mark.xfail(IS_WASM, reason="Emscripten NODEFS has a buggy dup") - def test_python2_python3_interoperability(): - fname = 'win64python2.npy' diff --git a/dev-python/numpy/files/numpy-1.25.0_rc1-meson-pyproject.toml.patch b/dev-python/numpy/files/numpy-1.25.0_rc1-meson-pyproject.toml.patch deleted file mode 100644 index b42e6cec1c73..000000000000 --- a/dev-python/numpy/files/numpy-1.25.0_rc1-meson-pyproject.toml.patch +++ /dev/null @@ -1,392 +0,0 @@ -https://github.com/numpy/numpy/pull/23838 - -From 669c1a16f9e905b5b33017aa1a17cc59716ccfc7 Mon Sep 17 00:00:00 2001 -From: Ralf Gommers <ralf.gommers@gmail.com> -Date: Mon, 29 May 2023 16:16:41 +0200 -Subject: [PATCH 01/11] BLD: default to using meson-python as build backend - ---- - pyproject.toml | 137 ++++++++++++++++----------------- - 3 files changed, 66 insertions(+), 77 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 759b538fb6e..9f03fa8d0e5 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -1,79 +1,72 @@ - [build-system] --# Uncomment this line, the `meson-python` requires line, and the [project] and --# [project.urls] tables below in order to build with Meson by default --#build-backend = "mesonpy" -+build-backend = "mesonpy" - requires = [ -- # setuptools, wheel and Cython are needed for the setup.py based build -- "setuptools==59.2.0", -- # `wheel` is needed for non-isolated builds, given that `meson-python` -- # doesn't list it as a runtime requirement (at least in 0.11.0) - it's -- # likely to be removed as a dependency in meson-python 0.12.0. -- "wheel==0.38.1", -- "Cython>=0.29.34,<3.0", --# "meson-python>=0.10.0", -+ "Cython>=0.29.34", -+ "meson-python>=0.13.1", - ] - --#[project] --#name = "numpy" --# --## Using https://peps.python.org/pep-0639/ --## which is still in draft --#license = {text = "BSD-3-Clause"} --## Note: needed for Meson, but setuptools errors on it. Uncomment once Meson is default. --##license-files.paths = [ --## "LICENSE.txt", --## "LICENSES_bundles.txt" --##] --# --#description = "Fundamental package for array computing in Python" --#authors = [{name = "Travis E. Oliphant et al."}] --#maintainers = [ --# {name = "NumPy Developers", email="numpy-discussion@python.org"}, --#] --#requires-python = ">=3.9" --#readme = "README.md" --#classifiers = [ --# 'Development Status :: 5 - Production/Stable', --# 'Intended Audience :: Science/Research', --# 'Intended Audience :: Developers', --# 'License :: OSI Approved :: BSD License', --# 'Programming Language :: C', --# 'Programming Language :: Python', --# 'Programming Language :: Python :: 3', --# 'Programming Language :: Python :: 3.9', --# 'Programming Language :: Python :: 3.10', --# 'Programming Language :: Python :: 3.11', --# 'Programming Language :: Python :: 3 :: Only', --# 'Programming Language :: Python :: Implementation :: CPython', --# 'Topic :: Software Development', --# 'Topic :: Scientific/Engineering', --# 'Typing :: Typed', --# 'Operating System :: Microsoft :: Windows', --# 'Operating System :: POSIX', --# 'Operating System :: Unix', --# 'Operating System :: MacOS', --#] --#dynamic = ["version", "scripts"] --# --#[project.scripts] --## Note: this is currently dynamic, see setup.py. Can we get rid of that? --## see commit f22a33b71 for rationale for dynamic behavior --#'f2py = numpy.f2py.f2py2e:main' --#'f2py3 = numpy.f2py.f2py2e:main' --#'f2py3.MINOR_VERSION = numpy.f2py.f2py2e:main' --# --# When enabling this stanza, make sure to remove the meson-specific xfail from --# numpy/tests/test_public_api.py --#[project.entry-points] --#'array_api': 'numpy = numpy.array_api' --#'pyinstaller40': 'hook-dirs = numpy:_pyinstaller_hooks_dir' --# --#[project.urls] --#homepage = "https://numpy.org" --#documentation = "https://numpy.org/doc/" --#source = "https://github.com/numpy/numpy" --#download = "https://pypi.org/project/numpy/#files" --#tracker = "https://github.com/numpy/numpy/issues" -+[project] -+name = "numpy" -+version = "2.0.0.dev0" -+ -+# Using https://peps.python.org/pep-0639/ which is still in draft -+license = {text = "BSD-3-Clause"} -+license-files.paths = [ -+ "LICENSE.txt", -+ "LICENSES_bundles.txt" -+] -+ -+description = "Fundamental package for array computing in Python" -+authors = [{name = "Travis E. Oliphant et al."}] -+maintainers = [ -+ {name = "NumPy Developers", email="numpy-discussion@python.org"}, -+] -+requires-python = ">=3.9" -+readme = "README.md" -+classifiers = [ -+ 'Development Status :: 5 - Production/Stable', -+ 'Intended Audience :: Science/Research', -+ 'Intended Audience :: Developers', -+ 'License :: OSI Approved :: BSD License', -+ 'Programming Language :: C', -+ 'Programming Language :: Python', -+ 'Programming Language :: Python :: 3', -+ 'Programming Language :: Python :: 3.9', -+ 'Programming Language :: Python :: 3.10', -+ 'Programming Language :: Python :: 3.11', -+ 'Programming Language :: Python :: 3.12', -+ 'Programming Language :: Python :: 3 :: Only', -+ 'Programming Language :: Python :: Implementation :: CPython', -+ 'Topic :: Software Development', -+ 'Topic :: Scientific/Engineering', -+ 'Typing :: Typed', -+ 'Operating System :: Microsoft :: Windows', -+ 'Operating System :: POSIX', -+ 'Operating System :: Unix', -+ 'Operating System :: MacOS', -+] -+#dynamic = ["scripts"] -+ -+[project.scripts] -+# TODO: this is currently dynamic for minor version support. See also the same -+# thing in setup.py. Can we get rid of that? see commit f22a33b71 for rationale -+# for dynamic behavior. -+f2py = 'numpy.f2py.f2py2e:main' -+f2py3 = 'numpy.f2py.f2py2e:main' -+#f2py3.MINOR_VERSION = 'numpy.f2py.f2py2e:main' -+ -+[project.entry-points.array_api] -+numpy = 'numpy.array_api' -+ -+[project.entry-points.pyinstaller40] -+hook-dirs = 'numpy:_pyinstaller_hooks_dir' -+ -+[project.urls] -+homepage = "https://numpy.org" -+documentation = "https://numpy.org/doc/" -+source = "https://github.com/numpy/numpy" -+download = "https://pypi.org/project/numpy/#files" -+tracker = "https://github.com/numpy/numpy/issues" - - [tool.towncrier] - # Do no set this since it is hard to import numpy inside the source directory - -From 02cae331443d6955dba8ce5e981c24a7b6c01ec6 Mon Sep 17 00:00:00 2001 -From: Ralf Gommers <ralf.gommers@gmail.com> -Date: Mon, 29 May 2023 18:51:54 +0200 -Subject: [PATCH 04/11] BLD: fix bug with CMake fallback detection of - BLAS/LAPACK - ---- - numpy/meson.build | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/numpy/meson.build b/numpy/meson.build -index 7b85d8e92f5..ad1829a78db 100644 ---- a/numpy/meson.build -+++ b/numpy/meson.build -@@ -198,10 +198,13 @@ foreach name, dep : dependency_map - if dep.found() - conf_data.set(name + '_VERSION', dep.version()) - conf_data.set(name + '_TYPE_NAME', dep.type_name()) -- conf_data.set(name + '_INCLUDEDIR', dep.get_variable('includedir')) -- conf_data.set(name + '_LIBDIR', dep.get_variable('libdir')) -- conf_data.set(name + '_OPENBLAS_CONFIG', dep.get_variable('openblas_config')) -- conf_data.set(name + '_PCFILEDIR', dep.get_variable('pcfiledir')) -+ if dep.type_name() == 'pkgconfig' -+ # CMake detection yields less info, so we need to leave it blank there -+ conf_data.set(name + '_INCLUDEDIR', dep.get_variable('includedir')) -+ conf_data.set(name + '_LIBDIR', dep.get_variable('libdir')) -+ conf_data.set(name + '_OPENBLAS_CONFIG', dep.get_variable('openblas_config')) -+ conf_data.set(name + '_PCFILEDIR', dep.get_variable('pcfiledir')) -+ endif - endif - endforeach - - -From 84bea46fab251edd31bee8d8eae174cf2cb9315b Mon Sep 17 00:00:00 2001 -From: Ralf Gommers <ralf.gommers@gmail.com> -Date: Mon, 29 May 2023 19:15:29 +0200 -Subject: [PATCH 06/11] CI: keep the Emscripten/Pyodide job on a setup.py-based - build - ---- - pyproject.toml.setuppy | 9 +++++++++ - 2 files changed, 14 insertions(+), 1 deletion(-) - create mode 100644 pyproject.toml.setuppy - -diff --git a/pyproject.toml.setuppy b/pyproject.toml.setuppy -new file mode 100644 -index 00000000000..b28d93c8d52 ---- /dev/null -+++ b/pyproject.toml.setuppy -@@ -0,0 +1,9 @@ -+# pyproject.toml needed to build with setup.py -+# This file is used temporarily to replace the main pyproject.toml when needing -+# to avoid building with Meson (e.g., in the Emscripten/Pyodide CI job) -+[build-system] -+requires = [ -+ "setuptools==59.2.0", -+ "wheel==0.38.1", -+ "Cython>=0.29.34,<3.0", -+] - -From 027de0ab6d24e6336682ef6fa150ae09f007a5da Mon Sep 17 00:00:00 2001 -From: mattip <matti.picus@gmail.com> -Date: Sun, 11 Jun 2023 16:11:34 +0300 -Subject: [PATCH 07/11] use MSVC and force 64-bit OpenBLAS interfaces - ---- - pyproject.toml | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/pyproject.toml b/pyproject.toml -index 9f03fa8d0e5..6cef90c6962 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -167,6 +167,11 @@ environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFL - select = "*-win32" - environment = { OPENBLAS64_="", OPENBLAS="openblas", NPY_USE_BLAS_ILP64="0", CFLAGS="-m32", LDFLAGS="-m32" } - -+[tool.meson-python.args] -+setup = ['--vsenv'] -+# This should not be set on 32-bit builds... -+compile = ['-DBLAS_SYMBOL_SUFFIX=64_'] -+ - [tool.spin] - package = 'numpy' - - -From 9ce0d806a881c87a203efccf106cf5d3d6bb46e0 Mon Sep 17 00:00:00 2001 -From: mattip <matti.picus@gmail.com> -Date: Sun, 11 Jun 2023 16:28:35 +0300 -Subject: [PATCH 08/11] drop rtools in wheel builds, do - -DDBLAS_SYMBOL_SUFFIX=64_ differently - ---- - pyproject.toml | 8 +++----- - 2 files changed, 3 insertions(+), 16 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 6cef90c6962..a9d7f87b2b5 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -147,7 +147,7 @@ test-command = "bash {project}/tools/wheels/cibw_test_command.sh {project}" - manylinux-x86_64-image = "manylinux2014" - manylinux-aarch64-image = "manylinux2014" - musllinux-x86_64-image = "musllinux_1_1" --environment = { CFLAGS="-std=c99 -fno-strict-aliasing", LDFLAGS="-Wl,--strip-debug", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", RUNNER_OS="Linux" } -+environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DDBLAS_SYMBOL_SUFFIX=64_", LDFLAGS="-Wl,--strip-debug", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", RUNNER_OS="Linux" } - - [tool.cibuildwheel.macos] - # For universal2 wheels, we will need to fuse them manually -@@ -158,10 +158,10 @@ environment = { CFLAGS="-std=c99 -fno-strict-aliasing", LDFLAGS="-Wl,--strip-deb - archs = "x86_64 arm64" - test-skip = "*_universal2:arm64" - # MACOS linker doesn't support stripping symbols --environment = { CFLAGS="-std=c99 -fno-strict-aliasing", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", CC="clang", CXX = "clang++", RUNNER_OS="macOS" } -+environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DDBLAS_SYMBOL_SUFFIX=64_", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", CC="clang", CXX = "clang++", RUNNER_OS="macOS" } - - [tool.cibuildwheel.windows] --environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFLAGS="", LDFLAGS="" } -+environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFLAGS="-DDBLAS_SYMBOL_SUFFIX=64_", LDFLAGS="" } - - [[tool.cibuildwheel.overrides]] - select = "*-win32" -@@ -169,8 +169,6 @@ environment = { OPENBLAS64_="", OPENBLAS="openblas", NPY_USE_BLAS_ILP64="0", CFL - - [tool.meson-python.args] - setup = ['--vsenv'] --# This should not be set on 32-bit builds... --compile = ['-DBLAS_SYMBOL_SUFFIX=64_'] - - [tool.spin] - package = 'numpy' - -From 067e51454eeff3ce302144803baef92add308668 Mon Sep 17 00:00:00 2001 -From: mattip <matti.picus@gmail.com> -Date: Sun, 11 Jun 2023 17:05:02 +0300 -Subject: [PATCH 09/11] typo, install pkg-config on windows - ---- - pyproject.toml | 6 +++--- - 2 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index a9d7f87b2b5..a0b645938d1 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -147,7 +147,7 @@ test-command = "bash {project}/tools/wheels/cibw_test_command.sh {project}" - manylinux-x86_64-image = "manylinux2014" - manylinux-aarch64-image = "manylinux2014" - musllinux-x86_64-image = "musllinux_1_1" --environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DDBLAS_SYMBOL_SUFFIX=64_", LDFLAGS="-Wl,--strip-debug", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", RUNNER_OS="Linux" } -+environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DBLAS_SYMBOL_SUFFIX=64_", LDFLAGS="-Wl,--strip-debug", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", RUNNER_OS="Linux" } - - [tool.cibuildwheel.macos] - # For universal2 wheels, we will need to fuse them manually -@@ -158,10 +158,10 @@ environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DDBLAS_SYMBOL_SUFFIX=64_" - archs = "x86_64 arm64" - test-skip = "*_universal2:arm64" - # MACOS linker doesn't support stripping symbols --environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DDBLAS_SYMBOL_SUFFIX=64_", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", CC="clang", CXX = "clang++", RUNNER_OS="macOS" } -+environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DBLAS_SYMBOL_SUFFIX=64_", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", CC="clang", CXX = "clang++", RUNNER_OS="macOS" } - - [tool.cibuildwheel.windows] --environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFLAGS="-DDBLAS_SYMBOL_SUFFIX=64_", LDFLAGS="" } -+environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFLAGS="-DBLAS_SYMBOL_SUFFIX=64_", LDFLAGS="" } - - [[tool.cibuildwheel.overrides]] - select = "*-win32" - -From 9999c3f3a8c7facef77dc9859a8a25f39f14f7fd Mon Sep 17 00:00:00 2001 -From: mattip <matti.picus@gmail.com> -Date: Sun, 11 Jun 2023 22:18:57 +0300 -Subject: [PATCH 10/11] set PKG_CONFIG_PATH for windows, add CXXFLAGS - ---- - pyproject.toml | 6 +++--- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index a0b645938d1..32bde348d7d 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -147,7 +147,7 @@ test-command = "bash {project}/tools/wheels/cibw_test_command.sh {project}" - manylinux-x86_64-image = "manylinux2014" - manylinux-aarch64-image = "manylinux2014" - musllinux-x86_64-image = "musllinux_1_1" --environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DBLAS_SYMBOL_SUFFIX=64_", LDFLAGS="-Wl,--strip-debug", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", RUNNER_OS="Linux" } -+environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", LDFLAGS="-Wl,--strip-debug", CXXFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", RUNNER_OS="Linux"} - - [tool.cibuildwheel.macos] - # For universal2 wheels, we will need to fuse them manually -@@ -158,10 +158,10 @@ environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DBLAS_SYMBOL_SUFFIX=64_", - archs = "x86_64 arm64" - test-skip = "*_universal2:arm64" - # MACOS linker doesn't support stripping symbols --environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DBLAS_SYMBOL_SUFFIX=64_", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", CC="clang", CXX = "clang++", RUNNER_OS="macOS" } -+environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", CXXFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", CC="clang", CXX = "clang++", RUNNER_OS="macOS"} - - [tool.cibuildwheel.windows] --environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFLAGS="-DBLAS_SYMBOL_SUFFIX=64_", LDFLAGS="" } -+environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", CXXFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", LDFLAGS=""} - - [[tool.cibuildwheel.overrides]] - select = "*-win32" - -From ffcd334bd9da7ce4779e79636ecd047e2f20dd5b Mon Sep 17 00:00:00 2001 -From: mattip <matti.picus@gmail.com> -Date: Sun, 11 Jun 2023 23:17:00 +0300 -Subject: [PATCH 11/11] disable pypy builds, move PKG_CONFIG_PATH for windows - ---- - pyproject.toml | 4 ++-- - 3 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 32bde348d7d..55065d1362f 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -161,11 +161,11 @@ test-skip = "*_universal2:arm64" - environment = { CFLAGS="-std=c99 -fno-strict-aliasing -DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", CXXFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", OPENBLAS64_="/usr/local", NPY_USE_BLAS_ILP64="1", CC="clang", CXX = "clang++", RUNNER_OS="macOS"} - - [tool.cibuildwheel.windows] --environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", CXXFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", LDFLAGS=""} -+environment = { OPENBLAS64_="openblas", OPENBLAS="", NPY_USE_BLAS_ILP64="1", CFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", CXXFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64", LDFLAGS="", PKG_CONFIG_PATH="D:\\a\\numpy\\numpy\\openblas\\lib\\pkgconfig;"} - - [[tool.cibuildwheel.overrides]] - select = "*-win32" --environment = { OPENBLAS64_="", OPENBLAS="openblas", NPY_USE_BLAS_ILP64="0", CFLAGS="-m32", LDFLAGS="-m32" } -+environment = { OPENBLAS64_="", OPENBLAS="openblas", NPY_USE_BLAS_ILP64="0", CFLAGS="-m32", LDFLAGS="-m32", PKG_CONFIG_PATH="D:\\a\\numpy\\numpy\\openblas\\lib\\pkgconfig;"} - - [tool.meson-python.args] - setup = ['--vsenv'] diff --git a/dev-python/numpy/files/numpy-1.25.1-fix-scalartypes.patch b/dev-python/numpy/files/numpy-1.25.1-fix-scalartypes.patch deleted file mode 100644 index aa381d243d88..000000000000 --- a/dev-python/numpy/files/numpy-1.25.1-fix-scalartypes.patch +++ /dev/null @@ -1,69 +0,0 @@ -https://bugs.gentoo.org/910739 -https://github.com/numpy/numpy/issues/24239 -https://github.com/numpy/numpy/pull/24240 -https://github.com/numpy/numpy/commit/d9c0c96582373de0990908c89ed75ae16279e8e5 - -From d9c0c96582373de0990908c89ed75ae16279e8e5 Mon Sep 17 00:00:00 2001 -From: Sam James <sam@gentoo.org> -Date: Sun, 23 Jul 2023 21:31:08 +0100 -Subject: [PATCH] BUG: Fix C types in scalartypes - -https://github.com/numpy/numpy/pull/23746 introduced a fast path for scalar -int conversions, but the map between Python types and C types was subtly -wrong. - -This fixes tests on at least ppc32 (big-endian). - -Many thanks to Sebastian Berg for debugging this with me and pointing out -what needed to be fixed. - -Closes #24239. - -Fixes: 81caed6e3c34c4bf4b22b4f6167e816ba2a3f73c ---- a/numpy/core/src/multiarray/scalartypes.c.src -+++ b/numpy/core/src/multiarray/scalartypes.c.src -@@ -283,34 +283,34 @@ genint_type_str(PyObject *self) - void *val = scalar_value(self, descr); - switch (descr->type_num) { - case NPY_BYTE: -- item = PyLong_FromLong(*(int8_t *)val); -+ item = PyLong_FromLong(*(npy_byte *)val); - break; - case NPY_UBYTE: -- item = PyLong_FromUnsignedLong(*(uint8_t *)val); -+ item = PyLong_FromUnsignedLong(*(npy_ubyte *)val); - break; - case NPY_SHORT: -- item = PyLong_FromLong(*(int16_t *)val); -+ item = PyLong_FromLong(*(npy_short *)val); - break; - case NPY_USHORT: -- item = PyLong_FromUnsignedLong(*(uint16_t *)val); -+ item = PyLong_FromUnsignedLong(*(npy_ushort *)val); - break; - case NPY_INT: -- item = PyLong_FromLong(*(int32_t *)val); -+ item = PyLong_FromLong(*(npy_int *)val); - break; - case NPY_UINT: -- item = PyLong_FromUnsignedLong(*(uint32_t *)val); -+ item = PyLong_FromUnsignedLong(*(npy_uint *)val); - break; - case NPY_LONG: -- item = PyLong_FromLong(*(int64_t *)val); -+ item = PyLong_FromLong(*(npy_long *)val); - break; - case NPY_ULONG: -- item = PyLong_FromUnsignedLong(*(uint64_t *)val); -+ item = PyLong_FromUnsignedLong(*(npy_ulong *)val); - break; - case NPY_LONGLONG: -- item = PyLong_FromLongLong(*(long long *)val); -+ item = PyLong_FromLongLong(*(npy_longlong *)val); - break; - case NPY_ULONGLONG: -- item = PyLong_FromUnsignedLongLong(*(unsigned long long *)val); -+ item = PyLong_FromUnsignedLongLong(*(npy_ulonglong *)val); - break; - default: - item = gentype_generic_method(self, NULL, NULL, "item"); diff --git a/dev-python/numpy/files/numpy-1.26.0_beta1-npy_cast_info.patch b/dev-python/numpy/files/numpy-1.26.0_beta1-npy_cast_info.patch deleted file mode 100644 index cd09573deb7f..000000000000 --- a/dev-python/numpy/files/numpy-1.26.0_beta1-npy_cast_info.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 9cfb416aad45260e1cc837029638d6b39cea9e38 Mon Sep 17 00:00:00 2001 -From: Nathan Goldbaum <nathan.goldbaum@gmail.com> -Date: Mon, 21 Aug 2023 15:45:11 -0600 -Subject: [PATCH] BUG: fix NPY_cast_info error handling in choose - ---- - numpy/core/src/multiarray/item_selection.c | 2 +- - numpy/core/tests/test_multiarray.py | 6 ++++++ - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/numpy/core/src/multiarray/item_selection.c b/numpy/core/src/multiarray/item_selection.c -index e935a27edb6..c1d4a950815 100644 ---- a/numpy/core/src/multiarray/item_selection.c -+++ b/numpy/core/src/multiarray/item_selection.c -@@ -968,6 +968,7 @@ PyArray_Choose(PyArrayObject *ip, PyObject *op, PyArrayObject *out, - PyArrayObject **mps, *ap; - PyArrayMultiIterObject *multi = NULL; - npy_intp mi; -+ NPY_cast_info cast_info = {.func = NULL}; - ap = NULL; - - /* -@@ -1045,7 +1046,6 @@ PyArray_Choose(PyArrayObject *ip, PyObject *op, PyArrayObject *out, - npy_intp transfer_strides[2] = {elsize, elsize}; - npy_intp one = 1; - NPY_ARRAYMETHOD_FLAGS transfer_flags = 0; -- NPY_cast_info cast_info = {.func = NULL}; - if (PyDataType_REFCHK(dtype)) { - int is_aligned = IsUintAligned(obj); - PyArray_GetDTypeTransferFunction( -diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py -index 966b75cc122..2836c8985c9 100644 ---- a/numpy/core/tests/test_multiarray.py -+++ b/numpy/core/tests/test_multiarray.py -@@ -10043,3 +10043,9 @@ def test_gh_22683(): - np.choose(np.zeros(10000, dtype=int), [a], out=a) - refc_end = sys.getrefcount(b) - assert refc_end - refc_start < 10 -+ -+ -+def test_gh_24459(): -+ a = np.zeros((50, 3), dtype=np.float64) -+ with pytest.raises(TypeError): -+ np.choose(a, [3, -1]) diff --git a/dev-python/numpy/files/replace_cpuflags.awk b/dev-python/numpy/files/replace_cpuflags.awk deleted file mode 100644 index 11b8bd53b2c3..000000000000 --- a/dev-python/numpy/files/replace_cpuflags.awk +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/awk -f - -{ - GENTOO_ENABLE=1; - if (match($0, /flags="([^"=]*)"/, cflags)) { - split(cflags[1], fields); - for (i in fields) { - if (match(fields[i], /-m([[:graph:]]*)/, inst)) { - if (!index(enabled_flags, inst[1])) { - GENTOO_ENABLE=0; - }}}} - if (!GENTOO_ENABLE) { sub(cflags[1], "-mGENTOO_DISABLE"); } - print; -} |