Skip to content

Leading zeros in version are removed when building wheels #3705

@rschmied

Description

@rschmied
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Linux 5.10.15-1024 ClearLinux
  • Poetry version: 1.1.4

Issue

we use the git short commit as part of our version scheme for the wheels (and the rpm package that we ultimately build). however, when the short commit (8 chars) has leading zeros, then Poetry treats that as a number and removes them. Which ultimately leads to a different wheel name than we expect.

To me, this looks like a bug and the version string should not change the output...

$ poetry version 2.2.0.dev0+build.05669607
Bumping version from 2.2.0-dev0 to 2.2.0.dev0+build.05669607
$ poetry build
Building ourpkg (2.2.0.dev0+build.05669607)
 - Building sdist
 - Built ourpkg-2.2.0.dev0+build.5669607.tar.gz
 - Building wheel
 - Built ourpkg-2.2.0.dev0+build.5669607-py3-none-any.whl
$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions