package/python-numpy: bump to version 1.26.4
PATCH v6 1/2 package/python-numpy: bump to version 1.26.4
Add new supported architectures.
License hash changed due to date update:
https://github.com/numpy/numpy/commit/c1ffdbc0c29d48ece717acb5bfbf811c935b41f6
We need to build python-numpy with its vendored version of meson as it currently relies on features that are not yet upstream. To do this we can simply set the PYTHONPATH with the vendored meson path before the normal PYTHON3_PATH so that the vendored version will have precedence. We need to set this for both host and target numpy.
We also need to set the architecture specific longdouble_format property as numpy is unable to determine the value for this without being able to execute target binaries.
---
Changes v5 -> v6:
- add comment about test program
- add missing BR2_i386 long double format
- remove duplicate BR2_armeb
Changes v4 -> v5:
- Add new architectures
- fixup longdouble option
--- package/python-numpy/Config.in | 6 +++ package/python-numpy/python-numpy.hash | 7 +-- package/python-numpy/python-numpy.mk | 62 ++++++++++++++++++++++++-- 3 files changed, 69 insertions(+), 6 deletions(-)
package/python-numpy/Config.in +6 -0
@@ -3,15 +3,21 @@ config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS # Numpy has some CPU specific code default y if BR2_arc default y if BR2_aarch64 + default y if BR2_aarch64_be default y if BR2_arm default y if BR2_armeb default y if BR2_i386 + default y if BR2_m68k default y if BR2_mips default y if BR2_mipsel + default y if BR2_or1k default y if BR2_powerpc default y if BR2_powerpc64 + default y if BR2_powerpc64le default y if BR2_riscv default y if BR2_sh + default y if BR2_sparc + default y if BR2_sparc64 default y if BR2_x86_64 config BR2_PACKAGE_PYTHON_NUMPY
package/python-numpy/python-numpy.hash +4 -3
@@ -1,7 +1,8 @@ -# Copied from https://github.com/numpy/numpy/releases/tag/v1.25.0 -sha256 f1accae9a28dc3cda46a91de86acf69de0d1b5f4edd44a9b0c3ceb8036dfff19 numpy-1.25.0.tar.gz +# md5, sha256 from https://pypi.org/pypi/numpy/json +md5 19550cbe7bedd96a928da9d4ad69509d numpy-1.26.4.tar.gz +sha256 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010 numpy-1.26.4.tar.gz # License files, locally calculated -sha256 1034d3bd61783f3b5e7ec3e7ca818f4da4135132323a0ef99f4c0edb3c7f6bd2 LICENSE.txt +sha256 263223390c43a9d4a0841e0209265fd927a198f8e89c8eee809b7437d7e5e8c2 LICENSE.txt sha256 c27d0a8026bdb8876562b720ab24d1688e3827a89f6083cd6e7e8caa9584aba3 numpy/core/src/multiarray/dragon4.c sha256 fbc539f47d0cf83bc61378080fb873d5c14630126cacbfe754035c3926daa5ec numpy/core/include/numpy/libdivide/LICENSE.txt sha256 a14cc25e10d40a3aa705b7de2fb764a6535d8ee9b2db4e1724900585457dfd55 numpy/linalg/lapack_lite/LICENSE.txt
package/python-numpy/python-numpy.mk +59 -3
81 lines not on this page · raw message
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 2/2 package/python-scipy: bump to version 1.12.0
License hash changed due to date update:
https://github.com/scipy/scipy/commit/0ace7295322148d74932bee32b0647e29c38fc8a
--- package/python-scipy/python-scipy.hash | 6 +++--- package/python-scipy/python-scipy.mk | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
package/python-scipy/python-scipy.hash +3 -3
@@ -1,8 +1,8 @@ # md5, sha256 from https://pypi.org/pypi/scipy/json -md5 0e8eea0f7c4fe7d8102366230c96d66d scipy-1.11.4.tar.gz -sha256 90a2b78e7f5733b9de748f589f09225013685f9b218275257f8a8168ededaeaa scipy-1.11.4.tar.gz +md5 22683fcf9a411f0a5254b7509bea0a6b scipy-1.12.0.tar.gz +sha256 4bf5abab8a36d20193c698b0f1fc282c1d083c94723902c447e5d2f1780936a3 scipy-1.12.0.tar.gz # Locally computed sha256 checksums -sha256 5517022426a56179540ee6eace15fd723ef8fdb83b2900fed2152dd2e2f972a2 LICENSE.txt +sha256 c29fb8e5936f33237a8b15256b4c6e93037f05bbf58c3d7b5755aede4c200173 LICENSE.txt sha256 606209a000716c5f66e33e180ce08434b96ed17db4975ab9723c6b5fbcc89609 scipy/ndimage/LICENSE.txt sha256 3df9207af2fdb861af0ae3b22026f163b9bcfab4e525dc4943afe2ffa3f77624 scipy/optimize/tnc/LICENSE sha256 f0cedf52503b2d42b83411a0a16e6fefac346dfad8fddc66f50050150123470c scipy/sparse/linalg/_dsolve/SuperLU/License.txt
package/python-scipy/python-scipy.mk +2 -2
@@ -4,9 +4,9 @@ # ################################################################################ -PYTHON_SCIPY_VERSION = 1.11.4 +PYTHON_SCIPY_VERSION = 1.12.0 PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.gz -PYTHON_SCIPY_SITE = https://files.pythonhosted.org/packages/6e/1f/91144ba78dccea567a6466262922786ffc97be1e9b06ed9574ef0edc11e1 +PYTHON_SCIPY_SITE = https://files.pythonhosted.org/packages/30/85/cdbf2c3c460fe5aae812917866392068a88d02f07de0fe31ce738734c477 PYTHON_SCIPY_LICENSE = \ BSD-3-Clause, \ BSD-2-Clause, \
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello James, All,
Le 26/10/2024 à 23:47, James Hilliard a écrit :
Quoted 11 lines
Add new supported architectures.
License hash changed due to date update:
https://github.com/numpy/numpy/commit/c1ffdbc0c29d48ece717acb5bfbf811c935b41f6We need to build python-numpy with its vendored version of meson as it currently relies on features that are not yet upstream. To do this we can simply set the PYTHONPATH with the vendored meson path before the normal
PYTHON3_PATHso that the vendored version will have precedence. We need to set this for both host and target numpy.
Quoted 6 lines
We also need to set the architecture specific
longdouble_formatproperty as numpy is unable to determine the value for this without being able to execute target binaries.
python-numpy is broken since a while (since 2024-03-07 as of the first autobuilder report [1]), see [2]. The Buildroot testsuite provide a testcase TestPythonPy3SciPy to verify the build and chech scipy at runtime, but even with the v6 this test is broken:
scipy/interpolate/dfitpackmodule.c:2728:30: error: passing argument 1 of
'f2py_func' from incompatible pointer type [-Wincompatible-pointer-types]
2728 |
(*f2py_func)(&iopt,x,y,w,&m,&xb,&xe,&k,&s,&nest,&tol,&maxit,&k1,&k2,&n,t,c,&fp,fpint,wrk,wrk+nest,wrk+nest*k2,wrk+nest*2*k2,wrk+nest*3*k2,nrdata,&ier) ;
Note: TestPythonPy3SciPy is now broken on 2024.02.8 [3].
I tried by using the latest python-scipy release 1.14.1 but since this release the scipy build system is looking for f2py script in HOST_DIR.
But f2py is not instally by host-python-numpy since the switch to meson package infrastructure. Actually f2py would be installed by host-python-numpy if it was a host-python-package. Is meson-package infrastructure correct for numpy? When build with python-package infrastructure, numpy requires host-python-meson-python.
So, python-numpy 1.26.4 build as python package (to install f2py) and python-scipy 1.14.1 allows to pass TestPythonPy3SciPy.
Can you have a look?
[1]
http://autobuild.buildroot.org/results/797/7970339ae037aa408da390dc9b3a379f67a80d02/build-end.log
[2] http://autobuild.buildroot.org/?reason=python-numpy-1.25.0
[3] https://gitlab.com/buildroot.org/buildroot/-/jobs/8367196688 (2024.02.8)
[4] https://github.com/scipy/scipy/commit/d85ba6b910ea9040b6a72bdc4ea87d151118f41d
Best regards,
Romain
Quoted 136 lines
Signed-off-by James Hilliard <[email protected]>---
Changes v5 -> v6:
- add comment about test program
- add missingBR2_i386long double format
- remove duplicateBR2_armeb
Changes v4 -> v5:
- Add new architectures
- fixup longdouble option--- package/python-numpy/Config.in | 6 +++ package/python-numpy/python-numpy.hash | 7 +-- package/python-numpy/python-numpy.mk | 62 ++++++++++++++++++++++++-- 3 files changed, 69 insertions(+), 6 deletions(-)package/python-numpy/Config.in +6
-0@@ -3,15 +3,21 @@ config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS # Numpy has some CPU specific code default y if BR2_arc default y if BR2_aarch64 + default y if BR2_aarch64_be default y if BR2_arm default y if BR2_armeb default y if BR2_i386 + default y if BR2_m68k default y if BR2_mips default y if BR2_mipsel + default y if BR2_or1k default y if BR2_powerpc default y if BR2_powerpc64 + default y if BR2_powerpc64le default y if BR2_riscv default y if BR2_sh + default y if BR2_sparc + default y if BR2_sparc64 default y if BR2_x86_64 config BR2_PACKAGE_PYTHON_NUMPYpackage/python-numpy/python-numpy.hash +4
-3@@ -1,7 +1,8 @@ -# Copied from https://github.com/numpy/numpy/releases/tag/v1.25.0 -sha256 f1accae9a28dc3cda46a91de86acf69de0d1b5f4edd44a9b0c3ceb8036dfff19 numpy-1.25.0.tar.gz +# md5, sha256 from https://pypi.org/pypi/numpy/json +md5 19550cbe7bedd96a928da9d4ad69509d numpy-1.26.4.tar.gz +sha256 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010 numpy-1.26.4.tar.gz # License files, locally calculated -sha256 1034d3bd61783f3b5e7ec3e7ca818f4da4135132323a0ef99f4c0edb3c7f6bd2 LICENSE.txt +sha256 263223390c43a9d4a0841e0209265fd927a198f8e89c8eee809b7437d7e5e8c2 LICENSE.txt sha256 c27d0a8026bdb8876562b720ab24d1688e3827a89f6083cd6e7e8caa9584aba3 numpy/core/src/multiarray/dragon4.c sha256 fbc539f47d0cf83bc61378080fb873d5c14630126cacbfe754035c3926daa5ec numpy/core/include/numpy/libdivide/LICENSE.txt sha256 a14cc25e10d40a3aa705b7de2fb764a6535d8ee9b2db4e1724900585457dfd55 numpy/linalg/lapack_lite/LICENSE.txtpackage/python-numpy/python-numpy.mk +52
-3@@ -4,9 +4,9 @@ # ################################################################################ -PYTHON_NUMPY_VERSION = 1.25.0 +PYTHON_NUMPY_VERSION = 1.26.4 PYTHON_NUMPY_SOURCE = numpy-$(PYTHON_NUMPY_VERSION).tar.gz -PYTHON_NUMPY_SITE = https://github.com/numpy/numpy/releases/download/v$(PYTHON_NUMPY_VERSION) +PYTHON_NUMPY_SITE = https://files.pythonhosted.org/packages/65/6e/09db70a523a96d25e115e71cc56a6f9031e7b8cd166c1ac8438307c14058 PYTHON_NUMPY_LICENSE = BSD-3-Clause, MIT, Zlib PYTHON_NUMPY_LICENSE_FILES = \ LICENSE.txt \@@ -22,7 +22,10 @@ HOST_PYTHON_NUMPY_DEPENDENCIES = host-python-cython PYTHON_NUMPY_CONF_ENV += \ _PYTHON_SYSCONFIGDATA_NAME=$(PKG_PYTHON_SYSCONFIGDATA_NAME) \ - PYTHONPATH=$(PYTHON3_PATH) + PYTHONPATH="$(@D)/vendored-meson/meson:$(PYTHON3_PATH)" + +PYTHON_NUMPY_NINJA_ENV += \ + PYTHONPATH="$(@D)/vendored-meson/meson:$(PYTHON3_PATH)" ifeq ($(BR2_PACKAGE_LAPACK),y) PYTHON_NUMPY_DEPENDENCIES += lapack@@ -38,6 +41,59 @@ else PYTHON_NUMPY_CONF_OPTS += -Dblas="" endif +# Generated by running this test program under QEMU: +# https://github.com/numpy/numpy/blob/v1.26.4/numpy/core/meson.build#L376-L455 +ifeq ($(BR2_arcle),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_LE +else ifeq ($(BR2_arceb),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_BE +else ifeq ($(BR2_aarch64),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_QUAD_LE +else ifeq ($(BR2_aarch64_be),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_QUAD_BE +else ifeq ($(BR2_arm),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_LE +else ifeq ($(BR2_armeb),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_BE +else ifeq ($(BR2_i386),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = INTEL_EXTENDED_12_BYTES_LE +else ifeq ($(BR2_or1k),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_BE +else ifeq ($(BR2_m68k),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = MOTOROLA_EXTENDED_12_BYTES_BE +else ifeq ($(BR2_mips),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_BE +else ifeq ($(BR2_mipsel),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_LE +else ifeq ($(BR2_powerpc),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IBM_DOUBLE_DOUBLE_BE +else ifeq ($(BR2_powerpc64),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IBM_DOUBLE_DOUBLE_BE +else ifeq ($(BR2_powerpc64le),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IBM_DOUBLE_DOUBLE_LE +else ifeq ($(BR2_riscv),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_QUAD_LE +else ifeq ($(BR2_sh4)$(BR2_sh4a),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_LE +else ifeq ($(BR2_sh4eb)$(BR2_sh4aeb),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_BE +else ifeq ($(BR2_sparc),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_DOUBLE_BE +else ifeq ($(BR2_sparc64),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = IEEE_QUAD_BE +else ifeq ($(BR2_x86_64),y) +PYTHON_NUMPY_LONGDOUBLE_FORMAT = INTEL_EXTENDED_16_BYTES_LE +endif + +PYTHON_NUMPY_MESON_EXTRA_PROPERTIES = \ + longdouble_format='$(PYTHON_NUMPY_LONGDOUBLE_FORMAT)'
package/python-numpy/python-numpy.mk else · line 99
Quoted 10 lines
package/python-numpy/python-numpy.mk +7
-0+ +HOST_PYTHON_NUMPY_CONF_ENV += \ + PYTHONPATH="$(@D)/vendored-meson/meson:$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)" + +HOST_PYTHON_NUMPY_NINJA_ENV += \ + PYTHONPATH="$(@D)/vendored-meson/meson:$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)" + # Rather than add a host-blas or host-lapack dependencies, just use unoptimized, # in-tree code. HOST_PYTHON_NUMPY_CONF_OPTS = -Dblas="" -Dlapack=""
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot