-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
We have a project (https://github.com/cherab) that is split into a number of different sub-packages. Different teams/labs own the different sub-packages. We use namespaces to pull the separate packages together to appear as a single package. We have recently tried to make the package installable from pypi, however we have encountered an issue with cython compilation:
pip install cherab
pip install cherab-openadas
The second package (dependent on the first) fails to compile, saying it can not find the pxd files. On investigating, pip appears to set up a PEP420 namespace where there is no __init__.py in the root package. If I manually add an __init__.py to the root of the package and try pip again, the cython compilation for cherab-openadas succeeds. Given this, I had a look through the cython source and noticed that during the pxd search, only paths with __init__.py/pxd files are scanned. I removed the relevant check in Cython.Utils.search_include_directories() (on 0.29.x branch) and attempted the re-installation with pip in a clean environment. The compilation and installation was successful.
Given PEP420, is there any explicit need for the __init__.* check? Could it be removed? On first look, I can't see any reason it would cause a problem.