Message298579
Hello.
I've met this issue again in moksha project [0] where namespace package is used.
- module moksha.common is installed via RPM to site-packages and there isn't file moksha/__init__.py so the implicit way to create namespace package is used there.
- moksha.hub module is built in a buildroot and there is moksha/__init__.py file so this module uses different way which causes that import of moksha.common is failing.
We can delete moksha/__init__.py from buildroot of moksha.hub but then we cannot run tests with `python setup.py test`.
Error message is:
error in moksha.hub setup command: Distribution contains no modules or packages for namespace package 'moksha'
The second possibility is ship moksha/__init__.py file in python-moksha-common RPM. The question is: Why there isn't moksha/__init__.py file in RPM even when the source tarball contains it? Because of setuptools!
Setuptools skips installation of __init__.py file when namespace package is recognized with the message:
Skipping installation of /builddir/build/BUILDROOT/python-moksha-common-1.2.5-1.fc27.x86_64/usr/lib/python3.6/site-packages/moksha/__init__.py (namespace package)
Questions summary:
- Why there is such big difference between Python 3.5 and Python 3.6?
- Why does setuptools skip installation of __init__.py file but it needs them to run tests of namespace subpackage?
Thank you!
Lumír
[0] https://github.com/mokshaproject/moksha |
|
Date |
User |
Action |
Args |
2017-07-18 08:46:51 | frenzy | set | recipients:
+ frenzy, eric.smith, cstratak, torsava |
2017-07-18 08:46:51 | frenzy | set | messageid: <1500367611.55.0.453738224511.issue29144@psf.upfronthosting.co.za> |
2017-07-18 08:46:51 | frenzy | link | issue29144 messages |
2017-07-18 08:46:51 | frenzy | create | |
|