-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
RFC Remove setuptools-based build in scikit-learn 1.6 #29346
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
Comments
@lesteve Fine for Debian! I just tested removing our last Thanks for asking! |
One motivation for not keeping both for too long is that currently adding a new cython extension requires to duplicate the work and increases the maintenance burden.
One thing that I can think of is compilation with non default compilers that have their own OpenMP flags, like intel's dpc++ compiler. The helper we have to set the appropriate flags is used when building using setuptools but not when building with meson. But I'm not even sure it's still working cause we've not been testing it for a while. And anyway if the need comes, we can try to fix it in sklearn or open an issue in meson anyway. So that wouldn't be a blocker imo. |
There is scipy/scipy#17075 about Intel compiler support in Scipy, this seems like there is some kind of support. Not sure about OpenMP detection, someone would need to try it out ... my feeling right now is we are amongst the first to test OpenMP with Meson in the Scientific Python ecosystem so there may be issues (maybe?). |
@lesteve It's fine for Fedora also, the macros in the spec file take care of calling the appropriate incantation. We are building, for example, scikit-image just fine. |
Proposal
I would be in favour of removing setuptools i.e. all
setup.py
files in 1.6. Meson is our main building tool for some time, teething issues have been found and fixed, and no major blocker issues have been found. We discussed this at the monthly developers meeting today and there did not seem to be any strong objections.I asked on the Scipy Slack (see message if you are on the Scipy Slack) and got this response from @rgommers:
Some projects have removed
setup.py
already:setup.py
in 0.20 released March 2023: Bite the bullet: remove distutils and setup.py scikit-image/scikit-image#6738setup.py
in 3.9 released May 16: Port build system to Meson matplotlib/matplotlib#26621setup.py
in Numpy 2 released June 16: MAINT: removesetup.py
and other files for distutils builds numpy/numpy#24519For local development, I am reasonably confident things should be fine:
Potential issues / things to think about
OpenMP-specific quirk, From the discussion with @rgommers:
I can not think about OpenMP-specific issues but happy to hear other opinions. We have released wheels with Meson for 1.5 roughly one month ago, and it doesn't seem like there has been any issues.
Linux distribution packaging may still rely on
setup.py
. I am certainly not a Linux packaging expert but it seems like they may not rely onsetup.py
much:python -m build
see thispyproject_wheel
is used in this which I think meanspython -m pip wheel
from this filerules
seems to usepython setup.py config
somewhere, but there is also some automatic build detection that should pick Meson IIUC https://wiki.debian.org/Python/Pybuildany other use case that I didn't think of and that may be using
setup.py
?Alternative more conservative option
If we are more comfortable with the more conservative, we could follow what Scipy has done i.e. rename
setup.py
to_setup.py
and keep_setup.py
as a fall-back for some time, maybe in 1.6, and remove it in scikit-learn 1.7.@rgommers said on this:
The text was updated successfully, but these errors were encountered: