Skip to content

Conversation

smoors
Copy link
Contributor

@smoors smoors commented Jun 28, 2025

retry by replacing hyphen with underscore in the name: abc-def-%(version).tar.gz -> abc_def-%(version).tar.gz

only done if:

  • it's an extension
  • download from PyPI
  • there's only 1 source url
  • default filename is used (no sources or source_tmpl specified)

at some point we should probably switch to using the underscore in the first try, as that is the recommended name format, see
https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-file-name

recommendation: always specify the name of the package as shown on PyPI:

  • it ensures EB tries to download the 2 name formats if there are hyphens in the name
  • users are more likely to search for it
  • it standardizes the naming of extensions in Lmod (module spider), avoiding that the same package is available with 2 different names

@Flamefire
Copy link
Contributor

at some point we should probably switch to using the underscore in the first try,

Couldn't there be packages like very_cool-software? And some packages are named foo_bar or on PyPI so we should keep the spelling of PyPI although in general it should by hyphens.

@smoors
Copy link
Contributor Author

smoors commented Jun 30, 2025

at some point we should probably switch to using the underscore in the first try,

Couldn't there be packages like very_cool-software? And some packages are named foo_bar or on PyPI so we should keep the spelling of PyPI although in general it should by hyphens.

yes, we should keep the spelling of PyPI. i meant first trying with underscore for the tarball, as the hyphen should normally only be used to separate the name from the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants