Lumír Balhar added the comment: 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 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29144> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com