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

MNT Quick fix for setup.py clean #23426

Merged
merged 3 commits into from May 20, 2022

Conversation

thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented May 19, 2022

Reference Issues/PRs

Fixes #23423

What does this implement/fix? Explain your changes.

Adding the packages kwarg to setup is a quick fix to the original issue.

@lesteve
Copy link
Member

@lesteve lesteve commented May 20, 2022

Thanks for the PR! Not that I understand all the intricacies involved, but would it not be safer/cleaner to only change the pure setuptools-based section, e.g. something like this:

diff --git a/setup.py b/setup.py
index 7ad32e95e..ede4f3b6c 100755
--- a/setup.py
+++ b/setup.py
@@ -290,6 +290,8 @@ def setup_package():
         from setuptools import setup
 
         metadata["version"] = VERSION
+        # disable package discovery in setuptools >= 61
+        metadata["packages"] = ["sklearn"]
     else:
         if sys.version_info < required_python_version:
             required_version = "%d.%d" % required_python_version

@lesteve
Copy link
Member

@lesteve lesteve commented May 20, 2022

CI is green, the change only affects the few commands based on setuptools (["egg_info", "dist_info", "clean", "check"]) so I am going to merge this one

@lesteve lesteve merged commit 915160e into scikit-learn:main May 20, 2022
43 checks passed
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

Successfully merging this pull request may close these issues.

2 participants