-
Notifications
You must be signed in to change notification settings - Fork 400
packaging: Move to pyproject.toml setup (PEP517) #9563
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
base: master
Are you sure you want to change the base?
Conversation
This is a more future-proof way to package the `lakefs` wrapper project. No functional changes intended, except that instead of excluding the tests, we now explicitly include the `lakectl` and `lakefs` packages instead, which means that the docs folder not being pasted directly into the site-packages directory anymore. This also enables lakefs to use PEP517 build backends such as `build`. In fact, this change was tested with the `python -m build . -w` command, which gives the expected results.
Homepage = "https://github.com/treeverse/lakeFS/tree/master/clients/python-wrapper" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] |
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 don't think this is necessary, it is the default AFAIK.
aws-iam = [ | ||
"boto3 >= 1.26.0", | ||
] | ||
test = [ |
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.
This seems like a good case for dependency-groups
instead of introducing a new extra
, but that's upto the maintainers to decide. Alternatively, this could be removed as there is requirements.txt
for testing.
Thanks for the thorough review! I took over all your proposed changes, and feel the same way about dependency groups. |
all = [ "boto3 >= 1.26.0" ] | ||
aws-iam = [ "boto3 >= 1.26.0" ] |
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.
hi, dependency-groups
and extras
(aka project.optional-dependencies
) aren't the same thing. extras
are for package distributions whereas dependency-groups
are project dependencies, similar to requirements.txt
files.
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.
got it, so test
moves into a dependency group, while all
and aws-iam
return to optional-dependencies
?
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.
yes, looks good as you have done. :)
This is a more future-proof way to package the
lakefs
wrapper project.No functional changes intended, except that instead of excluding the tests, we now explicitly include the
lakectl
andlakefs
packages instead, which means that the docs folder not being pasted directly into the site-packages directory anymore.This also enables lakefs to use PEP517 build backends such as
build
. In fact, this change was tested with thepython -m build . -w
command, which gives the expected results.Hey all, I browsed a bit in the
lakefs
package trying to locate a version, and saw the opportunity to modernize the wheel builds a little. Feel free to close if this is not your preferred style, but I find the convenience of PEP517 backends worth having.