Skip to content

Conversation

@smoors
Copy link
Contributor

@smoors smoors commented Jun 28, 2025

if downloading an extension fails, 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)

when this is merged, i would recommend to always use the exact name of the package listed on PyPI as the extension name:

  • it ensures EB tries to download the 2 name formats if there are hyphens in the name
  • users are more likely to search for this name when using e.g. module spider <package>
  • it standardizes the naming of extensions in Lmod (module spider), avoiding that the same package is available with 2 different names, and thus easier to find all installed versions.

at some point we might consider switching to the underscore for the tarball on 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

@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 for the extension name. i meant first trying with underscore for the tarball, as the hyphen should normally only be used to separate the name from the version in the tarball.

Copy link
Member

@jfgrimm jfgrimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jfgrimm jfgrimm merged commit 2885cad into easybuilders:develop Nov 27, 2025
39 checks passed
@boegel boegel changed the title retry fetching extensions from PyPI with alternative download_filename retry fetching extensions from PyPI with alternative download_filename Dec 3, 2025
@boegel boegel changed the title retry fetching extensions from PyPI with alternative download_filename retry fetching source file for extensions from PyPI with alternative filename (with - replaced with _) Dec 3, 2025
@boegel boegel changed the title retry fetching source file for extensions from PyPI with alternative filename (with - replaced with _) retry fetching source file for extensions from PyPI with alternative filename (with - replaced with _ in extension name) Dec 3, 2025
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.

4 participants