From 8d6a293820589ad38236e4d71c319235a94986cf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 18 Dec 2024 13:37:52 +0100 Subject: [PATCH 1/3] {tools}[system] EasyBuild v5.0.0beta1 (WIP) --- .../e/EasyBuild/EasyBuild-5.0.0beta1.eb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/e/EasyBuild/EasyBuild-5.0.0beta1.eb diff --git a/easybuild/easyconfigs/e/EasyBuild/EasyBuild-5.0.0beta1.eb b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-5.0.0beta1.eb new file mode 100644 index 00000000000..ed54b7bbacd --- /dev/null +++ b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-5.0.0beta1.eb @@ -0,0 +1,35 @@ +easyblock = 'EB_EasyBuildMeta' + +name = 'EasyBuild' +version = '5.0.0beta1' + +homepage = 'https://easybuild.io' +description = """EasyBuild is a software build and installation framework + written in Python that allows you to install software in a structured, + repeatable and robust way.""" + +toolchain = SYSTEM + +source_urls = [ + 'https://github.com/easybuilders/easybuild-framework/archive/', + 'https://github.com/easybuilders/easybuild-easyblocks/archive/', + 'https://github.com/easybuilders/easybuild-easyconfigs/archive/', +] +sources = [ + 'easybuild-framework-v%(version)s.tar.gz', + 'easybuild-easyblocks-v%(version)s.tar.gz', + 'easybuild-easyconfigs-v%(version)s.tar.gz', +] + +# EasyBuild is a (set of) Python packages, so it depends on Python +# usually, we want to use the system Python, so no actual Python dependency is listed +allow_system_deps = [('Python', SYS_PYTHON_VERSION)] + +local_pyshortver = '.'.join(SYS_PYTHON_VERSION.split('.')[:2]) + +sanity_check_paths = { + 'files': ['bin/eb'], + 'dirs': ['lib/python%s/site-packages' % local_pyshortver], +} + +moduleclass = 'tools' From 0fb89ced2c5f47625deea4a6e2d9e0725c459d12 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 21 Dec 2024 22:59:05 +0100 Subject: [PATCH 2/3] add test to check easyconfig that would be picked by 'eb --install-latest-eb-release' --- test/easyconfigs/easyconfigs.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index 4b1c4dd770e..921871be93f 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -1011,6 +1011,30 @@ def test_easyconfig_locations(self): if not dirpath.endswith('/easybuild/easyconfigs'): self.fail("There should be no easyconfig files in %s, found %s" % (dirpath, easyconfig_files)) + def test_easybuild_easyconfigs_latest_release(self): + """ + Check which easyconfig file would be picked up by 'eb --install-latest-eb-release' + """ + # this mimics the logic used in the find_easybuild_easyconfig used by EasyBuild framework + # to obtain an easyconfig file when --install-latest-eb-release is used + topdir = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) + easybuild_dir = os.path.join(topdir, 'easybuild', 'easyconfigs', 'e', 'EasyBuild') + ecs = os.listdir(easybuild_dir) + + file_versions = [] + for ec in ecs: + txt = read_file(os.path.join(easybuild_dir, ec)) + for line in txt.split('\n'): + if re.search(r'^version\s*=', line): + scope = {} + exec(line, scope) + version = scope['version'] + file_versions.append((LooseVersion(version), ec)) + + most_recent = sorted(file_versions)[-1] + self.assertEqual(most_recent[0], LooseVersion('4.9.4')) + self.assertEqual(most_recent[1], 'EasyBuild-4.9.4.eb') + def test_easyconfig_name_clashes(self): """Make sure there is not a name clash when all names are lowercase""" topdir = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) From 49011fa63910e3061a472c965345d8c7320f00ee Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 21 Dec 2024 23:33:11 +0100 Subject: [PATCH 3/3] use '0.5.0.0beta1' as version for EasyBuild v5.0.0beta1, to avoid 'eb --install-latest-eb-release' picking up on EasyBuild v5.0.0beta1 --- .../e/EasyBuild/EasyBuild-0.5.0.0beta1.eb | 59 +++++++++++++++++++ .../e/EasyBuild/EasyBuild-5.0.0beta1.eb | 35 ----------- 2 files changed, 59 insertions(+), 35 deletions(-) create mode 100644 easybuild/easyconfigs/e/EasyBuild/EasyBuild-0.5.0.0beta1.eb delete mode 100644 easybuild/easyconfigs/e/EasyBuild/EasyBuild-5.0.0beta1.eb diff --git a/easybuild/easyconfigs/e/EasyBuild/EasyBuild-0.5.0.0beta1.eb b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-0.5.0.0beta1.eb new file mode 100644 index 00000000000..434df6f94dc --- /dev/null +++ b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-0.5.0.0beta1.eb @@ -0,0 +1,59 @@ +easyblock = 'EB_EasyBuildMeta' + +name = 'EasyBuild' +version = '0.5.0.0beta1' + +homepage = 'https://easybuild.io' +description = """EasyBuild is a software build and installation framework + written in Python that allows you to install software in a structured, + repeatable and robust way.""" + +toolchain = SYSTEM + +sources = [ + { + 'filename': 'easybuild-framework-v%s.tar.gz' % version[2:], + 'git_config': { + 'url': 'https://github.com/easybuilders', + 'repo_name': 'easybuild-framework', + 'tag': 'easybuild-framework-v%s' % version[2:], + 'keep_git_dir': True, + }, + }, + { + 'filename': 'easybuild-easyblocks-v%s.tar.gz' % version[2:], + 'git_config': { + 'url': 'https://github.com/easybuilders', + 'repo_name': 'easybuild-easyblocks', + 'tag': 'easybuild-easyblocks-v%s' % version[2:], + 'keep_git_dir': True, + }, + }, + { + 'filename': 'easybuild-easyconfigs-v%s.tar.gz' % version[2:], + 'git_config': { + 'url': 'https://github.com/easybuilders', + 'repo_name': 'easybuild-easyconfigs', + 'tag': 'easybuild-easyconfigs-v%s' % version[2:], + 'keep_git_dir': True, + }, + }, +] +checksums = [ + None, + None, + None, +] + +# EasyBuild is a (set of) Python packages, so it depends on Python +# usually, we want to use the system Python, so no actual Python dependency is listed +allow_system_deps = [('Python', SYS_PYTHON_VERSION)] + +local_pyshortver = '.'.join(SYS_PYTHON_VERSION.split('.')[:2]) + +sanity_check_paths = { + 'files': ['bin/eb'], + 'dirs': ['lib/python%s/site-packages' % local_pyshortver], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/e/EasyBuild/EasyBuild-5.0.0beta1.eb b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-5.0.0beta1.eb deleted file mode 100644 index ed54b7bbacd..00000000000 --- a/easybuild/easyconfigs/e/EasyBuild/EasyBuild-5.0.0beta1.eb +++ /dev/null @@ -1,35 +0,0 @@ -easyblock = 'EB_EasyBuildMeta' - -name = 'EasyBuild' -version = '5.0.0beta1' - -homepage = 'https://easybuild.io' -description = """EasyBuild is a software build and installation framework - written in Python that allows you to install software in a structured, - repeatable and robust way.""" - -toolchain = SYSTEM - -source_urls = [ - 'https://github.com/easybuilders/easybuild-framework/archive/', - 'https://github.com/easybuilders/easybuild-easyblocks/archive/', - 'https://github.com/easybuilders/easybuild-easyconfigs/archive/', -] -sources = [ - 'easybuild-framework-v%(version)s.tar.gz', - 'easybuild-easyblocks-v%(version)s.tar.gz', - 'easybuild-easyconfigs-v%(version)s.tar.gz', -] - -# EasyBuild is a (set of) Python packages, so it depends on Python -# usually, we want to use the system Python, so no actual Python dependency is listed -allow_system_deps = [('Python', SYS_PYTHON_VERSION)] - -local_pyshortver = '.'.join(SYS_PYTHON_VERSION.split('.')[:2]) - -sanity_check_paths = { - 'files': ['bin/eb'], - 'dirs': ['lib/python%s/site-packages' % local_pyshortver], -} - -moduleclass = 'tools'