-
Notifications
You must be signed in to change notification settings - Fork 162
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
build: use PEP517/518 conventions #100
Conversation
Move most content of setup.py to setup.cfg
Move most content of setup.py to setup.cfg
This pull requests implements several changes in the build and testing process. Package layoutAll package code is in a Code coverageThe code coverage now works as expected, meaning that the report uploaded to Codecov does not show 0% anymore. PEP 517/518The biggest change deals with the build process. Following PEP 517 and PEP 518, the standartized way to package library is by using
Note that the The old way of building and installing ( Github ActionsI modified the Github actions and the CircleCI config to reflect the previous changes. I also cleaned and formatted a bit (especially the titles). Version numberNow the package version number is defined once, in |
@oboulant I'll merge this PR in a couple of days so that we can discuss it a bit. |
Following the changes, the repo can be cleaned a bit:
|
On a side note, the package version number is now defined once, in |
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 !
Merging now then! |
@@ -1,7 +1,7 @@ | |||
[build-system] | |||
# Minimum requirements for the build system to execute. | |||
requires = [ | |||
"setuptools", | |||
"setuptools>=38.3.0", # version with most `setup.cfg` bugfixes |
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.
Tiny suggestion: I recommend >=42 for use in pyproject.toml. I spend about an hour once debugging a broken build, and it turned out I didn't specify a minimum, and it was grabbing a cached copy of 41.somthing instead of the latest version, which had critical bugs for PEP 517 builds. If you don't make a PEP 517 build, then this is ignored anyway, and if you are building PEP 517, you want 42+ and can always get it. ;) See https://scikit-hep.org/developer/packaging#pep-517518-support-high-priority
PS: Great work on the NumPy requirements, that's what I came here to look at. :)
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.
It might have been 40.something, but whatever it was the devs told me to go with 42+.
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.
Thanks, we will make the change then!
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.
See https://scikit-hep.org/developer/packaging#pep-517518-support-high-priority
Nice read!
PS: Great work on the NumPy requirements, that's what I came here to look at. :)
Many thanks! I
setup.py
tosetup.cfg
andpyproject.toml
(except cython related extensions), following PEP517/518EDIT: see #100 (comment) for a summary of this PR.