diff mbox series

[4/5] package/python-scipy: bump to version 1.11.0

Message ID 20230626181531.2312002-4-james.hilliard1@gmail.com
State Accepted
Headers show
Series [1/5] package/python-numpy: bump to version 1.25.0 | expand

Commit Message

James Hilliard June 26, 2023, 6:15 p.m. UTC
Migrate to meson package infrastructure.

Add new openblas dependency.

License hash changed due to date update:
https://github.com/scipy/scipy/commit/d3f0aea40f64e478085b6478a9fe55ca8a75b087

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/python-scipy/Config.in         |  3 +++
 package/python-scipy/python-scipy.hash |  5 ++--
 package/python-scipy/python-scipy.mk   | 37 +++++++++-----------------
 3 files changed, 18 insertions(+), 27 deletions(-)

Comments

Thomas Petazzoni Sept. 30, 2023, 12:40 p.m. UTC | #1
On Mon, 26 Jun 2023 12:15:30 -0600
James Hilliard <james.hilliard1@gmail.com> wrote:

> Migrate to meson package infrastructure.
> 
> Add new openblas dependency.
> 
> License hash changed due to date update:
> https://github.com/scipy/scipy/commit/d3f0aea40f64e478085b6478a9fe55ca8a75b087
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
>  package/python-scipy/Config.in         |  3 +++
>  package/python-scipy/python-scipy.hash |  5 ++--
>  package/python-scipy/python-scipy.mk   | 37 +++++++++-----------------
>  3 files changed, 18 insertions(+), 27 deletions(-)

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/python-scipy/Config.in b/package/python-scipy/Config.in
index 229b5997ad..0a4acb9699 100644
--- a/package/python-scipy/Config.in
+++ b/package/python-scipy/Config.in
@@ -2,10 +2,12 @@  config BR2_PACKAGE_PYTHON_SCIPY
 	bool "python-scipy"
 	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS # python-numpy
 	depends on BR2_PACKAGE_LAPACK_ARCH_SUPPORTS # lapack
+	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS # openblas
 	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
 	depends on BR2_TOOLCHAIN_HAS_FORTRAN # lapack
 	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_LAPACK
+	select BR2_PACKAGE_OPENBLAS
 	select BR2_PACKAGE_PYTHON3_ZLIB # runtime scipy::io
 	select BR2_PACKAGE_PYTHON_NUMPY # runtime
 	select BR2_PACKAGE_PYTHON_PYBIND
@@ -20,6 +22,7 @@  config BR2_PACKAGE_PYTHON_SCIPY
 comment "python-scipy needs toolchain w/ fortran and c++ and glibc or musl"
 	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_LAPACK_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
 	depends on !BR2_TOOLCHAIN_HAS_FORTRAN || \
 		!BR2_INSTALL_LIBSTDCPP || \
 		(!BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL)
diff --git a/package/python-scipy/python-scipy.hash b/package/python-scipy/python-scipy.hash
index 0274679c43..9634771139 100644
--- a/package/python-scipy/python-scipy.hash
+++ b/package/python-scipy/python-scipy.hash
@@ -1,7 +1,6 @@ 
 # Locally generated
-sha256  0140dd24d14ce194fdb3df496c2190f0896ca84ac98bf5d69c3b3fb7bde1a1e9  scipy-1.8.1.tar.xz
-sha256  96599f8ec69a2cc609265eed13fc75090aacb28742260e55ce623788a33da19c  LICENSE.txt
-sha256  37e64a498894ac7c3b070023e3689e954a8ecf8a23b90968d09a455f1b4f7b35  scipy/linalg/src/lapack_deprecations/LICENSE
+sha256  f9b0248cb9d08eead44cde47cbf6339f1e9aa0dfde28f5fb27950743e317bd5d  scipy-1.11.0.tar.gz
+sha256  5517022426a56179540ee6eace15fd723ef8fdb83b2900fed2152dd2e2f972a2  LICENSE.txt
 sha256  606209a000716c5f66e33e180ce08434b96ed17db4975ab9723c6b5fbcc89609  scipy/ndimage/LICENSE.txt
 sha256  3df9207af2fdb861af0ae3b22026f163b9bcfab4e525dc4943afe2ffa3f77624  scipy/optimize/tnc/LICENSE
 sha256  f0cedf52503b2d42b83411a0a16e6fefac346dfad8fddc66f50050150123470c  scipy/sparse/linalg/_dsolve/SuperLU/License.txt
