Skip to content

Commit

Permalink
Fix incorrect sdist filename
Browse files Browse the repository at this point in the history
This broke building packages with dashes in their names from source,
including this one.

As of a recent release of `setuptools`, sdist filenames now are in the
format `package_name-<version>.tar.gz` instead of
`package-name-<version>.tar.gz` (i.e. underscores in the package name
instead of dashes). This is the case even if the package name itself
has dashes in it.

pypa/setuptools#4214

pypa/setuptools#4167

This change is seemingly deliberate in order to conform to a standard
for filenames specifically even though the standard for project names
is increasingly to use dashes.
  • Loading branch information
chrisjbillington committed May 20, 2024
1 parent 51440f7 commit 20e39f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setuptools_conda/setuptools_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def run(self):
if self.from_wheel or self.from_downloaded_wheel:
dist = [p for p in os.listdir(self.build_dir) if p.endswith('.whl')][0]
else:
dist = f'{self.distribution.get_name()}-{self.VERSION}.tar.gz'
dist = f'{self.distribution.get_fullname()}.tar.gz'

with open(os.path.join(self.build_dir, dist), 'rb') as f:
sha256 = hashlib.sha256(f.read()).hexdigest()
Expand Down

0 comments on commit 20e39f2

Please sign in to comment.