-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Move project configuration to pyproject.toml #1382
Conversation
Codecov ReportBase: 94.19% // Head: 94.19% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #1382 +/- ##
=======================================
Coverage 94.19% 94.19%
=======================================
Files 28 28
Lines 5085 5085
Branches 968 968
=======================================
Hits 4790 4790
Misses 176 176
Partials 119 119 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Hi @MartinThoma, could you please review/merge this pull request? |
Moving the coverage config is also not a big deal for me |
I understand your hesitation, but I'm trying to move the Python developer community towards the new standard. I'll mention again that Of course, this is your project, and it's your decision. But is there anything I can do to relieve your fears and help you migrate to the new standard? |
Perhaps it'd help to list out your workflow for doing packaging and releasing here? I think you use By listing out the explicit steps, can then show what that'd look like via flit (or whatever) instead with the |
When I release a new version, I do this:
The only thing that would change is the command behind
Huh, that is interesting. I didn't know that. Thanks for sharing! |
@MasterOdin If I understand your comment right, you would also be in favor of merging this PR? |
Currently, I see that you have |
My comment was more that I think on merging this, it would ideally be that your workflow would ideally not change, or become simpler, and that @singingwolfboy PR would include this. So from the above, the question would be if As for whether this should be done, I would classify myself as largely "neutral" in merging this. I think that the goal of consolidating around Then you've got stuff like the fact that pip recommends everyone uses pyproject.toml, but still uses the legacy setup.py setup (amongst other very popular projects) and so doesn't necessarily inspire confidence that the format won't change in the future requiring maintenance overhead... |
How can I inspect the artifact flit creates before / without uploading it? |
You can use |
Indeed! Thank you for pointing that out -- I believe I've made the necessary changes in this PR so that the workflow should be unchanged.
True. To be fair, packaging in the Python ecosystem has been more-or-less a dumpster fire for roughly as long as the Python ecosystem has existed. To me, |
Agreed on both points. |
I'm currently checking the distribution files. Left is old, right is new. WheelI changed the order of entries on the left so that the diff is easier to read
The file |
edit: I just needed to make sure the repo is clean. I leave this here as it might help other people making their first steps with flit
|
sdist: Needs adjustment❌ The new sdist should look more similar to the old one. That means the following files/folders should not be added: That should be possible: https://flit.pypa.io/en/stable/pyproject_toml.html#sdist-section @singingwolfboy Would you mind to add this? |
For the license, I see https://flit.pypa.io/en/stable/flit_ini.html?highlight=license#metadata-section
PEP 639 (draft status) seems very relevant. I need to read that. However, if the generated distributions (sdist / wheel) would be the same for the License topic, we could probably merge this PR sooner. Only if the format changes we need to have the discussion now. |
@singingwolfboy Thank you for all the work you already put into this 🙏 If you want to focus on other topics, I would understand that. In this case I could very likely figure out the rest by myself (in a follow-up change). Just let me know how you would like to proceed :-) |
@singingwolfboy If you add the two suggested changes, the PR would be fine and could be merged as-is :-) |
Co-authored-by: Martin Thoma <[email protected]>
Co-authored-by: Martin Thoma <[email protected]>
Co-authored-by: Martin Thoma <[email protected]>
Co-authored-by: Martin Thoma <[email protected]>
It's merged! Thank you @singingwolfboy for your work and for helping the Python community to move forward ❤️ |
You're very welcome! And thank you for being so thorough with your review, and for pushing this PR the last few steps over the finish line. 😄 |
Now that we use `flit` for building the packages, we have the `pyproject.toml` as the ground truth (see #1382). This PR removes the duplicated data from the `setup.cfg` to avoid confusion. Only the name of the license is additionally added to the docs to simplify peoples lives.
The
pyproject.toml
file is the new standard for project configuration in Python. It is the preferred configuration file forpip
, and many other tools support it as well. This pull request moves as much of the project configuration as possible into this file, deleting the now-unnecessary files that they used to live in.Note that this pull request also deletes
setup.cfg
andsetup.py
! For more information about how this project can be packaged and uploaded to PyPI, see theflit
documentation.flit
handles the heavy lifting for interfacing with PyPI. (Users do not needflit
installed on their computer in order to install this project! As I said,pip
supports this build system, and has for many years now.)