diff --git a/package/python-scipy/python-scipy.mk b/package/python-scipy/python-scipy.mk
index a8c23c6c88..3010cfbd54 100644
--- a/package/python-scipy/python-scipy.mk
+++ b/package/python-scipy/python-scipy.mk
@@ -4,9 +4,9 @@ 
 #
 ################################################################################
 
-PYTHON_SCIPY_VERSION = 1.8.1
-PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.xz
-PYTHON_SCIPY_SITE = https://github.com/scipy/scipy/releases/download/v$(PYTHON_SCIPY_VERSION)
+PYTHON_SCIPY_VERSION = 1.11.0
+PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.gz
+PYTHON_SCIPY_SITE = https://files.pythonhosted.org/packages/fa/d0/724c8204f87b6f807e3e67de32b8b4922d579154a448ce94e89129064bf1
 PYTHON_SCIPY_LICENSE = \
 	BSD-3-Clause, \
 	BSD-2-Clause, \
@@ -16,7 +16,6 @@  PYTHON_SCIPY_LICENSE = \
 	Qhull
 PYTHON_SCIPY_LICENSE_FILES = \
 	LICENSE.txt \
-	scipy/linalg/src/lapack_deprecations/LICENSE \
 	scipy/ndimage/LICENSE.txt \
 	scipy/optimize/tnc/LICENSE \
 	scipy/sparse/linalg/_dsolve/SuperLU/License.txt \
@@ -25,34 +24,24 @@  PYTHON_SCIPY_LICENSE_FILES = \
 PYTHON_SCIPY_CPE_ID_VENDOR = scipy
 PYTHON_SCIPY_CPE_ID_PRODUCT = scipy
 PYTHON_SCIPY_DEPENDENCIES += \
+	host-python-cython \
 	host-python-numpy \
 	host-python-pythran \
 	zlib \
 	lapack \
+	openblas \
+	python3 \
 	python-numpy \
 	python-pybind
 PYTHON_SCIPY_INSTALL_STAGING = YES
 
-PYTHON_SCIPY_SETUP_TYPE = setuptools
-PYTHON_SCIPY_BUILD_OPTS = config_fc --fcompiler=gnu95
+PYTHON_SCIPY_CONF_ENV += \
+	_PYTHON_SYSCONFIGDATA_NAME=$(PKG_PYTHON_SYSCONFIGDATA_NAME) \
+	PYTHONPATH=$(PYTHON3_PATH)
 
-PYTHON_SCIPY_LDFLAGS = $(TARGET_LDFLAGS) -shared \
-	-L$(PYTHON3_PATH)/site-packages/numpy/core/lib
-# -lnpyrandom localization
-PYTHON_SCIPY_LDFLAGS += \
-	-L$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy/random/lib
+PYTHON_SCIPY_CONF_OPTS = -Dblas=openblas -Dlapack=lapack
 
-PYTHON_SCIPY_ENV = \
-	F90=$(TARGET_FC) \
-	LDFLAGS="$(PYTHON_SCIPY_LDFLAGS)"
+PYTHON_SCIPY_MESON_EXTRA_PROPERTIES = \
+	numpy-include-dir='$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy/core/include'
 
-# Provide system configuration options to numpy distutils extensions, telling
-# to find all include files and libraries in staging directory.
-define PYTHON_SCIPY_CONFIGURE_CMDS
-	-rm -f $(@D)/site.cfg
-	echo "[DEFAULT]" >> $(@D)/site.cfg
-	echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg
-	echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg
-endef
-
-$(eval $(python-package))
+$(eval $(meson-package))