From 27a6e93bc23b2f5f4379cb57ceca4ce669824816 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:20:42 +0200 Subject: [PATCH 01/13] check easyblocks and framework major are the same --- easybuild/main.py | 6 ++++++ easybuild/tools/version.py | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/easybuild/main.py b/easybuild/main.py index 42bd83dff5..0f89335a98 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -83,6 +83,7 @@ from easybuild.tools.repository.repository import init_repository from easybuild.tools.systemtools import check_easybuild_deps from easybuild.tools.testing import create_test_report, overall_test_report, regtest, session_state +from easybuild.tools.version import FRAMEWORK_VERSION, EASYBLOCKS_VERSION, different_major_versions _log = None @@ -618,6 +619,11 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None, pr (build_specs, _log, logfile, robot_path, search_query, eb_tmpdir, try_to_generate, from_pr_list, tweaked_ecs_paths) = cfg_settings + # compare running Framework and EasyBlocks versions + if different_major_versions(FRAMEWORK_VERSION, EASYBLOCKS_VERSION): + raise EasyBuildError(f"Framework ({FRAMEWORK_VERSION}) and EasyBlock ({EASYBLOCKS_VERSION}) major versions " + "are different.") + # load hook implementations (if any) hooks = load_hooks(options.hooks) diff --git a/easybuild/tools/version.py b/easybuild/tools/version.py index c01c8fc5c3..d9b2ce42a7 100644 --- a/easybuild/tools/version.py +++ b/easybuild/tools/version.py @@ -103,3 +103,16 @@ def this_is_easybuild(): msg = msg.encode('ascii') return msg + + +def different_major_versions(v1, v2): + """Compare major versions""" + # Deal with version instances being either strings or LooseVersion + if not isinstance(v1, LooseVersion): + v1 = LooseVersion(v1) + if not isinstance(v2, LooseVersion): + v2 = LooseVersion(v2) + + if v1.version[0] == v2.version[0]: + return False + return True From a91b1a4b0ed94a853e00a870a32b0dceaf5cc9e6 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:29:28 +0200 Subject: [PATCH 02/13] must support python < 3.6 --- easybuild/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/main.py b/easybuild/main.py index 0f89335a98..c93f1dc212 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -621,8 +621,8 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None, pr # compare running Framework and EasyBlocks versions if different_major_versions(FRAMEWORK_VERSION, EASYBLOCKS_VERSION): - raise EasyBuildError(f"Framework ({FRAMEWORK_VERSION}) and EasyBlock ({EASYBLOCKS_VERSION}) major versions " - "are different.") + raise EasyBuildError("Framework (%s) and EasyBlock (%s) major versions are different." % (FRAMEWORK_VERSION, + EASYBLOCKS_VERSION)) # load hook implementations (if any) hooks = load_hooks(options.hooks) From 31514bb9a4fa26ad3148340411cfbaf05cf1717f Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:36:42 +0200 Subject: [PATCH 03/13] deal with unknown blocks version --- easybuild/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/main.py b/easybuild/main.py index c93f1dc212..94bf7b46a8 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -620,7 +620,9 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None, pr from_pr_list, tweaked_ecs_paths) = cfg_settings # compare running Framework and EasyBlocks versions - if different_major_versions(FRAMEWORK_VERSION, EASYBLOCKS_VERSION): + if 'UNKNOWN' in EASYBLOCKS_VERSION: + print_msg('Unable to determine EasyBlocks version, so we'll assume it is not different from Framework') + elif different_major_versions(FRAMEWORK_VERSION, EASYBLOCKS_VERSION): raise EasyBuildError("Framework (%s) and EasyBlock (%s) major versions are different." % (FRAMEWORK_VERSION, EASYBLOCKS_VERSION)) From 5202f07081133fbe55510664b885452eb8f7675e Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:37:16 +0200 Subject: [PATCH 04/13] " and ' mixing --- easybuild/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/main.py b/easybuild/main.py index 94bf7b46a8..1e44609d4e 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -621,7 +621,7 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None, pr # compare running Framework and EasyBlocks versions if 'UNKNOWN' in EASYBLOCKS_VERSION: - print_msg('Unable to determine EasyBlocks version, so we'll assume it is not different from Framework') + print_msg("Unable to determine EasyBlocks version, so we'll assume it is not different from Framework") elif different_major_versions(FRAMEWORK_VERSION, EASYBLOCKS_VERSION): raise EasyBuildError("Framework (%s) and EasyBlock (%s) major versions are different." % (FRAMEWORK_VERSION, EASYBLOCKS_VERSION)) From 2724c8e28c0f05179639bd69f56d65420633981c Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:45:38 +0200 Subject: [PATCH 05/13] fix --- easybuild/main.py | 4 ++-- easybuild/tools/version.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/easybuild/main.py b/easybuild/main.py index 1e44609d4e..6dda9dc893 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -83,7 +83,7 @@ from easybuild.tools.repository.repository import init_repository from easybuild.tools.systemtools import check_easybuild_deps from easybuild.tools.testing import create_test_report, overall_test_report, regtest, session_state -from easybuild.tools.version import FRAMEWORK_VERSION, EASYBLOCKS_VERSION, different_major_versions +from easybuild.tools.version import EASYBLOCKS_VERSION, FRAMEWORK_VERSION, UNKNOWN_VERSION, different_major_versions _log = None @@ -620,7 +620,7 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None, pr from_pr_list, tweaked_ecs_paths) = cfg_settings # compare running Framework and EasyBlocks versions - if 'UNKNOWN' in EASYBLOCKS_VERSION: + if EASYBLOCKS_VERSION == UNKNOWN_VERSION: print_msg("Unable to determine EasyBlocks version, so we'll assume it is not different from Framework") elif different_major_versions(FRAMEWORK_VERSION, EASYBLOCKS_VERSION): raise EasyBuildError("Framework (%s) and EasyBlock (%s) major versions are different." % (FRAMEWORK_VERSION, diff --git a/easybuild/tools/version.py b/easybuild/tools/version.py index d9b2ce42a7..63275b69ff 100644 --- a/easybuild/tools/version.py +++ b/easybuild/tools/version.py @@ -47,6 +47,7 @@ # This causes problems further up the dependency chain... VERSION = LooseVersion('4.9.2.dev0') UNKNOWN = 'UNKNOWN' +UNKNOWN_VERSION = '0.0.UNKNOWN.EASYBLOCKS' def get_git_revision(): @@ -87,7 +88,7 @@ def get_git_revision(): try: from easybuild.easyblocks import VERBOSE_VERSION as EASYBLOCKS_VERSION except Exception: - EASYBLOCKS_VERSION = '0.0.UNKNOWN.EASYBLOCKS' # make sure it is smaller then anything + EASYBLOCKS_VERSION = UNKNOWN_VERSION # make sure it is smaller then anything def this_is_easybuild(): From 0a5c99f04d3d448974825e1d88f443c496a181e8 Mon Sep 17 00:00:00 2001 From: Simon Branford Date: Tue, 30 Apr 2024 19:39:43 +0100 Subject: [PATCH 06/13] address review --- easybuild/main.py | 3 ++- easybuild/tools/version.py | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/easybuild/main.py b/easybuild/main.py index 6dda9dc893..4ea569bbd4 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -60,6 +60,7 @@ from easybuild.framework.easyconfig.tools import det_easyconfig_paths, dump_env_script, get_paths_for from easybuild.framework.easyconfig.tools import parse_easyconfigs, review_pr, run_contrib_checks, skip_available from easybuild.framework.easyconfig.tweak import obtain_ec_for, tweak +from easybuild.tools.build_log import print_warning from easybuild.tools.config import find_last_log, get_repository, get_repositorypath, build_option from easybuild.tools.containers.common import containerize from easybuild.tools.docs import list_software @@ -621,7 +622,7 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None, pr # compare running Framework and EasyBlocks versions if EASYBLOCKS_VERSION == UNKNOWN_VERSION: - print_msg("Unable to determine EasyBlocks version, so we'll assume it is not different from Framework") + print_warning("Unable to determine EasyBlocks version, so we'll assume it is not different from Framework") elif different_major_versions(FRAMEWORK_VERSION, EASYBLOCKS_VERSION): raise EasyBuildError("Framework (%s) and EasyBlock (%s) major versions are different." % (FRAMEWORK_VERSION, EASYBLOCKS_VERSION)) diff --git a/easybuild/tools/version.py b/easybuild/tools/version.py index 63275b69ff..3b0c45d2bf 100644 --- a/easybuild/tools/version.py +++ b/easybuild/tools/version.py @@ -109,11 +109,9 @@ def this_is_easybuild(): def different_major_versions(v1, v2): """Compare major versions""" # Deal with version instances being either strings or LooseVersion - if not isinstance(v1, LooseVersion): + if isinstance(v1, str): v1 = LooseVersion(v1) - if not isinstance(v2, LooseVersion): + if isinstance(v2, str): v2 = LooseVersion(v2) - if v1.version[0] == v2.version[0]: - return False - return True + return v1.version[0] != v2.version[0] From d8be5ca9cde44780bae46f76a791026ef2c8161b Mon Sep 17 00:00:00 2001 From: Simon Branford Date: Tue, 30 Apr 2024 19:40:48 +0100 Subject: [PATCH 07/13] remove unneeded import --- easybuild/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/main.py b/easybuild/main.py index 4ea569bbd4..00b2899227 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -60,7 +60,6 @@ from easybuild.framework.easyconfig.tools import det_easyconfig_paths, dump_env_script, get_paths_for from easybuild.framework.easyconfig.tools import parse_easyconfigs, review_pr, run_contrib_checks, skip_available from easybuild.framework.easyconfig.tweak import obtain_ec_for, tweak -from easybuild.tools.build_log import print_warning from easybuild.tools.config import find_last_log, get_repository, get_repositorypath, build_option from easybuild.tools.containers.common import containerize from easybuild.tools.docs import list_software From 45a05454f64ec1963a63ce96a2c93110a12e6419 Mon Sep 17 00:00:00 2001 From: Simon Branford Date: Fri, 3 May 2024 09:38:52 +0100 Subject: [PATCH 08/13] paths --- easybuild/tools/github.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easybuild/tools/github.py b/easybuild/tools/github.py index ae9b78b5ed..9a70109c00 100644 --- a/easybuild/tools/github.py +++ b/easybuild/tools/github.py @@ -587,6 +587,11 @@ def fetch_files_from_pr(pr, path=None, github_user=None, github_account=None, gi else: raise EasyBuildError("Couldn't find path to patched file %s", full_path) + if github_repo == GITHUB_EASYCONFIGS_REPO: + print('get ecs version', os.path.join(final_path, 'setup.py')) + elif github_repo == GITHUB_EASYBLOCKS_REPO: + print('get blocks version', sys.path, final_path) + return files From ee2719840d17b7a7c0f198f6ec6abe2d55156abf Mon Sep 17 00:00:00 2001 From: Simon Branford Date: Sun, 5 May 2024 16:14:18 +0100 Subject: [PATCH 09/13] install easyblocks for framework tests --- .github/workflows/unit_tests.yml | 12 ++++++++++++ .github/workflows/unit_tests_python2.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 07ac74fe1a..d2c2dc3cbc 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -142,6 +142,18 @@ jobs: export PREFIX=/tmp/$USER/$GITHUB_SHA pip install --prefix $PREFIX dist/easybuild[-_]framework*tar.gz + - name: install easyblocks + run: | + cd $HOME + # first determine which branch of easybuild-easyblocks repo to install + BRANCH=develop + if [ "x$GITHUB_BASE_REF" = 'xmain' ]; then BRANCH=main; fi + if [ "x$GITHUB_BASE_REF" = 'x4.x' ]; then BRANCH=4.x; fi + echo "Using easybuild-easyblocks branch $BRANCH (\$GITHUB_BASE_REF $GITHUB_BASE_REF)" + git clone -b $BRANCH --depth 10 --single-branch https://github.com/easybuilders/easybuild-easyblocks.git + cd easybuild-easyblocks; git log -n 1; cd - + pip install $PWD/easybuild-easyblocks + - name: run test suite env: EB_VERBOSE: 1 diff --git a/.github/workflows/unit_tests_python2.yml b/.github/workflows/unit_tests_python2.yml index 1b921ee83c..252d5f7e6f 100644 --- a/.github/workflows/unit_tests_python2.yml +++ b/.github/workflows/unit_tests_python2.yml @@ -57,6 +57,18 @@ jobs: export PREFIX=/tmp/$USER/$GITHUB_SHA python2 -m pip install --prefix $PREFIX dist/easybuild-framework*tar.gz + - name: install easyblocks + run: | + cd $HOME + # first determine which branch of easybuild-easyblocks repo to install + BRANCH=develop + if [ "x$GITHUB_BASE_REF" = 'xmain' ]; then BRANCH=main; fi + if [ "x$GITHUB_BASE_REF" = 'x4.x' ]; then BRANCH=4.x; fi + echo "Using easybuild-easyblocks branch $BRANCH (\$GITHUB_BASE_REF $GITHUB_BASE_REF)" + git clone -b $BRANCH --depth 10 --single-branch https://github.com/easybuilders/easybuild-easyblocks.git + cd easybuild-easyblocks; git log -n 1; cd - + pip install $PWD/easybuild-easyblocks + - name: run test suite run: | # run tests *outside* of checked out easybuild-framework directory, From 9e9390458b35cff6a25a5036ab259425acf1e14c Mon Sep 17 00:00:00 2001 From: Simon Branford Date: Mon, 6 May 2024 13:10:36 +0100 Subject: [PATCH 10/13] log a warning, without adding a print statement when no easyblocks version determined --- .github/workflows/unit_tests.yml | 12 ------------ .github/workflows/unit_tests_python2.yml | 12 ------------ easybuild/main.py | 4 +++- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index d2c2dc3cbc..07ac74fe1a 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -142,18 +142,6 @@ jobs: export PREFIX=/tmp/$USER/$GITHUB_SHA pip install --prefix $PREFIX dist/easybuild[-_]framework*tar.gz - - name: install easyblocks - run: | - cd $HOME - # first determine which branch of easybuild-easyblocks repo to install - BRANCH=develop - if [ "x$GITHUB_BASE_REF" = 'xmain' ]; then BRANCH=main; fi - if [ "x$GITHUB_BASE_REF" = 'x4.x' ]; then BRANCH=4.x; fi - echo "Using easybuild-easyblocks branch $BRANCH (\$GITHUB_BASE_REF $GITHUB_BASE_REF)" - git clone -b $BRANCH --depth 10 --single-branch https://github.com/easybuilders/easybuild-easyblocks.git - cd easybuild-easyblocks; git log -n 1; cd - - pip install $PWD/easybuild-easyblocks - - name: run test suite env: EB_VERBOSE: 1 diff --git a/.github/workflows/unit_tests_python2.yml b/.github/workflows/unit_tests_python2.yml index 252d5f7e6f..1b921ee83c 100644 --- a/.github/workflows/unit_tests_python2.yml +++ b/.github/workflows/unit_tests_python2.yml @@ -57,18 +57,6 @@ jobs: export PREFIX=/tmp/$USER/$GITHUB_SHA python2 -m pip install --prefix $PREFIX dist/easybuild-framework*tar.gz - - name: install easyblocks - run: | - cd $HOME - # first determine which branch of easybuild-easyblocks repo to install - BRANCH=develop - if [ "x$GITHUB_BASE_REF" = 'xmain' ]; then BRANCH=main; fi - if [ "x$GITHUB_BASE_REF" = 'x4.x' ]; then BRANCH=4.x; fi - echo "Using easybuild-easyblocks branch $BRANCH (\$GITHUB_BASE_REF $GITHUB_BASE_REF)" - git clone -b $BRANCH --depth 10 --single-branch https://github.com/easybuilders/easybuild-easyblocks.git - cd easybuild-easyblocks; git log -n 1; cd - - pip install $PWD/easybuild-easyblocks - - name: run test suite run: | # run tests *outside* of checked out easybuild-framework directory, diff --git a/easybuild/main.py b/easybuild/main.py index 00b2899227..00bc362666 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -621,7 +621,9 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None, pr # compare running Framework and EasyBlocks versions if EASYBLOCKS_VERSION == UNKNOWN_VERSION: - print_warning("Unable to determine EasyBlocks version, so we'll assume it is not different from Framework") + # most likely reason is running framework unit tests with no easyblocks installation + # so log a warning, to avoid test related issues + _log.warning("Unable to determine EasyBlocks version, so we'll assume it is not different from Framework") elif different_major_versions(FRAMEWORK_VERSION, EASYBLOCKS_VERSION): raise EasyBuildError("Framework (%s) and EasyBlock (%s) major versions are different." % (FRAMEWORK_VERSION, EASYBLOCKS_VERSION)) From 1ec53a50c6ab92e671c51629de87d63218b6f3b7 Mon Sep 17 00:00:00 2001 From: Simon Branford Date: Mon, 6 May 2024 13:59:27 +0100 Subject: [PATCH 11/13] version check on from pr --- easybuild/tools/github.py | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/github.py b/easybuild/tools/github.py index 9a70109c00..5691be973c 100644 --- a/easybuild/tools/github.py +++ b/easybuild/tools/github.py @@ -60,6 +60,7 @@ from easybuild.tools.py2vs3 import HTTPError, URLError, ascii_letters, urlopen from easybuild.tools.systemtools import UNKNOWN, get_tool_version from easybuild.tools.utilities import nub, only_if_module_is_available +from easybuild.tools.version import FRAMEWORK_VERSION, different_major_versions _log = fancylogger.getLogger('github', fname=False) @@ -588,13 +589,38 @@ def fetch_files_from_pr(pr, path=None, github_user=None, github_account=None, gi raise EasyBuildError("Couldn't find path to patched file %s", full_path) if github_repo == GITHUB_EASYCONFIGS_REPO: - print('get ecs version', os.path.join(final_path, 'setup.py')) + ver = _get_version_for_repo(os.path.join(final_path, 'setup.py')) elif github_repo == GITHUB_EASYBLOCKS_REPO: - print('get blocks version', sys.path, final_path) + ver = _get_version_for_repo(os.path.join(final_path, 'easybuild', 'easyblocks', '__init__.py')) + + if different_major_versions(FRAMEWORK_VERSION, ver): + raise EasyBuildError("Framework (%s) is a different major version than PR target (%s)." % (FRAMEWORK_VERSION, + ver)) return files +def _get_version_for_repo(filename): + """Extract version from filename.""" + _log.debug("Extract version from %s" % filename) + + try: + ver_line = "" + with open(filename) as f: + for line in f.readlines(): + if line.startswith("VERSION "): + ver_line = line + break + + # version can be a string or LooseVersion + res = re.search(r"""^VERSION = .*['"](.*)['"].?$""", ver_line) + + _log.debug("PR target version is %s" % res.group(1)) + return res.group(1) + except: + raise EasyBuildError("Couldn't determine version of PR from %s" % filename) + + def fetch_easyblocks_from_pr(pr, path=None, github_user=None): """Fetch patched easyblocks for a particular PR.""" return fetch_files_from_pr(pr, path, github_user, github_repo=GITHUB_EASYBLOCKS_REPO) From 0b18d9607401dc8a80a222fc12cc883bb99d18a9 Mon Sep 17 00:00:00 2001 From: Simon Branford Date: Mon, 6 May 2024 14:01:44 +0100 Subject: [PATCH 12/13] flake8 --- easybuild/tools/github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/tools/github.py b/easybuild/tools/github.py index 5691be973c..0b5a2ff171 100644 --- a/easybuild/tools/github.py +++ b/easybuild/tools/github.py @@ -617,7 +617,7 @@ def _get_version_for_repo(filename): _log.debug("PR target version is %s" % res.group(1)) return res.group(1) - except: + except Exception: raise EasyBuildError("Couldn't determine version of PR from %s" % filename) From 4f7a4e44ce51baac570f7392ed3261c4036052a5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 5 Jun 2024 14:00:49 +0200 Subject: [PATCH 13/13] improve error message on version mismatch when using --from-pr + rename UNKNOWN_VERSION to UNKNOWN_EASYBLOCKS_VERSION --- easybuild/main.py | 5 +++-- easybuild/tools/github.py | 4 ++-- easybuild/tools/version.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/easybuild/main.py b/easybuild/main.py index 00bc362666..451152f322 100644 --- a/easybuild/main.py +++ b/easybuild/main.py @@ -83,7 +83,8 @@ from easybuild.tools.repository.repository import init_repository from easybuild.tools.systemtools import check_easybuild_deps from easybuild.tools.testing import create_test_report, overall_test_report, regtest, session_state -from easybuild.tools.version import EASYBLOCKS_VERSION, FRAMEWORK_VERSION, UNKNOWN_VERSION, different_major_versions +from easybuild.tools.version import EASYBLOCKS_VERSION, FRAMEWORK_VERSION, UNKNOWN_EASYBLOCKS_VERSION +from easybuild.tools.version import different_major_versions _log = None @@ -620,7 +621,7 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None, pr from_pr_list, tweaked_ecs_paths) = cfg_settings # compare running Framework and EasyBlocks versions - if EASYBLOCKS_VERSION == UNKNOWN_VERSION: + if EASYBLOCKS_VERSION == UNKNOWN_EASYBLOCKS_VERSION: # most likely reason is running framework unit tests with no easyblocks installation # so log a warning, to avoid test related issues _log.warning("Unable to determine EasyBlocks version, so we'll assume it is not different from Framework") diff --git a/easybuild/tools/github.py b/easybuild/tools/github.py index 0b5a2ff171..6a8401d7ae 100644 --- a/easybuild/tools/github.py +++ b/easybuild/tools/github.py @@ -594,8 +594,8 @@ def fetch_files_from_pr(pr, path=None, github_user=None, github_account=None, gi ver = _get_version_for_repo(os.path.join(final_path, 'easybuild', 'easyblocks', '__init__.py')) if different_major_versions(FRAMEWORK_VERSION, ver): - raise EasyBuildError("Framework (%s) is a different major version than PR target (%s)." % (FRAMEWORK_VERSION, - ver)) + raise EasyBuildError("Framework (%s) is a different major version than used in %s/%s PR #%s (%s)", + FRAMEWORK_VERSION, github_account, github_repo, pr, ver) return files diff --git a/easybuild/tools/version.py b/easybuild/tools/version.py index 3b0c45d2bf..e29f6f0b29 100644 --- a/easybuild/tools/version.py +++ b/easybuild/tools/version.py @@ -47,7 +47,7 @@ # This causes problems further up the dependency chain... VERSION = LooseVersion('4.9.2.dev0') UNKNOWN = 'UNKNOWN' -UNKNOWN_VERSION = '0.0.UNKNOWN.EASYBLOCKS' +UNKNOWN_EASYBLOCKS_VERSION = '0.0.UNKNOWN.EASYBLOCKS' def get_git_revision(): @@ -88,7 +88,7 @@ def get_git_revision(): try: from easybuild.easyblocks import VERBOSE_VERSION as EASYBLOCKS_VERSION except Exception: - EASYBLOCKS_VERSION = UNKNOWN_VERSION # make sure it is smaller then anything + EASYBLOCKS_VERSION = UNKNOWN_EASYBLOCKS_VERSION # make sure it is smaller then anything def this_is_easybuild():