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

"make python" is broken #21

Open
danfortunato opened this issue Nov 16, 2023 · 1 comment
Open

"make python" is broken #21

danfortunato opened this issue Nov 16, 2023 · 1 comment

Comments

@danfortunato
Copy link

The Python interface fails to build with make python. This can be fixed by deleting the pyproject.toml file, or by adding setuptools to pyproject.toml and removing the -e flag from pip install in the Makefile.

@lu1and10
Copy link
Member

lu1and10 commented Nov 17, 2023

The Python interface fails to build with make python. This can be fixed by deleting the pyproject.toml file, or by adding setuptools to pyproject.toml and removing the -e flag from pip install in the Makefile.

Thanks for bring this up. It seems that with the latest pip and setuptools, even deleting the pyproject.toml file and use setup.py alone to install in editable mode also breaks(non-editable mode seems to be fine anyway).

We are using numpy.distutils as the build back end for the fortran python module ext, according to https://numpy.org/doc/stable/reference/distutils_status_migration.html, numpy.distutils is deprecated and only tested with setuptools < 60.0 , so if you apply the following patch and using setuptools==59.8.0. make python might work.

--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -1,3 +1,3 @@
 [build-system]
-requires = ["numpy"]
+requires = ["setuptools==59.8.0", "numpy"]

While as numpy.distutils is deprecated, it makes perfect sense that we should switch to meson or scikit-build-core following the migration advice https://numpy.org/doc/stable/reference/distutils_status_migration.html. We should keep the issue open till we switch to the new build back end.

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

2 participants