Python3 project without setup.py
I am using Dunfell.
What should I do in a recipe if a python project has no setup.py?
I tried adding a trivial setup.py:
from setuptools import setupThis results in the recipe failing while trying to "import serial" from the python code in the project:
Log data follows:
| DEBUG: Executing shell function do_compile
| Traceback (most recent call last):
| File "setup.py", line 4, in <module>
| File "/home/jklug/mlinux/build/tmp/work/arm926ejste-mlinux-linux-gnueabi/python3-minimalmodbus/2.0.1-r0/git/minimalmodbus.py", line 38, in <module>
| import serial
| ModuleNotFoundError: No module named 'serial'
This is probably not available in dunfel, but in master there aretoggle quoted messageShow quoted text
bbclasses that handle this:
inherit pypi python_setuptools_build_meta
So try with master, and then consider your options.
On Fri, 4 Nov 2022 at 00:03, John Klug <john.klug@...> wrote:
On 3 Nov 2022, at 23:03, John Klug via lists.yoctoproject.org <john.klug=multitech.com@...> wrote:
That project uses [buildsystem] attributes in pyproject.toml, for more details I spoke about what this means and how it impacts Yocto at the Yocto Summit earlier this year:
However, this all landed in kirkstone and nobody has backported it to dunfell as far as I’m aware.
Adding the stub setup.py likely did the right thing, and albeit outside of Yocto it worked for me:
$ python3 ./setup.py build
copying minimalmodbus.py -> build/lib
writing dependency_links to minimalmodbus.egg-info/dependency_links.txt
writing requirements to minimalmodbus.egg-info/requires.txt
writing top-level names to minimalmodbus.egg-info/top_level.txt
writing manifest file 'minimalmodbus.egg-info/SOURCES.txt'
reading manifest file 'minimalmodbus.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
adding license file 'LICENSE'
adding license file 'AUTHORS.rst'
writing manifest file 'minimalmodbus.egg-info/SOURCES.txt’
Maybe share the recipe or at least the full logs?