[pyferret] 10/110: Add patch to set env variables

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jul 28 08:41:43 UTC 2017


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

mckinstry pushed a commit to branch debian/master
in repository pyferret.

commit c8f98c10c5655a5e9dda8edcbee469f8a0f813c9
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Tue Nov 18 20:14:58 2014 +0000

    Add patch to set env variables
---
 debian/patches/series            |  1 +
 debian/patches/set-envvars.patch | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index e0cbb88..a969ca3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 common.patch
+set-envvars.patch
diff --git a/debian/patches/set-envvars.patch b/debian/patches/set-envvars.patch
new file mode 100644
index 0000000..8fb541d
--- /dev/null
+++ b/debian/patches/set-envvars.patch
@@ -0,0 +1,24 @@
+Index: pyferret-1.0.2/pyfermod/__init__.py
+===================================================================
+--- pyferret-1.0.2.orig/pyfermod/__init__.py
++++ pyferret-1.0.2/pyfermod/__init__.py
+@@ -47,6 +47,19 @@ import numpy
+ import numpy.ma
+ import StringIO
+ 
++# In Debian, an application should be able to start without environmental
++# variables needing to be set. So set them here.
++if os.environ.get('FER_GO') is None:
++    os.environ['FER_GO'] = '/usr/share/ferret-vis/jnls/go'
++if os.environ.get('FER_DATA') is None:
++    os.environ['FER_DATA'] = '/usr/share/ferret-vis/data'
++if os.environ.get('FER_DESCR') is None:
++    os.environ['FER_DESCR'] = '/usr/share/ferret-vis/descr'
++if os.environ.get('FER_GRIDS') is None:
++    os.environ['FER_GRIDS'] = '/usr/share/ferret-vis/grids'
++if os.environ.get('FER_MODEL_RUNS') is None:
++    os.environ['FER_MODEL_RUNS'] = '/usr/share/ferret-vis/model_runs'
++
+ # import everything from libpyferret so constants
+ # in that module are seen as part of this module
+ from libpyferret import *

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



More information about the debian-science-commits mailing list