Move custom build in setup.py to custom backend in _custom_build#9645
Move custom build in setup.py to custom backend in _custom_build#9645aclark4life wants to merge 8 commits into
setup.py to custom backend in _custom_build#9645Conversation
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
|
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. |
True, it's only cosmetic. I would prefer to not see |
| "Windows.", | ||
| RuntimeWarning, | ||
| ) | ||
| ) |
There was a problem hiding this comment.
Is there any particular reason this was moved inside run()?
There was a problem hiding this comment.
No. I suspect it was the 🤖 's attempt to clean up after the change from executing the setup script to executing run, a function within the setup script. Unless it needs to run on import probably fine?
There was a problem hiding this comment.
Yep, should be fine, I just like to know why changes are made.
This comment was marked as outdated.
This comment was marked as outdated.
setup.py functionality to custom buildsetup.py to custom backend in _custom_build
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.