numpy: bump to version 2.2.1

Dropped:
  003-without-vendored-meson.patch
  004-workaround-for-multiple-top-level-packages-discovered.patch

This time, we really need to use meson to build numpy.
And to make things more complicated, the 'vendored' meson package (that
comes with numpy) must be used. This is because they have some special
logic in there that's specific to numpy.

With this change, we also need to keep a special/internal
'openwrt-cross.txt.in' file, because cross-compiling numpy also requires
that a 'longdouble_format' property be added.
More details about this:
   https://github.com/numpy/numpy/issues/23972
   https://github.com/numpy/numpy/blob/maintenance/2.2.x/doc/source/building/cross_compilation.rst

Removing quirk fix for x86_64 with detecting 'avx512f'.
This should work with the new meson stuff.

And finally, added a test.sh script.
This should make sure that this package works fine during upgrades.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean
2024-12-24 14:28:02 +02:00
committed by Alexandru Ardelean
parent dc273bfa44
commit 7b4ee2dabf
6 changed files with 82 additions and 55 deletions

View File

@@ -1,6 +1,6 @@
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -404,7 +404,7 @@ def get_standard_file(fname):
@@ -403,7 +403,7 @@ def get_standard_file(fname):
pass
else:
user_file = os.path.join(f, fname)

View File

@@ -1,34 +0,0 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
[build-system]
-build-backend = "mesonpy"
+#build-backend = "mesonpy"
requires = [
- "meson-python>=0.15.0",
+# "meson-python>=0.15.0",
"Cython>=3.0.6", # keep in sync with version check in meson.build
]
@@ -181,8 +181,8 @@ select = "*-win32"
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=true build-dir=build"
repair-wheel-command = ""
-[tool.meson-python]
-meson = 'vendored-meson/meson/meson.py'
+#[tool.meson-python]
+#meson = 'vendored-meson/meson/meson.py'
[tool.meson-python.args]
install = ['--tags=runtime,python-runtime,tests,devel']
@@ -190,8 +190,8 @@ install = ['--tags=runtime,python-runtim
[tool.spin]
package = 'numpy'
-[tool.spin.meson]
-cli = 'vendored-meson/meson/meson.py'
+#[tool.spin.meson]
+#cli = 'vendored-meson/meson/meson.py'
[tool.spin.commands]
"Build" = [

View File

@@ -1,12 +0,0 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -59,6 +59,9 @@ download = "https://pypi.org/project/num
tracker = "https://github.com/numpy/numpy/issues"
"release notes" = "https://numpy.org/doc/stable/release"
+[tool.setuptools]
+py-modules = []
+
[tool.towncrier]
single_file = false
filename = "doc/source/release/notes-towncrier.rst"