Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RFC Remove setuptools-based build in scikit-learn 1.6 #29346

Closed
@lesteve

Description

@lesteve

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:

Now with also Matplotlib and others having switched over, I think you'd be safe with removing setup.py quickly. I am not aware of any blockers in any package that switched so far.

Some projects have removed setup.py already:

For local development, I am reasonably confident things should be fine:

Potential issues / things to think about

  • OpenMP-specific quirk, From the discussion with @rgommers:

    The one thing I can think of that's different in scikit-learn is OpenMP usage. Not sure if that required any special handling beyond linking to llvm-openmp and then running auditwheel & co?

    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 on setup.py much:

  • any 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:

we did keep _setup.py as a backup for ~2 minor releases, because of the known conda-forge issue, and because our build is very complex and we were the very first package to shift over to Meson, so we weren't 100% sure what surprises we'd encounter. I think there were a few other Linux distros that stayed with setup.py for at least one release cycle, but I think mostly that was a "this is less work right now" than anything fundamental.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions