Browse Source

fix setuptools:wheel target

master
Niklas Rosenstein 5 months ago
parent
commit
323c4eb35a
Signed by: NiklasRosenstein <rosensteinniklas@gmail.com> GPG Key ID: 06D269B33D25F6C6
2 changed files with 8 additions and 1 deletions
  1. +6
    -0
      .changelog/_unreleased.yml
  2. +2
    -1
      src/shore/plugins/setuptools.py

+ 6
- 0
.changelog/_unreleased.yml View File

@@ -0,0 +1,6 @@
- types:
- fix
issues: []
components:
- setuptools
description: Fix how the `setuptools:wheel` build target determines the generated wheel filename.

+ 2
- 1
src/shore/plugins/setuptools.py View File

@@ -93,7 +93,8 @@ class SetuptoolsBuildTarget:
@override
def get_build_artifacts(self) -> Iterable[str]:
if self.build_type == 'bdist_wheel':
yield '{}-{}-py2.py3-none-any.whl'.format(self.package.name, self.package.version)
py = 'py2.py3' if self.package.is_universal() else ('py' + sys.version[0])
yield '{}-{}-{}-none-any.whl'.format(self.package.name.replace('-', '_'), self.package.version, py)
else:
for f in self.formats:
yield '{}-{}{}'.format(self.package.name, self.package.version, self._FORMATS_MAP[f])


Loading…
Cancel
Save