Skip to contentSkip to conversation

package/python-scipy: bump version to 1.9.1

PATCH RESEND Superseded Guillaume W. Bres 2 participants 3 messages Sep 28, 2022 – Oct 2, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 package/python-scipy: bump version to 1.9.1

---
Scipy is expected to move to a meson build infrastructure by the next release

scipy-.tar.xz is no longer released.

For some reason, a new "Python.h" missing header build time failure arised. I solve it with a -Ipython include.

Then test script failed, with linker/runtime missing symbols error, all related to the linear algebra portion (which we do test). Errors like "undefined reference to __atomic_compare_exchange 8" regarding "site-/scipy/optimize/_highs/_highs_wrapper.cpython-310-arm-linux-gnueabi.so" to be specific. I solved it with a -latomic flag.

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   | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
package/python-scipy/python-scipy.hash +1 -1
index 0274679c43..1ba239aabf 100644
@@ -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
package/python-scipy/python-scipy.mk +5 -2
index a8c23c6c88..1619b9f40a 100644
@@ -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,6 +36,8 @@ 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
@@ -44,6 +46,7 @@ PYTHON_SCIPY_LDFLAGS += \
 
 PYTHON_SCIPY_ENV = \
 	F90=$(TARGET_FC) \
+	CFLAGS="$(PYTHON_SCIPY_CFLAGS) -latomic" \
 	LDFLAGS="$(PYTHON_SCIPY_LDFLAGS)"
 
 # Provide system configuration options to numpy distutils extensions, telling
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Guillaume, All,

On 2022-09-28 21:34 +0200, Guillaume W. Bres spake thusly:

Quoted 2 lines

---

All that is below the triple-dash line will be dropped by git when we apply the patch. However, you provided interesting information in that post-commit-log message...

Quoted 4 lines

Scipy is expected to move to a meson build infrastructure by the next release

scipy-.tar.xz is no longer released.

This should be part of the commit log proper, to explain why you switched to the .tar.gz archive.

Quoted 2 lines

For some reason, a new "Python.h" missing header build time failure arised. I solve it with a -Ipython include.

This should also be part of the commit log

Quoted 6 lines

Then test script failed, with linker/runtime missing symbols error, all related to the linear algebra portion (which we do test). Errors like "undefined reference to __atomic_compare_exchange 8" regarding "site-/scipy/optimize/_highs/_highs_wrapper.cpython-310-arm-linux-gnueabi.so" to be specific. I solved it with a -latomic flag.

I see you pass it via CFLAGS; that's not correct, it should be passed via LDFLAGS. If that doesnt work, it should be explained why.

Also, we can't arbitrary link agains -latomic, because not all toolchains have it. See cairo.mk for how it should be conditionally used.

Regards,
Yann E. MORIN.

Quoted 59 lines

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   | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
package/python-scipy/python-scipy.hash +1 -1
index 0274679c43..1ba239aabf 100644
@@ -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
package/python-scipy/python-scipy.mk +5 -2
index a8c23c6c88..1619b9f40a 100644
@@ -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,6 +36,8 @@ 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
@@ -44,6 +46,7 @@ PYTHON_SCIPY_LDFLAGS += \
 
 PYTHON_SCIPY_ENV = \
 	F90=$(TARGET_FC) \
+	CFLAGS="$(PYTHON_SCIPY_CFLAGS) -latomic" \
 	LDFLAGS="$(PYTHON_SCIPY_LDFLAGS)"
 
 # Provide system configuration options to numpy distutils extensions, telling
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Thank you Yann for the needed feedback.
I see most of my submissions as drafts that need one.
For instance, I hesitate a lot about what should remain in the commit log or not.

Same thing applies to the -latomic flag, which I knew solved my use case, but I could not find a package to find similar requirements. Your input is always valued, thank you

Guillaume W. Bres
Software engineer
<[email protected]>

Le sam. 1 oct. 2022 à 20:19, Yann E. MORIN <[email protected]> a écrit :

Quoted 129 lines

Guillaume, All,

On 2022-09-28 21:34 +0200, Guillaume W. Bres spake thusly:

Quoted 2 lines

---

All that is below the triple-dash line will be dropped by git when we apply the patch. However, you provided interesting information in that post-commit-log message...

Quoted 4 lines

Scipy is expected to move to a meson build infrastructure by the next release

