diff --git a/test/framework/docs.py b/test/framework/docs.py index 3ed97ab192..e4dc73c5be 100644 --- a/test/framework/docs.py +++ b/test/framework/docs.py @@ -64,6 +64,7 @@ | | |-- DeprecatedDummyExtension | | | |-- ChildDeprecatedDummyExtension | |-- EB_toy +| | |-- EB_toy_deprecated | | |-- EB_toy_eula | | |-- EB_toytoy | |-- Toy_Extension @@ -78,6 +79,7 @@ | | |-- DeprecatedDummyExtension | | | |-- ChildDeprecatedDummyExtension | |-- EB_toy +| | |-- EB_toy_deprecated | | |-- EB_toy_eula | | |-- EB_toytoy | |-- Toy_Extension""" # noqa @@ -104,6 +106,7 @@ | | |-- DeprecatedDummyExtension (easybuild.easyblocks.generic.deprecateddummyextension @ %(topdir)s/generic/deprecateddummyextension.py) | | | |-- ChildDeprecatedDummyExtension (easybuild.easyblocks.generic.childdeprecateddummyextension @ %(topdir)s/generic/childdeprecateddummyextension.py) | |-- EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py) +| | |-- EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py) | | |-- EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py) | | |-- EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py) | |-- Toy_Extension (easybuild.easyblocks.generic.toy_extension @ %(topdir)s/generic/toy_extension.py) @@ -118,6 +121,7 @@ | | |-- DeprecatedDummyExtension (easybuild.easyblocks.generic.deprecateddummyextension @ %(topdir)s/generic/deprecateddummyextension.py) | | | |-- ChildDeprecatedDummyExtension (easybuild.easyblocks.generic.childdeprecateddummyextension @ %(topdir)s/generic/childdeprecateddummyextension.py) | |-- EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py) +| | |-- EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py) | | |-- EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py) | | |-- EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py) | |-- Toy_Extension (easybuild.easyblocks.generic.toy_extension @ %(topdir)s/generic/toy_extension.py)""" # noqa @@ -157,6 +161,7 @@ * EB_toy + * EB_toy_deprecated * EB_toy_eula * EB_toytoy @@ -183,6 +188,7 @@ * EB_toy + * EB_toy_deprecated * EB_toy_eula * EB_toytoy @@ -225,6 +231,7 @@ * EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py) + * EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py) * EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py) * EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py) @@ -251,6 +258,7 @@ * EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py) + * EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py) * EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py) * EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py) @@ -280,6 +288,7 @@ - DeprecatedDummyExtension - ChildDeprecatedDummyExtension - EB_toy + - EB_toy_deprecated - EB_toy_eula - EB_toytoy - Toy_Extension @@ -294,6 +303,7 @@ - DeprecatedDummyExtension - ChildDeprecatedDummyExtension - EB_toy + - EB_toy_deprecated - EB_toy_eula - EB_toytoy - Toy_Extension""" # noqa @@ -320,6 +330,7 @@ - DeprecatedDummyExtension (easybuild.easyblocks.generic.deprecateddummyextension @ %(topdir)s/generic/deprecateddummyextension.py) - ChildDeprecatedDummyExtension (easybuild.easyblocks.generic.childdeprecateddummyextension @ %(topdir)s/generic/childdeprecateddummyextension.py) - EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py) + - EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py) - EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py) - EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py) - Toy_Extension (easybuild.easyblocks.generic.toy_extension @ %(topdir)s/generic/toy_extension.py) @@ -334,6 +345,7 @@ - DeprecatedDummyExtension (easybuild.easyblocks.generic.deprecateddummyextension @ %(topdir)s/generic/deprecateddummyextension.py) - ChildDeprecatedDummyExtension (easybuild.easyblocks.generic.childdeprecateddummyextension @ %(topdir)s/generic/childdeprecateddummyextension.py) - EB_toy (easybuild.easyblocks.toy @ %(topdir)s/t/toy.py) + - EB_toy_deprecated (easybuild.easyblocks.toy_deprecated @ %(topdir)s/t/toy_deprecated.py) - EB_toy_eula (easybuild.easyblocks.toy_eula @ %(topdir)s/t/toy_eula.py) - EB_toytoy (easybuild.easyblocks.toytoy @ %(topdir)s/t/toytoy.py) - Toy_Extension (easybuild.easyblocks.generic.toy_extension @ %(topdir)s/generic/toy_extension.py)""" # noqa diff --git a/test/framework/easyblock.py b/test/framework/easyblock.py index 5b6807ef1e..b366e8dc21 100644 --- a/test/framework/easyblock.py +++ b/test/framework/easyblock.py @@ -1025,8 +1025,9 @@ def test_post_processing_step(self): test_ecs_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'easyconfigs', 'test_ecs') toy_ec_fn = os.path.join(test_ecs_dir, 't', 'toy', 'toy-0.0-gompi-2018a-test.eb') - # this import only works here, since EB_toy is a test easyblock - from easybuild.easyblocks.toy import EB_toy, EB_toy_deprecated + # these imports only work here, since EB_toy is a test easyblock + from easybuild.easyblocks.toy import EB_toy + from easybuild.easyblocks.toy_deprecated import EB_toy_deprecated cwd = os.getcwd() toy_ec = EasyConfig(toy_ec_fn) diff --git a/test/framework/sandbox/easybuild/easyblocks/t/toy.py b/test/framework/sandbox/easybuild/easyblocks/t/toy.py index ef63faaabb..c2301cfc79 100644 --- a/test/framework/sandbox/easybuild/easyblocks/t/toy.py +++ b/test/framework/sandbox/easybuild/easyblocks/t/toy.py @@ -198,11 +198,3 @@ def make_module_extra(self): txt = super(EB_toy, self).make_module_extra() txt += self.module_generator.set_environment('TOY', os.getenv('TOY', '')) return txt - - -class EB_toy_deprecated(EB_toy): - """Support for building/installing toy with deprecated post_install step.""" - - def post_install_step(self): - """Any postprocessing for toy (deprecated)""" - super(EB_toy, self).post_install_step() diff --git a/test/framework/sandbox/easybuild/easyblocks/t/toy_deprecated.py b/test/framework/sandbox/easybuild/easyblocks/t/toy_deprecated.py new file mode 100644 index 0000000000..4efe9ad583 --- /dev/null +++ b/test/framework/sandbox/easybuild/easyblocks/t/toy_deprecated.py @@ -0,0 +1,39 @@ +## +# Copyright 2009-2024 Ghent University +# +# This file is part of EasyBuild, +# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), +# with support of Ghent University (http://ugent.be/hpc), +# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), +# Flemish Research Foundation (FWO) (http://www.fwo.be/en) +# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en). +# +# https://github.com/easybuilders/easybuild +# +# EasyBuild is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation v2. +# +# EasyBuild is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with EasyBuild. If not, see . +## +""" +(deprecated) EasyBuild support for building and installing toy, implemented as an easyblock + +@author: Bart Oldeman (McGill University, Calcul Quebec, Digital Research Alliance of Canada) +""" + +from easybuild.easyblocks.toy import EB_toy + + +class EB_toy_deprecated(EB_toy): + """Support for building/installing toy with deprecated post_install step.""" + + def post_install_step(self): + """Any postprocessing for toy (deprecated)""" + super(EB_toy, self).post_install_step()