From aaf522074b95135da09dcd9718589133f6a03ce8 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Mon, 18 May 2020 12:42:46 +0200 Subject: [PATCH] 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."""