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

Build breaks under python 3.12 due to obsolete distutils being removed. #1024

Open
dkeeney opened this issue Sep 4, 2024 · 1 comment
Open

Comments

@dkeeney
Copy link

dkeeney commented Sep 4, 2024

This was found while testing PR #1022.
The build on Windows was broken.
At the end of the build was the following:

Running from numpy source directory.
C:\Users\Dave\AppData\Local\Temp\easy_install-2xqry4y_\numpy-1.23.0\setup.py:86: DeprecationWarning:

numpy.distutils is deprecated since NumPy 1.23.0, as a result
of the deprecation of distutils itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use setuptools < 60.0 for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html

import numpy.distutils.command.sdist
error: Cython needs to be installed in Python as a module

=============

It dies at this point.

@dkeeney
Copy link
Author

dkeeney commented Sep 4, 2024

By forcing version of setuptools < 60.0 and running on python 3.11, everything works.
But because distutils was removed from python 3.12, the build fails.
REF:
https://numpy.org/devdocs/reference/distutils_status_migration.html
https://scikit-build-core.readthedocs.io/en/latest/

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