pypi setuptools based recipe fails ModuleNotFoundError: No module named 'pkg_resources' #python
I'm attempting to make a simple bitbake recipe for python3-astropy that inherits from pypi and setuptools3. The very simple recipe is attached. When I build I'm getting this error:
Quoted 7 lines
| import
pkg_resources
Quoted 7 lines
| ModuleNotFoundError: No module named '
pkg_resources'| WARNING: exit code 1 from a shell command.
I don't understand this error because I'm using setuptools3 which I believe contains pkg_resources. In desperation I added a "DEPENDS = "python3-setuptools" but that did not help either. I'd appreciate any advice on this. Thanks
The issue here is that you are overwriting the DEPENDS after the inherit. Two ways to solve this problem
Either use
DEPENDS = "python3-astropy-helpers"PYPI_PACKAGE = "astropy"
inherit pypi
or
PYPI_PACKAGE = "astropy"
inherit pypi
DEPENDS += "python3-astropy-helpers"
python3-setuptools doesn't need to be added at all manually as this is done implicitly by setuptools3 class
Quoted 15 lines · On 29.01.21 21:41, [email protected] wrote:
I'm attempting to make a simple bitbake recipe for python3-astropy that inherits from pypi and setuptools3. The very simple recipe is attached. When I build I'm getting this error:
| import
pkg_resources| ModuleNotFoundError: No module named '
pkg_resources'| WARNING: exit code 1 from a shell command.
I don't understand this error because I'm using setuptools3 which I believe contains pkg_resources. In desperation I added a "DEPENDS = "python3-setuptools" but that did not help either. I'd appreciate any advice on this. Thanks