| Summary: | python-pyparsing: "No module named 'pyparsing'" while building cantools (SOLVED: use host-python-pyparsing) | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Tibor Stolz <tistolz> |
| Component: | Other | Assignee: | Tibor Stolz <tistolz> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | buildroot |
| Priority: | P5 | ||
| Version: | 2019.02.2 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: |
python-cantools/Config.in
python-cantools/python-cantools.hash python-cantools/python-cantools.mk python-cantools/Config.in python-cantools/python-cantools.hash python-cantools/python-cantools.mk python_ok_bbb_defconfig FIXED python-cantools/python-cantools.mk FIXED python-cantools/Config.in |
||
|
Description
Tibor Stolz
2019-05-03 13:52:22 UTC
Created attachment 7996 [details]
python-cantools/python-cantools.hash
Created attachment 8001 [details]
python-cantools/python-cantools.mk
Created attachment 8006 [details]
python-cantools/Config.in
same file, but set content type now correctly
Created attachment 8011 [details]
python-cantools/python-cantools.hash
same file, but content type now set correctly
Created attachment 8016 [details]
python-cantools/python-cantools.mk
same file, but content type set correctly
The build log for python-cantools in detail: >>> python-cantools 18.0.1 Downloading cantools-18.0.1.tar.gz: OK (sha256: dc5d265103b8b11d4c7cc21996ad1954325b1f1930837505cabb0b5b137d37ee) >>> python-cantools 18.0.1 Extracting gzip -d -c /home/tibor/Buildroot/buildroot-2019.02.2/dl/python-cantools/cantools-18.0.1.tar.gz | tar --strip-components=1 -C /home/tibor/Buildroot/buildroot-2019.02.2/output/build/python-cantools-18.0.1 -xf - >>> python-cantools 18.0.1 Patching >>> python-cantools 18.0.1 Configuring >>> python-cantools 18.0.1 Building (cd /home/tibor/Buildroot/buildroot-2019.02.2/output/build/python-cantools-18.0.1//; _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata_m_linux_arm-linux-gnueabihf" PATH="/home/tibor/Buildroot/buildroot-2019.02.2/output/host/bin:/home/tibor/Buildroot/buildroot-2019.02.2/output/host/sbin:/home/tibor/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PYTHONPATH="/home/tibor/Buildroot/buildroot-2019.02.2/output/target/usr/lib/python3.7/" PYTHONNOUSERSITE=1 _python_sysroot=/home/tibor/Buildroot/buildroot-2019.02.2/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot _python_prefix=/usr _python_exec_prefix=/usr /home/tibor/Buildroot/buildroot-2019.02.2/output/host/bin/python setup.py build ) Traceback (most recent call last): File "setup.py", line 4, in <module> import cantools File "/home/tibor/Buildroot/buildroot-2019.02.2/output/build/python-cantools-18.0.1/cantools/__init__.py", line 6, in <module> from . import db File "/home/tibor/Buildroot/buildroot-2019.02.2/output/build/python-cantools-18.0.1/cantools/db/__init__.py", line 4, in <module> from .database import Database File "/home/tibor/Buildroot/buildroot-2019.02.2/output/build/python-cantools-18.0.1/cantools/db/database.py", line 3, in <module> from .formats import dbc File "/home/tibor/Buildroot/buildroot-2019.02.2/output/build/python-cantools-18.0.1/cantools/db/formats/dbc.py", line 4, in <module> from pyparsing import Word ModuleNotFoundError: No module named 'pyparsing' package/pkg-generic.mk:238: recipe for target '/home/tibor/Buildroot/buildroot-2019.02.2/output/build/python-cantools-18.0.1/.stamp_built' failed make[1]: *** [/home/tibor/Buildroot/buildroot-2019.02.2/output/build/python-cantools-18.0.1/.stamp_built] Error 1 Makefile:84: recipe for target '_all' failed make: *** [_all] Error 2 Created attachment 8026 [details]
python_ok_bbb_defconfig
I'm sorry I cannot repeat the problem anymore. Using exactly the same buildroot version and menu settings (except "System hostname" and "System banner"), I get packages python-pyparsing and python-spidev that work fine and can be imported into a python3 session without any issue.
For your reference, I'm attaching the main config file, created using "make savedefconfig".
I'm closing the bug until I hit that behaviour again. (I hope not...)
Created attachment 8046 [details]
FIXED python-cantools/python-cantools.mk
Hi all,
The build error for python-cantools persisted, but now I figured out why I ran into it: In order to build correctly, the build-time dependencies must be installed on the *host*! Therefore, the package makefile (python-cantools.mk) must be changed:
- PYTHON_CANTOOLS_DEPENDENCIES = python-bitstruct python-pyparsing
+ PYTHON_CANTOOLS_DEPENDENCIES = host-python-bitstruct host-python-pyparsing
Doing a 'grep -r DEPENDENCIES package/python-*' in the buildroot-2019.02.2 directory revealed that most python library dependencies are in the host-python-* form. Maybe this should be mentioned in the Buildroot user manual?
Best regards,
Tibor Stolz
Created attachment 8051 [details]
FIXED python-cantools/Config.in
For anyone interested in building python-cantools v18.0.1 (16 Feb 2018), here is the Config.in file.
You also need packages python-bitstruct and python-pyparsing, which contain the following line at the end of the .mk file:
$(eval $(host-python-package))
Besides that, the python-bitstruct package is easy to get with utils/scanpypi, and the python-pyparsing package is already available (with host-python-package missing).
|