(setup) : catch cython import and install it manually to fix local install edgecase
Overview
The issue arises from the current layout of setup.py itself. You can replicate this issue by simply following the commands below:
cd bitshuffle
docker run -it -v $(pwd):/bitshuffle python:3.7-slim python /bitshuffle/setup.py --help
Traceback (most recent call last):
File "/bitshuffle/setup.py", line 13, in <module>
from Cython.Compiler.Main import default_options
ModuleNotFoundError: No module named 'Cython'
You need Cython installed in the environment to even evaluate the install and setup directives. This breaks any setup command other than install.
As a result, you cannot currently install bitshuffle locally, and even python setup.py install will fail.
Most third-party dependency resolution systems, pipx, poetry, flit etc. use egg_info to fetch metadata, build tags and dependency links for the project. Note, this is outside the purview and different from install_requires and setup_requires dependencies which are correctly defined in pyproject.toml.
fixes
Overview
The issue arises from the current layout of
setup.py
itself. You can replicate this issue by simply following the commands below:You need
Cython
installed in the environment to even evaluate the install and setup directives. This breaks any setup command other thaninstall
.As a result, you cannot currently install
bitshuffle
locally, and evenpython setup.py install
will fail.Most third-party dependency resolution systems,
pipx, poetry, flit etc.
useegg_info
to fetch metadata, build tags and dependency links for the project. Note, this is outside the purview and different frominstall_requires
andsetup_requires
dependencies which are correctly defined inpyproject.toml
.