All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/python-scipy: fix io runtime dependency
@ 2022-08-02 17:33 Guillaume W. Bres
  2022-08-02 17:33 ` [Buildroot] [PATCH 2/2] support/testing: test_python_scipy Guillaume W. Bres
  2022-08-03 16:36 ` [Buildroot] [PATCH 1/2] package/python-scipy: fix io runtime dependency Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Guillaume W. Bres @ 2022-08-02 17:33 UTC (permalink / raw)
  To: buildroot; +Cc: Guillaume W. Bres, Thomas Petazzoni

We need python built with the --zlib feature, for the io
module to import properly and be usable

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
---
I did not provide the correct BR flag here. Let's test this module anyway
with the runtime test (see the following commit).
It turns out the scipy.io module is the only one that does not work right away
---
 package/python-scipy/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/python-scipy/Config.in b/package/python-scipy/Config.in
index 0fa6c9e311..229b5997ad 100644
--- a/package/python-scipy/Config.in
+++ b/package/python-scipy/Config.in
@@ -6,7 +6,7 @@ config BR2_PACKAGE_PYTHON_SCIPY
 	depends on BR2_TOOLCHAIN_HAS_FORTRAN # lapack
 	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_LAPACK
-	select BR2_PACKAGE_ZLIB # runtime scipy::io
+	select BR2_PACKAGE_PYTHON3_ZLIB # runtime scipy::io
 	select BR2_PACKAGE_PYTHON_NUMPY # runtime
 	select BR2_PACKAGE_PYTHON_PYBIND
 	help
-- 
2.20.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2/2] support/testing: test_python_scipy
  2022-08-02 17:33 [Buildroot] [PATCH 1/2] package/python-scipy: fix io runtime dependency Guillaume W. Bres
@ 2022-08-02 17:33 ` Guillaume W. Bres
  2022-08-03 16:36 ` [Buildroot] [PATCH 1/2] package/python-scipy: fix io runtime dependency Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Guillaume W. Bres @ 2022-08-02 17:33 UTC (permalink / raw)
  To: buildroot; +Cc: Guillaume W. Bres, Thomas Petazzoni

Test io module, to demonstrate the runtime dependency is correctly matched

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
---
 support/testing/tests/package/sample_python_scipy.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/support/testing/tests/package/sample_python_scipy.py b/support/testing/tests/package/sample_python_scipy.py
index df0c7ce5fe..d36f2273e7 100644
--- a/support/testing/tests/package/sample_python_scipy.py
+++ b/support/testing/tests/package/sample_python_scipy.py
@@ -1,4 +1,5 @@
 import numpy
+import scipy.io
 import scipy.special
 import scipy.integrate
 
@@ -10,3 +11,6 @@ assert(com == 15.0)
 
 t = scipy.integrate.trapezoid([5,8,10])
 assert(t == 15.5)
+
+mdic = {"t": t, "label": "example"}
+scipy.io.savemat("example.mat", mdic)
-- 
2.20.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/python-scipy: fix io runtime dependency
  2022-08-02 17:33 [Buildroot] [PATCH 1/2] package/python-scipy: fix io runtime dependency Guillaume W. Bres
  2022-08-02 17:33 ` [Buildroot] [PATCH 2/2] support/testing: test_python_scipy Guillaume W. Bres
@ 2022-08-03 16:36 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-03 16:36 UTC (permalink / raw)
  To: Guillaume W. Bres; +Cc: buildroot

On Tue,  2 Aug 2022 19:33:29 +0200
"Guillaume W. Bres" <guillaume.bressaix@gmail.com> wrote:

> We need python built with the --zlib feature, for the io
> module to import properly and be usable
> 
> Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
> ---
> I did not provide the correct BR flag here. Let's test this module anyway
> with the runtime test (see the following commit).
> It turns out the scipy.io module is the only one that does not work right away
> ---
>  package/python-scipy/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Both applied, with slightly reworked commit logs/titles. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-03 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 17:33 [Buildroot] [PATCH 1/2] package/python-scipy: fix io runtime dependency Guillaume W. Bres
2022-08-02 17:33 ` [Buildroot] [PATCH 2/2] support/testing: test_python_scipy Guillaume W. Bres
2022-08-03 16:36 ` [Buildroot] [PATCH 1/2] package/python-scipy: fix io runtime dependency Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.