You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a pyproject.toml (PEP518) is used to specify the tools needed to build the package. This is nice because users don't need to worry about installing these tools first.
However, numpy is needed to both build (using f2py) and import this package at runtime. Build isolation (PEP517) causes issues here. If we add numpy to the build requirements in pyproject.toml, we might have numpy version mismatch at runtime (e.g., when using conda environments) and the package is not usable. If we don't add numpy to the build requirements, we might get a CMake error (numpy not found).
A workaround is to deactivate build isolation, i.e.,
$ pip install . --no-build-isolation
But then we loose the benefits of build requirements in pyproject.toml and users need to install all these tools manually, e.g., using pip or conda:
Currently a
pyproject.toml
(PEP518) is used to specify the tools needed to build the package. This is nice because users don't need to worry about installing these tools first.However, numpy is needed to both build (using f2py) and import this package at runtime. Build isolation (PEP517) causes issues here. If we add numpy to the build requirements in
pyproject.toml
, we might have numpy version mismatch at runtime (e.g., when using conda environments) and the package is not usable. If we don't add numpy to the build requirements, we might get a CMake error (numpy not found).A workaround is to deactivate build isolation, i.e.,
But then we loose the benefits of build requirements in
pyproject.toml
and users need to install all these tools manually, e.g., using pip or conda:Maybe related discussion: pypa/pip#6144
The text was updated successfully, but these errors were encountered: