-
Notifications
You must be signed in to change notification settings - Fork 164
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
migrate from setup.py to pyproject.toml #639
base: master
Are you sure you want to change the base?
Conversation
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.
Move reviews over from #641.
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.
LGTM
I am not very familiar with this. Will Debian packaging/PPA still work if we migrate away from setup.py? |
@archisman-panigrahi |
(If we want to automate this, we could try to use https://github.com/marketplace/actions/build-debian-packages? That should be able to ensure that the package builds successfully.) |
I tried building it in Launchpad. While it builds for ubuntu 24.04 and 24.10 (both have python3.12), it does not build in 22.04 (python3.10), with the error
We can decide to not support 22.04 anymore, but I don't see why it does not seem to work with python 3.10. |
Yes, it builds like any other debian package |
Hmm, the issue here doesn't seem to be Python 3.10, but the version of setuptools in 22.04 - according to this, setuptools needs to be at 65.2.0 or higher, but 22.04 only has 59.6.0. That said, when I revert the last commit, it also builds correctly on Debian 12 (albeit with warnings that setup.py is deprecated). |
@deltragon I am ready to test everything this weekend. From what I understand, this PR (#639) and #615 don't have anything to do with the GTK4 transition. #652, #655 and #576 are necessary for the GTK4 transition (#561). Is that correct? If so, my plan is to merge this PR, then test #652, #655 and #576 one by one, and then go to #561. Is that a good plan? |
The order you quoted makes sense to me. So yeah, the order I'd say is merge #652, then #655, and then you can test #561 properly. |
This reverts commit 4451c8d.
590f8c7
to
c28a0ce
Compare
Description
This PR switches configuration from setup.py to pyproject.toml.
This is somewhat of a prerequisite in the plan discussed in #589.
Most of the tools there (type checkers,
nox
/tox
,ruff
) expect to be configured with apyproject.toml
file.This documentation also "strongly recommends" using a
pyproject.toml
file in some form.In theory, it would be enough to just use the
[build-backend]
table, and keep thesetup.py
mostly as-is.However, when a
pyproject.toml
file is detected, it also enables build isolation automatically.Build isolation means that the way
.mo
files were generated needs to be changed (it is now a custom build step), and thedata_files
key is deprecated, so I decided to properly migrate everything topyproject.toml
.The only thing this should have an impact on is building the release. I have tested locally, and using
python -m build
properly builds the.whl
and.tar.gz
as before, with identical contents apart from some metadata differences.