diff mbox series

[v2,1/1] package/python-scipy: bump version to 1.9.1

Message ID 20221002082651.29673-1-guillaume.bressaix@gmail.com
State Superseded
Headers show
Series [v2,1/1] package/python-scipy: bump version to 1.9.1 | expand

Commit Message

Guillaume Bres Oct. 2, 2022, 8:26 a.m. UTC
scipy.tar.xz is no longer released.

A new "python.h" missing header build time failure arised,
it is fixed with a new -I cflag.

New runtime/linking errors appeared on architectures that need
libatomic, an -latomic linker flag solves them

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>

---
Scipy is expected to move to a meson build infrastructure
by the next release
Once 1.9.2 is out, we know we already have my V3-1.9.1 patch
serie that builds "fine" with meson, it involved a minor tweak
(hopefuly solved by this time). The test script no longer did pass though,
this serie is not 100% ready to go
---
 package/python-scipy/python-scipy.hash |  2 +-
 package/python-scipy/python-scipy.mk   | 13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni Sept. 30, 2023, 12:42 p.m. UTC | #1
On Sun,  2 Oct 2022 10:26:51 +0200
"Guillaume W. Bres" <guillaume.bressaix@gmail.com> wrote:

> scipy.tar.xz is no longer released.
> 
> A new "python.h" missing header build time failure arised,
> it is fixed with a new -I cflag.
> 
> New runtime/linking errors appeared on architectures that need
> libatomic, an -latomic linker flag solves them
> 
> Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
> 
> ---
> Scipy is expected to move to a meson build infrastructure
> by the next release
> Once 1.9.2 is out, we know we already have my V3-1.9.1 patch
> serie that builds "fine" with meson, it involved a minor tweak
> (hopefuly solved by this time). The test script no longer did pass though,
> this serie is not 100% ready to go
> ---
>  package/python-scipy/python-scipy.hash |  2 +-
>  package/python-scipy/python-scipy.mk   | 13 +++++++++++--
>  2 files changed, 12 insertions(+), 3 deletions(-)

Thanks Guillaume for the patch, and sorry for the very long delay. In
the mean time, James has posted a more recent update, which uses the
meson infrastructure, so we've applied that as commit
42127f01bc08211e1dbba2cac7425488dee7dc3a.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/python-scipy/python-scipy.hash b/package/python-scipy/python-scipy.hash
index 0274679c43..1ba239aabf 100644
--- a/package/python-scipy/python-scipy.hash
+++ b/package/python-scipy/python-scipy.hash
@@ -1,5 +1,5 @@ 
 # Locally generated
-sha256  0140dd24d14ce194fdb3df496c2190f0896ca84ac98bf5d69c3b3fb7bde1a1e9  scipy-1.8.1.tar.xz
+sha256  26d28c468900e6d5fdb37d2812ab46db0ccd22c63baa095057871faa3a498bc9  scipy-1.9.1.tar.gz
 sha256  96599f8ec69a2cc609265eed13fc75090aacb28742260e55ce623788a33da19c  LICENSE.txt
 sha256  37e64a498894ac7c3b070023e3689e954a8ecf8a23b90968d09a455f1b4f7b35  scipy/linalg/src/lapack_deprecations/LICENSE
 sha256  606209a000716c5f66e33e180ce08434b96ed17db4975ab9723c6b5fbcc89609  scipy/ndimage/LICENSE.txt
diff --git a/package/python-scipy/python-scipy.mk b/package/python-scipy/python-scipy.mk
index a8c23c6c88..d45b14c4fa 100644
--- a/package/python-scipy/python-scipy.mk
+++ b/package/python-scipy/python-scipy.mk
@@ -4,8 +4,8 @@ 
 #
 ################################################################################
 
-PYTHON_SCIPY_VERSION = 1.8.1
-PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.xz
+PYTHON_SCIPY_VERSION = 1.9.1
+PYTHON_SCIPY_SOURCE = scipy-$(PYTHON_SCIPY_VERSION).tar.gz
 PYTHON_SCIPY_SITE = https://github.com/scipy/scipy/releases/download/v$(PYTHON_SCIPY_VERSION)
 PYTHON_SCIPY_LICENSE = \
 	BSD-3-Clause, \
@@ -36,14 +36,23 @@  PYTHON_SCIPY_INSTALL_STAGING = YES
 PYTHON_SCIPY_SETUP_TYPE = setuptools
 PYTHON_SCIPY_BUILD_OPTS = config_fc --fcompiler=gnu95
 
+PYTHON_SCIPY_CFLAGS = \
+	-I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
 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
 
+# scipy can use C++11 atomics when available, so we need to link with
+# libatomic for the architectures that need libatomic.
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+PYTHON_SCIPY_LDFLAGS += -latomic
+endif
+
 PYTHON_SCIPY_ENV = \
 	F90=$(TARGET_FC) \
+	CFLAGS="$(PYTHON_SCIPY_CFLAGS)" \
 	LDFLAGS="$(PYTHON_SCIPY_LDFLAGS)"
 
 # Provide system configuration options to numpy distutils extensions, telling