From 61ac630fe17d9d4a5b83ecb4b43b67adb85632d4 Mon Sep 17 00:00:00 2001 From: ktwaco Date: Sun, 15 Nov 2015 20:56:48 -0500 Subject: [PATCH] fixed issue with order in which dependencies were installed. fixed issue in print_cliner_dir.py , did not work for releases since the name of the folder is CliNER-#.#.# not just cliner. --- install/cliner_dir/print_cliner_dir.py | 2 +- install/dependencies/install_python_dependencies.sh | 3 +-- install/virtualenv/create_virtualenv.sh | 5 +++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install/cliner_dir/print_cliner_dir.py b/install/cliner_dir/print_cliner_dir.py index d8736e8..aa0abb8 100644 --- a/install/cliner_dir/print_cliner_dir.py +++ b/install/cliner_dir/print_cliner_dir.py @@ -19,7 +19,7 @@ def main(): # Assumes this file never moves base = back(back(back(os.path.abspath(__file__)))) - if not base.endswith('CliNER'): + if 'CliNER' not in os.path.basename(base): print >>sys.stderr, "\n\tERROR: Do not move file print_cliner_dir.py\n" exit(1) else: diff --git a/install/dependencies/install_python_dependencies.sh b/install/dependencies/install_python_dependencies.sh index bda122d..61a0e12 100644 --- a/install/dependencies/install_python_dependencies.sh +++ b/install/dependencies/install_python_dependencies.sh @@ -14,8 +14,7 @@ echo -e "\nSee python dependency details at: \n\t$DEPENDENCIES_DIR/log_installat # Install python dependencies -pip install -r $DEPENDENCIES_DIR/../../requirements.txt &>> $log - +cat $DEPENDENCIES_DIR/../../requirements.txt | xargs -n 1 -L 1 pip install # Install nltk data echo "downloading nltk data" diff --git a/install/virtualenv/create_virtualenv.sh b/install/virtualenv/create_virtualenv.sh index 1917805..fa7a3f5 100644 --- a/install/virtualenv/create_virtualenv.sh +++ b/install/virtualenv/create_virtualenv.sh @@ -10,8 +10,10 @@ # Virtual Environment? if [[ ! $VIRTUAL_ENV ]] ; then + if [[ $CLINER_DIR = "" ]]; then + echo "CLINER_DIR not set" # Exists? - if [[ -f $CLINER_DIR/venv_cliner ]] ; then + elif [[ -f $CLINER_DIR/venv_cliner ]] ; then source $CLINER_DIR/venv_cliner/bin/activate else old=$(pwd) @@ -20,6 +22,5 @@ if [[ ! $VIRTUAL_ENV ]] ; then source venv_cliner/bin/activate cd $old fi - fi