-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
python-setuptools: build once and symlink #251186
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
Conversation
0206b14 to
76e4ae9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes the python-setuptools formula by building setuptools once with the newest Python version and creating symlinks for other supported versions, rather than building separately for each Python version. This is possible because setuptools is a pure Python package distributed as a universal wheel.
Key Changes:
- Build setuptools once with Python 3.14 instead of building for each Python version (3.12, 3.13, 3.14)
- Create symlinks from other Python version site-packages to the built files
- Simplify the
pythonshelper method usingfilter_map
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f50b22f to
1a14c9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1a14c9e to
6a7e32d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
6a7e32d to
194d8b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
|
🤖 An automated task has requested bottles to be published to this PR. Caution Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. |
Setuptools is pure python and an any wheel (https://pypi.org/project/setuptools/#setuptools-80.9.0-py3-none-any.whl) so it isn't Python version-specific.
Can also see from existing bottle, the contents of subdirectories are the same, e.g.
For now, can keep all versions as we use Setuptools in some formulae we are unable to rebuild, e.g. versioned LLVM. Can re-consider in future.
Minor reduction in size from symlinks, though not that significant as only 4.3MB with 1 Python and 12.0MB with 3 Pythons.