zestsoftware / zest.releaser

Python software releasing made easy and repeatable
https://zestreleaser.readthedocs.io
GNU General Public License v2.0
198 stars 62 forks source link

Use build to generate wheels and sdists #411

Closed gforcada closed 12 months ago

gforcada commented 1 year ago

If there was not enough packages to handle a distribution, now comes another one 🎉

build

Quoting from its documentation:

build manages pyproject.toml-based builds, invoking build-backend hooks as appropriate to build a distribution package. It is a simple build tool and does not perform any dependency management.

Not sure what exactly means by pyproject.toml-based builds, as I was testing it with plone.batching and the only data in pyproject.toml is about towncrier nothing about building 🤔

It's worth exploring though 👍🏾

rnixx commented 1 year ago

I just tried to use zest.releaser for a project using pyproject.toml only (no setup.cfg and no setup.py)

It seems zest.releaser not supports pyproject.toml at all (right now)

I ended up using build and twine manually (python -m build && twine upload)

jensens commented 1 year ago

Having a pyproject.toml, then usingbuild and twine seems to become/ already is the modern and consolidated way to release packages. All this is backed by PEPs and so agreed on.

gforcada commented 1 year ago

Nice ✨

twine is already being used by zest.releaser and build I think it only works with pure python source distributions, so, at least for almost all plone related packages might be enough 👍🏾

reinout commented 1 year ago

@mauritsvanrees has already added .toml support, see the changelog. He released it as alpha, so 8.0 isn't available yet. We're a bit conservative in new stuff as there's quite some old zope/plone stuff that should not break :-)

Maurits, would you say it is OK to do a real 8.0 release?

mauritsvanrees commented 1 year ago

I was hoping we could do some more modernisation and switch to using build, or in some other way support packages that no longer have a setup.py. See the current issue and also the much older issue #364. But that may take longer than we want, and the 8.0.0 alpha versions already have enough good improvements that it makes sense to release 8.0.0.

Maybe in an 8.1 release we can start calling build if setup.py is not available. Maybe always call it if the user explicitly requests this via a [zest.releaser] use_build=true setting in .pypirc or setup.cfg. And if it works well, we can make this the default, or the only option, in version 9. Just thinking out loud here.

Okay, I have released 8.0.0 final: https://pypi.org/project/zest.releaser/8.0.0/

reinout commented 1 year ago

build looks nice, btw. I especially like its verbosity. It really explains what it is doing and what it is including (and why).

reinout commented 12 months ago

Fixed in #415