Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also consider 'normalised' package name with underscore rather than dash in EasyBuild easyblock #3358

Merged

Conversation

boegel
Copy link
Member

@boegel boegel commented Jun 12, 2024

Recent versions of setuptools (>=69.0.3?) enforce normalized package names by replacing dashes (-) with underscores (_) in the package name.

This affects the source tarballs of EasyBuild v4.9.2 (and likely also more recent versions going forward), so the custom easyblock for installing EasyBuild must consider package names with both dash (like easybuild-framework) and underscore (like easybuild_framework).

Without this, installing EasyBuild v4.9.2 with an existing EasyBuild release like v4.9.1 fails with an error like:

Failed to find required EasyBuild package easybuild-framework (subdirs: ['easybuild_easyconfigs-4.9.2', 'easybuild_framework-4.9.2', 'easybuild_easyblocks-4.9.2'], seldirs: [])")

That's because it's expecting to find a subdirectory like easybuild-framework-4.9.2 after unpacking the source tarball for easybuild-framework v4.9.2, but only easybuild_framework-4.9.2 is found (alongside the subdirectory for the unpacked easybuild-easyblocks and easybuild-easyconfigs packages).

This is annoying, since anyone who will be using eb --install-latest-eb-release or eb EasyBuild-4.9.2.eb (or equivalent, via --from-pr) will be hitting this, unless they use eb --include-easyblocks-from-pr 3358.

edit: more info on the reason why - is replaced with _ can be found in https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode:

In distribution names, any run of -_. characters (HYPHEN-MINUS, LOW LINE and FULL STOP) should be replaced with _ (LOW LINE)

This is for names of binary distributions, for it also applies to source distributions, see https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-file-name:

The file name must be in the form {name}-{version}.tar.gz, where {name} is normalised according to the same rules as for binary distributions

@boegel boegel added the bug fix label Jun 12, 2024
@boegel boegel added this to the release after 4.9.2 milestone Jun 12, 2024
Copy link
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

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

lgtm

@Micket Micket merged commit ae26ec0 into easybuilders:develop Jun 12, 2024
41 checks passed
@boegel
Copy link
Member Author

boegel commented Jun 12, 2024

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS EasyBuild-4.9.1.eb
  • SUCCESS EasyBuild-4.9.2.eb

Build succeeded for 2 out of 2 (2 easyconfigs in total)
node3111.skitty.os - Linux RHEL 8.8, x86_64, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz, Python 3.6.8
See https://gist.github.com/boegel/2a8065571f3202fc47546cc5f144d2fd for a full test report.

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

Successfully merging this pull request may close these issues.

2 participants