Skip to content

Commit

Permalink
dirty fix icon4py
Browse files Browse the repository at this point in the history
  • Loading branch information
huppd committed Dec 5, 2024
1 parent 42a5efe commit c40e511
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions repos/c2sm/packages/py-gt4py/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class PyGt4py(PythonPackage):
depends_on('py-pytest-xdist', type=('build', 'run'))

def test(self):
# workaround for not finding own python module
python_spec = self.spec['python']
python_version = python_spec.version.up_to(2)
install_path = join_path(self.prefix, 'lib', f"python{python_version}",
Expand Down
7 changes: 7 additions & 0 deletions repos/c2sm/packages/py-icon4py/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ def setup_build_environment(self, env):
env.set("CMAKE_INCLUDE_PATH", self.spec['boost'].prefix.include)

def test(self):
# workaround for not finding own python module
python_spec = self.spec['python']
python_version = python_spec.version.up_to(2)
install_path = join_path(self.prefix, 'lib', f"python{python_version}",
'site-packages')
os.environ[
'PYTHONPATH'] = f"{install_path}:{os.environ.get('PYTHONPATH', '')}"
# check if all installed module can be imported
super().test()
# unit tests
Expand Down

0 comments on commit c40e511

Please sign in to comment.