From aaf522074b95135da09dcd9718589133f6a03ce8 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Mon, 18 May 2020 12:42:46 +0200 Subject: [PATCH 1/2] Make sure that the python directories are in the user space --- packages/dune/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/dune/package.py b/packages/dune/package.py index d8a2bcb..72bf25f 100644 --- a/packages/dune/package.py +++ b/packages/dune/package.py @@ -21,6 +21,7 @@ # ---------------------------------------------------------------------------- import os +from pathlib import Path from spack import * @@ -223,12 +224,12 @@ class Dune(CMakePackage): # Additionally, we need to set the workspace for the Python bindings to something # that is unique to this build of the dune module (it defaults to ~/.cache) if '+python' in self.spec: - env.set('DUNE_PY_DIR', self.prefix) + env.set('DUNE_PY_DIR', join_path(Path.home(), '.cache', 'dune-py', self.spec.dag_hash())) # For those modules that typically work with the Dune Virtualenv, # we export the location of the virtualenv as an environment variable. if '+testtools' in self.spec: - env.set('DUNE_PYTHON_VIRTUALENV_PATH', join_path(self.prefix, 'dune-python-env')) + env.set('DUNE_PYTHON_VIRTUALENV_PATH', join_path(Path.home(), '.cache', 'dune-python-env', self.spec.dag_hash())) def cmake_args(self): """Populate cmake arguments.""" From ae26fb1603430eb7a1e409fe1ebde2f6436d865b Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Mon, 18 May 2020 12:52:30 +0200 Subject: [PATCH 2/2] Make sure we use Python3 in testing Docker container --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a9f0b1..4fa15da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,8 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ ca-certificates \ git \ procps \ - python \ - python-dev \ + python3 \ + python3-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* ARG version=master