diff --git a/repos/c2sm/packages/icon/package.py b/repos/c2sm/packages/icon/package.py index 07d4c897e4..2ebb8633e3 100755 --- a/repos/c2sm/packages/icon/package.py +++ b/repos/c2sm/packages/icon/package.py @@ -586,18 +586,28 @@ def configure_args(self): config_vars['LOC_GT4PY'].append(self.spec['py-gt4py'].prefix) config_vars['LOC_ICON4PY_BIN'].append( self.spec['py-icon4py'].prefix) + config_vars['LOC_ICON4PY_ATM_DYN_ICONAM'].append( self.spec['py-icon4py:atm_dyn_iconam'].headers.directories[0]) - config_vars['LOC_ICON4PY_TOOLS'].append( - self.spec['py-icon4py:tools'].headers.directories[0]) - if self.spec['py-icon4py'].version > Version("0.0.7"): - config_vars['LOC_ICON4PY_DIFFUSION'].append( - self.spec['py-icon4py:diffusion'].headers.directories[0]) - config_vars['LOC_ICON4PY_INTERPOLATION'].append( - self.spec['py-icon4py:interpolation'].headers. - directories[0]) - config_vars['LOC_ICON4PY_ADVECTION'].append( - self.spec['py-icon4py:advection'].headers.directories[0]) + + if self.spec['py-icon4py'].version < Version("0.0.4"): + config_vars['LOC_ICON4PY_UTILS'].append( + os.path.dirname( + self.spec['py-icon4py:utils'].headers.directories[0])) + else: + config_vars['LOC_ICON4PY_TOOLS'].append( + self.spec['py-icon4py:tools'].headers.directories[0]) + if self.spec['py-icon4py'].version > Version("0.0.7"): + config_vars['LOC_ICON4PY_DIFFUSION'].append( + self.spec['py-icon4py:diffusion'].headers. + directories[0]) + config_vars['LOC_ICON4PY_INTERPOLATION'].append( + self.spec['py-icon4py:interpolation'].headers. + directories[0]) + if self.spec['py-icon4py'].version > Version("0.0.8"): + config_vars['LOC_ICON4PY_ADVECTION'].append( + self.spec['py-icon4py:advection'].headers. + directories[0]) config_vars['LOC_GRIDTOOLS'].append( self.spec['py-gridtools-cpp:data'].headers.directories[0]) config_vars['GT4PYNVCFLAGS'] = config_vars['NVCFLAGS'] diff --git a/repos/c2sm/packages/py-gt4py/package.py b/repos/c2sm/packages/py-gt4py/package.py index 5d1bcbb1e1..afe088366a 100644 --- a/repos/c2sm/packages/py-gt4py/package.py +++ b/repos/c2sm/packages/py-gt4py/package.py @@ -16,10 +16,11 @@ class PyGt4py(PythonPackage): url = "git@github.com:GridTools/gt4py.git" version('main', branch='main', git=url) - version('1.1.1', tag='icon4py_20230413', git=url) - version('1.1.2', tag='icon4py_20230621', git=url) - version('1.1.3', tag='icon4py_20230817', git=url) - version('1.1.4', tag='icon4py_20230926', git=url) + version('1.0.1.1', tag='icon4py_20230413', git=url) + version('1.0.1.1b', tag='icon4py_20230530', git=url) + version('1.0.1.2', tag='icon4py_20230621', git=url) + version('1.0.1.3', tag='icon4py_20230817', git=url) + version('1.0.1.4', tag='icon4py_20230926', git=url) maintainers = ['samkellerhals'] @@ -60,7 +61,7 @@ class PyGt4py(PythonPackage): # See: https://github.com/C2SM/spack-c2sm/issues/803 depends_on('py-pybind11@2.5:2.9.2', type=('build', 'run')) - depends_on('py-nanobind@1.4.0:', when="@1.1.3:", type=('build', 'run')) + depends_on('py-nanobind@1.4.0:', when="@1.0.1.3:", type=('build', 'run')) depends_on('py-tabulate@0.8.10:', type=('build', 'run')) depends_on('py-typing-extensions@4.2:4.6', type=('build', 'run')) depends_on('py-toolz@0.12.0:', type=('build', 'run')) diff --git a/repos/c2sm/packages/py-icon4py/package.py b/repos/c2sm/packages/py-icon4py/package.py index afb73308c8..4560138ed2 100644 --- a/repos/c2sm/packages/py-icon4py/package.py +++ b/repos/c2sm/packages/py-icon4py/package.py @@ -25,6 +25,7 @@ class PyIcon4py(PythonPackage): version('main', branch='main', git=git) version('0.0.3', tag='v0.0.3', git=git) + version('0.0.3.1', tag='v0.0.3.1', git=git) version('0.0.4', tag='v0.0.4', git=git) version('0.0.5', tag='v0.0.5', git=git) version('0.0.6', tag='v0.0.6', git=git) @@ -69,6 +70,16 @@ def headers(self): version = self.spec.version folder_mapping = { + ver('=0.0.3'): { + 'atm_dyn_iconam': 'atm_dyn_iconam', + 'utils': + 'liskov' #utils will eventually map to parent directory of liskov + }, + ver('=0.0.3.1'): { + 'atm_dyn_iconam': 'atm_dyn_iconam', + 'utils': + 'liskov' #utils will eventually map to parent directory of liskov + }, ver('=0.0.4'): { 'atm_dyn_iconam': 'atm_dyn_iconam', 'tools': 'icon4pytools' @@ -103,10 +114,6 @@ def headers(self): if len(query_parameters) > 1: raise ValueError('Only one query parameter allowed') - if version == ver('=0.0.3') and len(query_parameters) == 1: - msg = 'Not implemented for version {0}'.format(version) - raise spack.error.NoHeadersError(msg) - folder_name = folder_mapping.get(version, {}) if not folder_name: @@ -154,7 +161,8 @@ def install(self, pkg, spec, prefix): pip = inspect.getmodule(pkg).pip - if self.spec.version == ver('=0.0.3'): + if self.spec.version == ver('=0.0.3') or self.spec.version == ver( + '=0.0.3.1'): build_dirs = [ 'common', 'pyutils', 'testutils', 'liskov', 'atm_dyn_iconam' ] diff --git a/test/system_test.py b/test/system_test.py index dff0e44118..1842ff9422 100644 --- a/test/system_test.py +++ b/test/system_test.py @@ -645,19 +645,22 @@ def test_install_default(self): @pytest.mark.no_tsa # Irrelevant class PyGt4pyTest(unittest.TestCase): - def test_install_version_1_1_1(self): - spack_install_and_test('py-gt4py @1.1.1') + def test_install_version_1_0_1_1(self): + spack_install_and_test('py-gt4py @1.0.1.1') - def test_install_version_1_1_2(self): - spack_install_and_test('py-gt4py @1.1.2') + def test_install_version_1_0_1_1b(self): + spack_install_and_test('py-gt4py @1.0.1.1b') + + def test_install_version_1_0_1_2(self): + spack_install_and_test('py-gt4py @1.0.1.2') @pytest.mark.no_daint # fails with ModuleNotFoundError: No module named 'dace' @pytest.mark.no_balfrin # fails with ModuleNotFoundError: No module named 'dace' - def test_install_version_1_1_3(self): - spack_install_and_test('py-gt4py @1.1.3') + def test_install_version_1_0_1_3(self): + spack_install_and_test('py-gt4py @1.0.1.3') - def test_install_version_1_1_4(self): - spack_install_and_test('py-gt4py @1.1.4') + def test_install_version_1_0_1_4(self): + spack_install_and_test('py-gt4py @1.0.1.4') class PyHatchlingTest(unittest.TestCase): @@ -669,15 +672,18 @@ def test_install_default(self): @pytest.mark.no_tsa # py-isort install fails with: No module named 'poetry'. class PyIcon4pyTest(unittest.TestCase): + def test_install_version_0_0_3(self): + spack_install_and_test('py-icon4py @ 0.0.3.1 %gcc ^py-gt4py@1.0.1.1b') + def test_install_version_0_0_5(self): - spack_install_and_test('py-icon4py @ 0.0.5 %gcc ^py-gt4py@1.1.1') + spack_install_and_test('py-icon4py @ 0.0.5 %gcc ^py-gt4py@1.0.1.1') def test_install_version_0_0_6(self): - spack_install_and_test('py-icon4py @ 0.0.6 %gcc ^py-gt4py@1.1.2') + spack_install_and_test('py-icon4py @ 0.0.6 %gcc ^py-gt4py@1.0.1.2') def test_install_version_0_0_7(self): spack_install_and_test( - 'py-icon4py @ 0.0.7 %gcc ^py-gt4py@1.1.3 ^python@3.10.4') + 'py-icon4py @ 0.0.7 %gcc ^py-gt4py@1.0.1.3 ^python@3.10.4') class PyInflectionTest(unittest.TestCase):