diff options
author | pjotrp | 2016-03-01 08:55:10 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-04-20 09:59:30 +0000 |
commit | 2fd8e09c3de9ee539e47bdb416a4c0df89ff15ab (patch) | |
tree | b7684c3301343731da989c6a82b4cc51a4f20d68 | |
parent | 6cf118eb55453d0ca041cf139bae4839ceb0286a (diff) | |
download | genenetwork2-2fd8e09c3de9ee539e47bdb416a4c0df89ff15ab.tar.gz |
setup: prepare for Guix runtime
-rw-r--r-- | MANIFEST.in | 5 | ||||
-rwxr-xr-x | bin/genenetwork2 | 18 | ||||
-rwxr-xr-x | setup.py | 15 |
3 files changed, 28 insertions, 10 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index f4ea2316..bf23f9aa 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -17,10 +17,6 @@ include wqflask/wqflask/templates/new_security/* include wqflask/wqflask/correlation/* include wqflask/wqflask/interval_mapping/* include wqflask/wqflask/interval_analyst/* -include wqflask/wqflask/my_pylmm/* -include wqflask/wqflask/my_pylmm/scripts/* -include wqflask/wqflask/my_pylmm/pyLMM/* -include wqflask/wqflask/my_pylmm/data/* include wqflask/wqflask/static/* include wqflask/wqflask/static/dbdoc/* include wqflask/wqflask/static/new/* @@ -260,3 +256,4 @@ include wqflask/flask_security/templates/security/email/* include wqflask/dbFunction/* include wqflask/basicStatistics/* include wqflask/base/* +include etc/*.py diff --git a/bin/genenetwork2 b/bin/genenetwork2 index 00ee09bf..e5f04ee1 100755 --- a/bin/genenetwork2 +++ b/bin/genenetwork2 @@ -1,6 +1,9 @@ #! /bin/bash # -# This will run the server with default settings. +# This will run the GN2 server (with default settings if none supplied). +# +# Environment settings can be used to preconfigure as well as a +# settings.py file. # Absolute path to this script, e.g. /home/user/bin/foo.sh SCRIPT=$(readlink -f "$0") @@ -8,20 +11,29 @@ SCRIPT=$(readlink -f "$0") GN2_BASE_PATH=$(dirname $(dirname "$SCRIPT")) echo $GN2_BASE_PATH +# Handle setting parameter settings=$1 if [ -z $settings ]; then settings=$GN2_BASE_PATH/etc/default_settings.py ; fi -export PYTHONPATH=$GN2_BASE_PATH/wqflask:$PYTHONPATH +if [ ! -e $settings ]; then + echo "ERROR: can not load settings file $settings" + exit 1 +fi export WQFLASK_SETTINGS=$settings +# We may change this one: +export PYTHONPATH=$GN2_BASE_PATH/wqflask:$PYTHONPATH + +# TEMPDIR defaults to /tmp if nothing else if [ -z $TEMPDIR ]; then TEMPDIR="/tmp" fi -# start the redis server +# Start the redis server echo -n "dir $TEMPDIR dbfilename gn2.rdb " | redis-server - & +# Start the flask server running GN2 cd $GN2_BASE_PATH/wqflask echo "Starting with $settings" /usr/bin/env python runserver.py @@ -1,8 +1,17 @@ +# Run setup from python - this script is used by the GNU Guix builder. + from setuptools import setup, find_packages setup(name='genenetwork2', version='2.0', + author = "The GeneNetwork Team", + author_email='rwilliams@uthsc.edu', + url = "https://github.com/genenetwork/genenetwork2/blob/master/README.md", + description = 'Website and tools for genetics.', include_package_data=True, - # packages=find_packages() - packages=['wqflask'] - ) + packages=['wqflask','etc'], + scripts=['bin/genenetwork2'], + # package_data = { + # 'etc': ['*.py'] + # } +) |