Skip to content

Issue with filename for wheel with epoch version #6466

@wenkokke

Description

@wenkokke
  • 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: macOS 11
  • Poetry version: 1.2.0
  • Link of a Gist with the contents of your pyproject.toml file: n/a

Issue

When using a version number such as "1!1.0.0", the wheels generated by poetry have a filename with "1_1.0.0". This causes pip install to crash with the following error:
"ERROR: Could not build wheels for *, which is required to install pyproject.toml-based projects".

I believe that the following regular expression is at fault as it replaces the ! with _:

@property
def wheel_filename(self): # type: () -> str
return "{}-{}-{}.whl".format(
re.sub(r"[^\w\d.]+", "_", self._package.pretty_name, flags=re.UNICODE),
re.sub(r"[^\w\d.]+", "_", self._meta.version, flags=re.UNICODE),
self.tag,
)

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