* [Buildroot] [PATCH v4 1/1] gnuradio: gnuradio-python: add missing runtime dependency to python-numpy
@ 2015-10-05 14:01 Gwenhael Goavec-Merou
2015-10-06 8:57 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-10-05 14:01 UTC (permalink / raw)
To: buildroot
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Some gnuradio python blocks needs python-numpy present.
Without python-numpy, gnuradio-python based apps fails, on runtime, with traceback like:
Traceback (most recent call last):
File "./top_block.py", line 18, in <module>
from gnuradio import analog
File "/usr/lib/python2.7/site-packages/gnuradio/analog/__init__.py", line 35, in <module>
from am_demod import *
File "/usr/lib/python2.7/site-packages/gnuradio/analog/am_demod.py", line 22, in <module>
from gnuradio import gr
File "/usr/lib/python2.7/site-packages/gnuradio/gr/__init__.py", line 44, in <module>
from top_block import *
File "/usr/lib/python2.7/site-packages/gnuradio/gr/top_block.py", line 30, in <module>
from hier_block2 import hier_block2
File "/usr/lib/python2.7/site-packages/gnuradio/gr/hier_block2.py", line 26, in <module>
import pmt
File "/usr/lib/python2.7/site-packages/pmt/__init__.py", line 58, in <module>
from pmt_to_python import pmt_to_python as to_python
File "/usr/lib/python2.7/site-packages/pmt/pmt_to_python.py", line 22, in <module>
import numpy
ImportError: No module named numpy
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
Changes v3 -> v4:
* add #runtime comment to BR2_PACKAGE_PYTHON_NUMPY select;
* suppress python-numpy in GNURADIO_DEPENDENCIES variable (not needed for
buildtime)
Changes v2 -> v3:
* Since commit 826a2bc18bc0be0b08f2926c9fa1819fe909557c no special attentions
is needed to select python-numpy. So BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
is no more needed
Changes v1 -> v2:
* Add dependy to BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS;
* gnuradio-python select numpy;
* gnuradio-utils select again gnuradio-python;
* fix commit message
---
package/gnuradio/Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
index e264a21..8da1a13 100644
--- a/package/gnuradio/Config.in
+++ b/package/gnuradio/Config.in
@@ -47,6 +47,7 @@ config BR2_PACKAGE_GNURADIO_PYTHON
bool "python support"
select BR2_PACKAGE_BOOST_PYTHON
select BR2_PACKAGE_PYTHON
+ select BR2_PACKAGE_PYTHON_NUMPY #runtime
help
Enable python component
--
2.4.9
^ permalink raw reply related [flat|nested] 2+ messages in thread* [Buildroot] [PATCH v4 1/1] gnuradio: gnuradio-python: add missing runtime dependency to python-numpy
2015-10-05 14:01 [Buildroot] [PATCH v4 1/1] gnuradio: gnuradio-python: add missing runtime dependency to python-numpy Gwenhael Goavec-Merou
@ 2015-10-06 8:57 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-10-06 8:57 UTC (permalink / raw)
To: buildroot
Dear Gwenhael Goavec-Merou,
On Mon, 5 Oct 2015 16:01:26 +0200, Gwenhael Goavec-Merou wrote:
> diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> index e264a21..8da1a13 100644
> --- a/package/gnuradio/Config.in
> +++ b/package/gnuradio/Config.in
> @@ -47,6 +47,7 @@ config BR2_PACKAGE_GNURADIO_PYTHON
> bool "python support"
> select BR2_PACKAGE_BOOST_PYTHON
> select BR2_PACKAGE_PYTHON
> + select BR2_PACKAGE_PYTHON_NUMPY #runtime
When you "select" an option, you must replicate the "depends on" of
that option into the selecting option. In this case, python-numpy has
the following depends on:
# Numpy has some CPU specific code
depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \
|| BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \
|| BR2_sh || BR2_x86_64
So you should replicate that into gnuradio/Config.in. However, since
this is horrible, here is what we do in such cases:
* Introduce a hidden BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS that
encodes this dependency.
* And then use this option in python-numpy/Config.in and
gnuradio/Config.in.
You can grep for ARCH_SUPPORTS in Buildroot to see other examples.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-06 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 14:01 [Buildroot] [PATCH v4 1/1] gnuradio: gnuradio-python: add missing runtime dependency to python-numpy Gwenhael Goavec-Merou
2015-10-06 8:57 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox