diff options
| author | Frederick Muriuki Muriithi | 2021-12-10 09:52:38 +0300 | 
|---|---|---|
| committer | zsloan | 2022-01-29 00:42:44 -0600 | 
| commit | c0d4de52e28135b002ab18ff59ac0fb6fd827a4f (patch) | |
| tree | 214f5f1c9ce8c8dd790984a34c1ada885ec6153d | |
| parent | a01033438a85e3097e4ade30e9a208fd5109d4e1 (diff) | |
| download | genenetwork2-c0d4de52e28135b002ab18ff59ac0fb6fd827a4f.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.
| -rwxr-xr-x | bin/genenetwork2 | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2 index 0a2c18cf..1b933e80 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -149,6 +149,8 @@ fi # We may change this one: export PYTHONPATH=$PYTHON_GN_PATH:$GN2_BASE_DIR/wqflask:$GN3_PYTHONPATH:$PYTHONPATH +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"  | 
