Skip to content

[BUG] tarball version suffix get trimmed #4302

@Abacn

Description

@Abacn

setuptools version

69.3.0 and above

Python version

Python 3.8

OS

Linux / macOS / windows

Additional environment information

No response

Description

Found in apache/beam#30955,

setuptools trim the version number of ".0" when tarball gets built

If the package version is 1.0.0, now, it trimmed to 1.

If the package version is 1.0.0.dev0, now, it trimmed to 1.dev0

Expected behavior

Version name should be consistent of that assigned to.

How to Reproduce

Here is a minimum setup.py

import setuptools setuptools.setup( name="dumb-project", version="1.0.0", description="test project", install_requires=[] ) 

Prior to 69.3.0, run python setup.py sdist produces a tarball named dist/dumb-project-1.0.0.tar.gz, as expected. Now, it produces a tarball named `dist/dumb-project-1.tar.gz

Output

setuptools 69.2.0

python setup.py sdist running sdist running egg_info writing dumb_project.egg-info/PKG-INFO writing dependency_links to dumb_project.egg-info/dependency_links.txt writing top-level names to dumb_project.egg-info/top_level.txt reading manifest file 'dumb_project.egg-info/SOURCES.txt' writing manifest file 'dumb_project.egg-info/SOURCES.txt' warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md running check creating dumb-project-1.0.0 creating dumb-project-1.0.0/dumb_project.egg-info copying files to dumb-project-1.0.0... copying setup.py -> dumb-project-1.0.0 copying dumb_project.egg-info/PKG-INFO -> dumb-project-1.0.0/dumb_project.egg-info copying dumb_project.egg-info/SOURCES.txt -> dumb-project-1.0.0/dumb_project.egg-info copying dumb_project.egg-info/dependency_links.txt -> dumb-project-1.0.0/dumb_project.egg-info copying dumb_project.egg-info/top_level.txt -> dumb-project-1.0.0/dumb_project.egg-info copying dumb_project.egg-info/SOURCES.txt -> dumb-project-1.0.0/dumb_project.egg-info Writing dumb-project-1.0.0/setup.cfg Creating tar archive removing 'dumb-project-1.0.0' (and everything under it) 

setuptools 69.3.0:

$ python setup.py sdist running sdist running egg_info writing dumb_project.egg-info/PKG-INFO writing dependency_links to dumb_project.egg-info/dependency_links.txt writing top-level names to dumb_project.egg-info/top_level.txt reading manifest file 'dumb_project.egg-info/SOURCES.txt' writing manifest file 'dumb_project.egg-info/SOURCES.txt' warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md running check creating dumb_project-1 creating dumb_project-1/dumb_project.egg-info copying files to dumb_project-1... copying setup.py -> dumb_project-1 copying dumb_project.egg-info/PKG-INFO -> dumb_project-1/dumb_project.egg-info copying dumb_project.egg-info/SOURCES.txt -> dumb_project-1/dumb_project.egg-info copying dumb_project.egg-info/dependency_links.txt -> dumb_project-1/dumb_project.egg-info copying dumb_project.egg-info/top_level.txt -> dumb_project-1/dumb_project.egg-info copying dumb_project.egg-info/SOURCES.txt -> dumb_project-1/dumb_project.egg-info Writing dumb_project-1/setup.cfg Creating tar archive removing 'dumb_project-1' (and everything under it) 

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions