FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Move custom build in `setup.py` to custom backend in `_custom_build` by aclark4life · Pull Request #9645 · python-pillow/Pillow · GitHub

Move custom build in setup.py to custom backend in _custom_build - #9645

Open
aclark4life wants to merge 9 commits into
mainfrom
rip-setup-py
Open

Move custom build in setup.py to custom backend in _custom_build#9645
aclark4life wants to merge 9 commits into
mainfrom
rip-setup-py

Conversation

aclark4life commented Jun 1, 2026
edited
Loading

Copy link
Copy Markdown
Member

Move C extension build logic from setup.py into
_custom_build/pillow_ext.py and update the custom backend to call pillow_ext.run().

Fixes #9643 .

Changes proposed in this pull request:

  • Move the remaining custom build in setup.py to our custom backend.

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>
aclark4life changed the title Convert setup.py to pyproject.toml Move setup.py functionality to custom build Jun 1, 2026
aclark4life added the 🤖-assisted AI-assisted label Jun 1, 2026
aclark4life changed the title Move setup.py functionality to custom build Move setup.py functionality to custom build Jun 1, 2026

Copy link
Copy Markdown
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.

aclark4life commented Jun 1, 2026
edited
Loading

Copy link
Copy Markdown
Member Author

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 setup.py anymore because it's confusing, but not urgent.

Comment thread _custom_build/pillow_ext.py Outdated
"Windows.",
RuntimeWarning,
)
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is there any particular reason this was moved inside run()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yep, should be fine, I just like to know why changes are made.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

OK so 👍 👍 from @radarhere and @aclark4life and still trying to convince @hugovk ? 😄

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If pypa/setuptools#2491 is never going to be resolved, then I don't have strong feelings either way about this PR.

radarhere added the Build label Jun 6, 2026

This comment was marked as outdated.

aclark4life changed the title Move setup.py functionality to custom build Move custom build in setup.py to custom backend in _custom_build Jul 3, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move custom build in setup.py to custom backend in _custom_build

2 participants


Back | FazBrowse Home | New Git URL