-
Notifications
You must be signed in to change notification settings - Fork 63
BLD: move static metadata to pyproject.toml and explicitly specify build backend and requirements
#670
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
BLD: move static metadata to pyproject.toml and explicitly specify build backend and requirements
#670
Conversation
3d16cae to
6347c97
Compare
pyproject.toml\, explicitly specify build backend and requirementspyproject.toml and explicitly specify build backend and requirements
27325ae to
c6972e1
Compare
| @@ -0,0 +1,33 @@ | |||
| [build-system] | |||
| build-backend = "setuptools.build_meta" | |||
| requires = [ "pip", "setuptools>=77" ] | |||
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.
note: I've used setuptools>=77 here to get support for PEP 639 license specification (project.license-files), but unfortunately this version of setuptools isn't available for Python 3.8. Would it be okay to also drop support for this end-of-life version of Python too ?
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.
I'm in support of dropping it but Valentin should make the final call
|
Support for 3.13 is fine, I've been using it extensively with VIP for a few months without any problems |
|
yeah, I only noticed it wasn't explicitly tested, but I didn't hit any issue with it |
|
Hello, thanks for bringing this up. Well it's fine no need to mention me just ignore my pull request. I'll close it later |
91d5113 to
b18e4b8
Compare
|
Whoops, I see that CI was manually run but an import cycle failed it. It should be fixed now. Although, please note I still expect it to fail on Python 3.8 (but only on this version). See #670 (comment) |
|
Fun fact: Python 3.7 was dropped exactly 2 years ago today in #610 |
|
Oh, interesting, apparently CI doesn't catch the known issue with building on Python 3.8 because it never actually builds the package and instead runs against the source tree. This is also easy to fix, but requires a possibly disrupting change of the repository layout from flat to src. See this doc if this terminology is unfamiliar: https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout |
|
Hi @neutrinoceros - thanks so much for your PRs! As you guessed, I didn't find the time to sit down and do this properly lately, even though @Sand-jrd broke the back of the work in her PR. Conflicts inserted themselves in that PR due to accepting other PRs in the meantime... and I didn't find the time to solve them lately so the PR sort of stalled. Your help is very timely to push things forward!
|
That's a totally valid approach, but in case you want to get fancy, you could also use CLIs to bump it for you
See #671 for this point
If you don't mind I'd prefer keeping a reasonably small scope for this PR, especially because, as a first time contributor, my patches currently need manual approval before CI can be run, and I have a lot more where that comes from so I figure it might save everyone some time if I could open multiple PRs at once and have CI run in parallel. Your call ! |
|
I see a test already failed Unfortunately the same test seems to pass locally (tried on 2 different machines) so I'll just wait for CI to complete to see what's wrong. I also note that I couldn't run the entire test suite on either of my machines as it seems prohibitively costly (and I think I'm seeing some issues with parallelism) |
|
Hum, I think CI might actually have gotten stuck, and I have serious doubts that it could be related to my PR (instead, I suspect there might have been a change in the environment since the last successful run). Would it be possible to launch a control run against the master branch and see if it completes there ? |
|
Test 1 always takes the longest. Usually about 1h30m to 2h |
|
nevermind I got one to finish and I see now that the failure is also a symptom of a problem I already hinted at: CI is testing against the source tree, not a built package. Anyway I'll just work around it for this fundamental PR and will fix the workaround later on ! |
b18e4b8 to
120b908
Compare
…build backend and requirements
120b908 to
6a97aa5
Compare
|
CI finally looks good, thank you for your patience ! |
|
Fantastic! Thanks a lot @neutrinoceros!! |
This allows building the package from source with arbitrary build frontends, not just pip.
For instance, this allows:
or
having
pipas a build-time dependency is unsual and could easily be avoided by moving the information currently contained inrequirements.txtandrequirements-dev.txttopyproject.toml, but that would also break any existing development workflows explicitly relying on their presence, so I consider it out of scope for now, but please let me know if you'd like me to do it too, either here or as a follow up PR.I could also add explicit support for Python 3.12 and 3.13, but again, I'll treat it as out of scope unless explicitly agreed on first.