-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add support for pyproject.toml #415
Conversation
Co-authored-by: Reinout van Rees <reinout@vanrees.org>
Co-authored-by: Reinout van Rees <reinout@vanrees.org>
Co-authored-by: Reinout van Rees <reinout@vanrees.org>
Co-authored-by: Reinout van Rees <reinout@vanrees.org>
@mauritsvanrees : I talked with @elisallenens. Let's ignore the isort/black stuff and do that in a separate PR. We don't have a |
@mauritsvanrees : tests pass and it looks good to me now. So it is ready for you to give it a quick peek. |
Forgot one docs section, but I think I've got everything now. |
I'll merge it, then I can more easily do some tests on 'master'. |
Two things I wondered, but maybe it is in the comments above. Why I wonder if we should just be calling |
I found an example that uses both. It has for example:
So should be fine the way we have it now. |
Some more reports for good measure. I am releasing a couple of Plone packages. In general it works fine. No real problems. What is not nice though, is that One is this:
The other is the following, possibly repeated for several directories:
It is good that I see this, but I would want to ignore it, without getting asked that question. It also interferes with the We could add this to the So: not really much that we can do about I fear. Something to get used to. cc @gforcada as you will see this too. This is when using the |
pyproject.toml (and toml in general) uses dots for namespacing. If you write something like this: [tool.zest.releaser]
release = false
[tool.pytest]
minversion = "6.0" a parsing library, like tomli, will parse it like this: {
"tool": {
"zest": {
"releaser": {
"release": False
}
},
"pytest": {
"minversion": "6.0"
}
}
} which is fine if releaser is a subpackage of the zest package, and you will also have other zest subpackages, as is the case in the examples posted above; with [tool.zest-releaser]
release = false
[tool.pytest]
minversion = "6.0" which would be parsed as {
"tool": {
"zest-releaser": {
"release": False
},
"pytest": {
"minversion": "6.0"
}
}
} I couldn't find any other packages with dots in the package name itself, so I don't know about the wider Python consensus. |
@mauritsvanrees : so "build" is effectively educating us all to modernize our packages :-) Perhaps a |
@elisallenens : agree, |
@elisallenens Thanks for the explanation, makes sense. @reinout The problem is that we only have Actually, your suggestion could work. We could optionally ignore whatever is in Let's see. We only do the fancy errors/warning detection here. We do this when the process has a non-zero exit code, or For the Previously, we would call |
We only need to look at the exit code to see if it worked. See #415 (comment)
We only need to look at the exit code to see if it worked. See #415 (comment)
Implements #412 by adding support for pyproject.toml. To facilitate this, a new
ZestReleaserConfig
class has been made, which reads the zest.releaser settings from theSetupConfig
,PypiConfig
andPyprojectTomlConfig
classes. Python packages are now built using pypa/build instead of invoking setup.py directly.