Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building the Python package using pip in an isolated env: issues with numpy #2

Open
benbovy opened this issue Jan 30, 2019 · 0 comments

Comments

@benbovy
Copy link
Member

benbovy commented Jan 30, 2019

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:

$ pip install setuptools wheel cmake scikit-build ninja numpy
$ conda install setuptools wheel cmake scikit-build ninja numpy -c conda-forge

Maybe related discussion: pypa/pip#6144

Kaili270 pushed a commit to Kaili270/fastscapelib-fortran that referenced this issue Feb 20, 2024
…ratigraphy-for-aspect

Also use correct folder for strati filled output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant