pypa / packaging-problems

An issue tracker for the problems in packaging
151 stars 35 forks source link

build strips trailing zero in version #750

Closed mxjeff closed 6 months ago

mxjeff commented 7 months ago

Problem description

Building a release for a version with trailing zeros, ie. x.x.0 or x.0.0 will strip zero in source distribution but not in wheel.

For instance:

[project]
name = "mymodule"
version = "1.0.0"

[build-system]
requires = ["setuptools>=61.0.0"]

will build mymodule-1.tar.gz and mymodule-1.0.0-py3-none-any.whl.

I'm pretty sure it previously kept last zeros, here is a build (cf. l168) where it builds as expected.

Am I missing something?

merwok commented 7 months ago

Can you try with the version of setuptools that used to worked? If you find the latest version that worked and the first one that doesn’t, you’ll be able to report this to the setuptools tracker.

pfmoore commented 7 months ago

Probably related to this: https://github.com/pypa/setuptools/issues/3593#issuecomment-2052499814

mxjeff commented 7 months ago

The issue is indeed in setuptools cf. pypa/setuptools#4302, thanks for your help