[sasmodels] 04/09: Add extra paths required at runtime

Stuart Prescott stuart at debian.org
Mon Nov 6 11:23:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

stuart pushed a commit to branch master
in repository sasmodels.

commit 9b26776ad8483675343fbc19011bf30aa18b9ef1
Author: Stuart Prescott <stuart at debian.org>
Date:   Mon Nov 6 21:46:16 2017 +1100

    Add extra paths required at runtime
---
 debian/rules                   | 7 +++++--
 debian/tests/python-sasmodels  | 2 ++
 debian/tests/python3-sasmodels | 2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 7f4db04..7e458a5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,8 @@ export PYBUILD_NAME=sasmodels
 export POCL_CACHE_DIR=$(CURDIR)/.cache/
 # and also tell pyopencl not to cache
 export PYOPENCL_NO_CACHE=1
+# and give somewhere for sasmodels to look for custom models
+export SAS_MODELPATH=$(CURDIR)/.sasmodels/
 
 %:
 	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
@@ -15,11 +17,12 @@ export PYOPENCL_NO_CACHE=1
 override_dh_clean:
 	dh_clean
 	make -C doc clean
-	rm -rf $(POCL_CACHE_DIR)
+	rm -rf $(POCL_CACHE_DIR) $(SAS_MODELPATH)
+	find -name logs -type d -exec rm -rf {} +
 
 override_dh_auto_build:
 	dh_auto_build
-	mkdir -p $(POCL_CACHE_DIR)
+	mkdir -p $(POCL_CACHE_DIR) $(SAS_MODELPATH)
 	MPLBACKEND=Agg make -C doc html
 	ln -sf /usr/share/javascript/mathjax/ doc/_build/html/_static/mathjax
 
diff --git a/debian/tests/python-sasmodels b/debian/tests/python-sasmodels
index 268298c..9591a81 100755
--- a/debian/tests/python-sasmodels
+++ b/debian/tests/python-sasmodels
@@ -7,6 +7,8 @@ cd "$ADTTMP"
 # opencl needs somewhere to cache compiled objects
 export POCL_CACHE_DIR="$PWD/.cache/"
 mkdir "$POCL_CACHE_DIR"
+export SAS_MODELPATH="$PWD/.sasmodels/"
+mkdir "$SAS_MODELPATH"
 # and also tell pyopencl not to cache
 export PYOPENCL_NO_CACHE=1
 
diff --git a/debian/tests/python3-sasmodels b/debian/tests/python3-sasmodels
index 4d8e617..8bb4bf3 100755
--- a/debian/tests/python3-sasmodels
+++ b/debian/tests/python3-sasmodels
@@ -7,6 +7,8 @@ cd "$ADTTMP"
 # opencl needs somewhere to cache compiled objects
 export POCL_CACHE_DIR="$PWD/.cache/"
 mkdir "$POCL_CACHE_DIR"
+export SAS_MODELPATH="$PWD/.sasmodels/"
+mkdir "$SAS_MODELPATH"
 # and also tell pyopencl not to cache
 export PYOPENCL_NO_CACHE=1
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sasmodels.git



More information about the debian-science-commits mailing list