scipy-.tar.xz is no longer released.

This should be part of the commit log proper, to explain why you switched to the .tar.gz archive.

Quoted 2 lines

For some reason, a new "Python.h" missing header build time failure arised. I solve it with a -Ipython include.

This should also be part of the commit log

Quoted 5 lines

Then test script failed, with linker/runtime missing symbols error, all related to the linear algebra portion (which we do test). Errors like "undefined reference to __atomic_compare_exchange 8" regarding
"site-/scipy/optimize/_highs/_

highs_wrapper.cpython-310-arm-linux-gnueabi.so"

Quoted 1 line

to be specific. I solved it with a -latomic flag.

I see you pass it via CFLAGS; that's not correct, it should be passed via LDFLAGS. If that doesnt work, it should be explained why.

Also, we can't arbitrary link agains -latomic, because not all toolchains have it. See cairo.mk for how it should be conditionally used.

Regards,
Yann E. MORIN.

Quoted 3 lines

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,

Review

Quoted 7 lines

this serie is not 100% ready to go

---
 package/python-scipy/python-scipy.hash | 2 +-
 package/python-scipy/python-scipy.mk   | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/package/python-scipy/python-scipy.hash

package/python-scipy/python-scipy.hash line 2

Quoted 6 lines

index 0274679c43..1ba239aabf 100644

package/python-scipy/python-scipy.hash +0 -1
@@ -1,5 +1,5 @@
 # Locally generated
-sha256

0140dd24d14ce194fdb3df496c2190f0896ca84ac98bf5d69c3b3fb7bde1a1e9 scipy-1.8.1.tar.xz

package/python-scipy/python-scipy.hash line 2

Quoted 1 line
package/python-scipy/python-scipy.hash +1 -0
+sha256

26d28c468900e6d5fdb37d2812ab46db0ccd22c63baa095057871faa3a498bc9 scipy-1.9.1.tar.gz

package/python-scipy/python-scipy.hash line 3

Quoted 1 line
package/python-scipy/python-scipy.hash +0 -0
 sha256

96599f8ec69a2cc609265eed13fc75090aacb28742260e55ce623788a33da19c LICENSE.txt

package/python-scipy/python-scipy.hash line 4

Quoted 1 line
package/python-scipy/python-scipy.hash +0 -0
 sha256

37e64a498894ac7c3b070023e3689e954a8ecf8a23b90968d09a455f1b4f7b35 scipy/linalg/src/lapack_deprecations/LICENSE

package/python-scipy/python-scipy.hash line 5

Quoted 1 line
package/python-scipy/python-scipy.hash +0 -0
 sha256

606209a000716c5f66e33e180ce08434b96ed17db4975ab9723c6b5fbcc89609 scipy/ndimage/LICENSE.txt

Review

Quoted 1 line
(quoted diff) +0 -0

b/package/python-scipy/python-scipy.mk

package/python-scipy/python-scipy.mk line 5

Quoted 6 lines

index a8c23c6c88..1619b9f40a 100644

package/python-scipy/python-scipy.mk +0 -0
@@ -4,8 +4,8 @@
 #
 

################################################################################

package/python-scipy/python-scipy.mk

Quoted 6 lines
package/python-scipy/python-scipy.mk +2 -2
-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)

Quoted 12 lines
package/python-scipy/python-scipy.mk +2 -0
 PYTHON_SCIPY_LICENSE = \
      BSD-3-Clause, \
@@ -36,6 +36,8 @@ 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

package/python-scipy/python-scipy.mk PYTHON_SCIPY_LDFLAGS += \ · line 52

Quoted 7 lines
package/python-scipy/python-scipy.mk +1 -0
@@ -44,6 +46,7 @@ PYTHON_SCIPY_LDFLAGS += \
 
 PYTHON_SCIPY_ENV = \
      F90=$(TARGET_FC) \
+     CFLAGS="$(PYTHON_SCIPY_CFLAGS) -latomic" \
      LDFLAGS="$(PYTHON_SCIPY_LDFLAGS)"
 
 # Provide system configuration options to numpy distutils extensions,

telling

Quoted 7 lines

--
2.20.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

--

.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___
     |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is
no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v
 conspiracy.  |
Quoted 2 lines

'------------------------------^-------^------------------^--------------------'

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot