Move setup.py functionality to custom build#9645
Open
aclark4life wants to merge 2 commits into
Open
Conversation
Move C extension build logic from setup.py into _custom_build/pillow_ext.py and update the custom build backend to call pillow_ext.run() directly, eliminating the need for an executable setup.py script. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
for more information, see https://pre-commit.ci
setup.py functionality to custom build
Member
|
For some background - the custom backend was added in #7171, as a workaround for pypa/setuptools#2491. I had hoped that setuptools would one day resolve their issue, and the custom backend could be removed. But this PR is investing in it further. What is the advantage of using a custom backend over setup.py? It doesn't appear that setup.py itself is problematic. |
Member
Author
True, it's only cosmetic. I would prefer to not see |
radarhere
reviewed
Jun 1, 2026
Comment on lines
+1070
to
+1072
| f"{sys.version_info.major}.{sys.version_info.minor} and does not provide " | ||
| "prebuilt Windows binaries. We do not recommend building from source on " | ||
| "Windows.", |
Member
There was a problem hiding this comment.
Suggested change
| f"{sys.version_info.major}.{sys.version_info.minor} and does not provide " | |
| "prebuilt Windows binaries. We do not recommend building from source on " | |
| "Windows.", | |
| f"{sys.version_info.major}.{sys.version_info.minor} and does not " | |
| "provide prebuilt Windows binaries. We do not recommend building from " | |
| "source on Windows.", |
Lint fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move C extension build logic from setup.py into
_custom_build/pillow_ext.py and update the custom build backend to call pillow_ext.run() directly, eliminating the need for an executable setup.py script.
Fixes #9643 .
Changes proposed in this pull request:
setup.pyto our custom build.