aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-10 09:52:38 +0300
committerFrederick Muriuki Muriithi2022-01-28 08:07:26 +0300
commita771de4f99b7e0e4fb0b70ffd39817bc94bdf7b3 (patch)
tree42274b50afd80c630ef3470100d3420238da569e /bin
parentbdf3de41c7c7202e37cf1bd762ede04333c222c8 (diff)
downloadgenenetwork2-a771de4f99b7e0e4fb0b70ffd39817bc94bdf7b3.tar.gz
Automate setting of the development GN3 repo
* When developing the GN2 code, there are times we need to use the latest code in GN3, and rather than manually editing the `bin/genenetwork` file every time we need that, this commit enables the use of an environment variable. In this case, launching the application with something like: $ env GN3_DEV_REPO_PATH="$HOME/genenetwork3" ...\ ./bin/genenetwork2 ./the_settings.py -gunicorn-dev will add the path to the development version to the PYTHONPATH. If the GN3_DEV_REPO_PATH variable is not set, then the PYTHONPATH is not altered, and would be as if there is no development version of GN3 in use.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genenetwork22
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2
index 024f34d2..e6eb56a6 100755
--- a/bin/genenetwork2
+++ b/bin/genenetwork2
@@ -100,6 +100,8 @@ if [ -z $GEMMA_WRAPPER_COMMAND ]; then
export GEMMA_WRAPPER_COMMAND="$GN2_PROFILE/bin/gemma-wrapper"
fi
+export PYTHONPATH="${GN3_DEV_REPO_PATH:+$GN3_DEV_REPO_PATH:}:${PYTHONPATH}"
+
# Our UNIX TMPDIR defaults to /tmp - change this on a shared server
if [ -z $TMPDIR ]; then
TMPDIR="/tmp"