From 5ef7cc71f35bb3555b313374eada0cbbafd8cbde Mon Sep 17 00:00:00 2001 From: Adam Clark Date: Mon, 9 Oct 2017 12:43:02 -0700 Subject: [PATCH] Added some better conditional behavior to the installer, updated the version --- installer/environment.yml | 2 +- installer/install.sh | 14 +++++++++++--- pyweed/__init__.py | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/installer/environment.yml b/installer/environment.yml index f560b2d..3b1e656 100644 --- a/installer/environment.yml +++ b/installer/environment.yml @@ -15,5 +15,5 @@ dependencies: - qtconsole - pyzmq - pip: - - pyweed==0.4.dev3 + - pyweed==0.4.dev4 - geographiclib diff --git a/installer/install.sh b/installer/install.sh index 52f48e7..15f5f28 100644 --- a/installer/install.sh +++ b/installer/install.sh @@ -10,10 +10,18 @@ cd /tmp/ export ARCH=`uname -m` +CONDA_INSTALL_PATH="$HOME/.pyweed/miniconda" + ### # Install Anaconda if not found echo "Looking for Anaconda installation" + +# Anaconda may have been previously installed but not on the existing path, so add the install +# path to ensure we find it in that case +export PATH="$PATH:$CONDA_INSTALL_PATH/bin" +hash -r + conda info > /dev/null 2>&1 if (( $? )); then echo " @@ -29,8 +37,8 @@ Anaconda Python not found, do you want to install it? [yes|no] echo "Downloading Miniconda"; curl -Ss -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-${OS}-${ARCH}.sh - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" + bash miniconda.sh -b -p $CONDA_INSTALL_PATH + export PATH="$CONDA_INSTALL_PATH/bin:$PATH" hash -r conda config --set always_yes yes --set changeps1 no conda update -q conda @@ -73,7 +81,7 @@ Install PyWEED to /Applications folder? [yes|no] if [[ ($ANS != 'yes') && ($ANS != 'y') ]]; then echo "Application is available at $PWD/PyWEED.app" else - mv $PWD/PyWEED.app /Applications/ + mv -f $PWD/PyWEED.app /Applications/ echo "Installed to /Applications/PyWEED.app" fi fi diff --git a/pyweed/__init__.py b/pyweed/__init__.py index aa322bc..9d7eefd 100644 --- a/pyweed/__init__.py +++ b/pyweed/__init__.py @@ -1,5 +1,5 @@ import os.path __pkg_path___ = os.path.dirname(os.path.abspath(__file__)) -__version__ = '0.4.dev3' +__version__ = '0.4.dev4' __app_name__ = "PyWEED"