Repository: climate
Updated Branches:
  refs/heads/master 322a3e73e -> a04ce8247


CLIMATE-793 - Update install-ubuntu.sh script

- Merge install-ubuntu.sh and install-conda.sh
- Update install-ubuntu.sh
- Delete install-conda.sh
- Delete conda_environment.txt


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/a04ce824
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/a04ce824
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/a04ce824

Branch: refs/heads/master
Commit: a04ce824761baa4244f47a4c964b9a175c1dd847
Parents: 322a3e7
Author: Ibrahim <jarifibra...@gmail.com>
Authored: Thu May 26 00:01:38 2016 +0530
Committer: Ibrahim <jarifibra...@gmail.com>
Committed: Sat May 28 19:58:15 2016 +0530

----------------------------------------------------------------------
 easy-ocw/conda-install.sh      | 60 --------------------------------
 easy-ocw/conda_environment.txt | 54 -----------------------------
 easy-ocw/install-ubuntu.sh     | 68 ++++++++++++++++++++++++-------------
 3 files changed, 45 insertions(+), 137 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/a04ce824/easy-ocw/conda-install.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/conda-install.sh b/easy-ocw/conda-install.sh
deleted file mode 100755
index 0df5377..0000000
--- a/easy-ocw/conda-install.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-header()
-{
-    echo
-    echo $1
-}
-
-task()
-{
-    echo " - " $1
-}
-
-subtask()
-{
-    echo "     " $1
-}
-
-# Find absolute path to the easy-ocw directory
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-cd $DIR
-
-header "Installing dependencies via conda"
-task "Reading and installing from ocw-conda-dependencies.txt (This might take 
some time"
-conda install --file ocw-conda-dependencies.txt
-subtask "done"
-
-# Install miscellaneous Python packages needed for OCW. Some of these
-# can be installed with Conda, but since none of them have an annoying
-# compiled component we just installed them with Pip.
-header "Installing additional Python packages"
-task "Reading and installing from ocw-pip-dependencies.txt (Please wait...)"
-pip install -r ocw-pip-dependencies.txt
-subtask "done"
-
-header "Installing ocw module"
-cd ..
-# Open new and install OCW
-python setup.py install 
-subtask "finished installing ocw module"
-
-header "Part 2/2 of Installation completed. Please close the terminal and 
start to new one for the changes to take effect"
-header "For any issues with installation please contact 
d...@climate.apache.org"

http://git-wip-us.apache.org/repos/asf/climate/blob/a04ce824/easy-ocw/conda_environment.txt
----------------------------------------------------------------------
diff --git a/easy-ocw/conda_environment.txt b/easy-ocw/conda_environment.txt
deleted file mode 100644
index bd3be21..0000000
--- a/easy-ocw/conda_environment.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-name: OCW
-dependencies:
-- basemap=1.0.7=np18py27_0
-- curl=7.43.0=1
-- dateutil=2.4.1=py27_0
-- geos=3.3.3=0
-- h5py=2.5.0=np110py27_4
-- hdf5=1.8.15.1=2
-- krb5=1.13.2=0
-- libnetcdf=4.3.3.1=1
-- libpng=1.5.13=1
-- matplotlib=1.3.1=np18py27_1
-- netcdf4=1.1.9=np110py27_0
-- numpy=1.10.1=py27_0
-- openssl=1.0.1k=1
-- pip=7.1.2=py27_0
-- pyparsing=2.0.1=py27_0
-- python=2.7.10=1
-- pytz=2015.7=py27_0
-- readline=6.2=2
-- scipy=0.13.3=np18py27_0
-- setuptools=18.4=py27_0
-- six=1.10.0=py27_0
-- sqlite=3.8.4.1=1
-- tk=8.5.18=0
-- wheel=0.26.0=py27_1
-- zlib=1.2.8=0
-- pip:
-  - astroid==1.3.8
-  - beautifulsoup4==4.4.1
-  - bottle==0.11.6
-  - docutils==0.12
-  - esgf-pyclient==0.1.2
-  - genshi==0.7
-  - httplib2==0.9.2
-  - jinja2==2.8
-  - logilab-common==1.1.0
-  - markupsafe==0.23
-  - nose==1.3.3
-  - nose-exclude==0.2.0
-  - paste==2.0.2
-  - pastedeploy==1.5.2
-  - pastescript==2.0.2
-  - pydap==3.1.1
-  - pygments==2.0.2
-  - pylint==1.2.1
-  - python-dateutil==2.4.1
-  - requests==2.3.0
-  - sphinx==1.2.1
-  - sphinxcontrib-httpdomain==1.2.1
-  - waitress==0.8.10
-  - webob==1.5.1
-  - webtest==2.0.15
-

http://git-wip-us.apache.org/repos/asf/climate/blob/a04ce824/easy-ocw/install-ubuntu.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-ubuntu.sh b/easy-ocw/install-ubuntu.sh
index af02fd6..71ef52e 100755
--- a/easy-ocw/install-ubuntu.sh
+++ b/easy-ocw/install-ubuntu.sh
@@ -26,7 +26,6 @@ its dependencies.
 
 Flags:
     -h  Display this help message.
-    -q  Quiet install. User prompts are removed (when possible).
 
 N.B. This install script has been tested against Ubuntu 12.04 and 14.04.
 Please report problems with this script to d...@climate.apache.org
@@ -55,25 +54,19 @@ echo "                         Welcome to Easy OCW"
 echo 
"---------------------------------------------------------------------------"
 echo
 
-WITH_HOMEBREW=0
-WITH_INTERACT=1
-
 # Find absolute path to the easy-ocw directory
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 cd $DIR
 ocw_path="$DIR/../climate"
 
-while getopts ":h :e :q" FLAG
+while getopts ":h" FLAG
 do
     case $FLAG in
         h)
             help
             exit 1
             ;;
-        q)
-            WITH_INTERACT=0
-            ;;
         ?)
             help
             exit 1
@@ -81,7 +74,6 @@ do
     esac
 done
 
-if [ $WITH_INTERACT == 1 ]; then
 cat << ENDINTRO
 A number of dependencies for OCW will now be installed. Please check the wiki
 for a complete list of dependencies. Additionally, please read the wiki for
@@ -89,25 +81,28 @@ useful installation guidelines and information that may be 
pertinent to your
 situation. All of this can be found at http://s.apache.org/3p2
 ENDINTRO
 
-fi
+cat << VIRTUALENV_WARNING
+$(tput setaf 
1)<-----------------------------[WARNING!]----------------------------------->$(tput
 sgr 0)
+Easy OCW will automatically create a conda environment "venv-ocw".
+All the dependencies will be installed in the virtual environment
+to ensure that your global Python install is not affected.
+
+Please activate the virtual environment venv-ocw after the script has 
completed to use OCW.
+
+To activate the virtual environment execute
+> source active venv-ocw
+
+To deactivate the virtual environment execute
+> source deactivate
+
+VIRTUALENV_WARNING
 
 echo "Easy-OCW script logs" > install_log
-header "Checking for pip ..."
-command -v pip >/dev/null 2>&1 || { 
-    task "Unable to locate pip."
-    task "Installing Pip"
-    sudo apt-get -y install python-pip >> install_log 2>&1
-    subtask "done"
-}
 
 # Install Continuum Analytics Miniconda Python distribution. This gives
 # almost all the dependencies that OCW needs in a single, easy to
 # install package.
-
 header "Installing Miniconda Python distribution ..."
-echo
-echo "*** NOTE *** When asked to update your PATH, you should respond YES and 
please do not change the default installation directory"
-read -p "Press [ENTER] to continue ..."
 
 MACHINE_TYPE=`uname -m`
 if [ ${MACHINE_TYPE} == 'x86_64' ]; then
@@ -125,11 +120,38 @@ command -v conda >/dev/null 2>&1 || {
                subtask "done"
     fi
        task "Installing ..."
-       bash Miniconda-latest-linux.sh
+       bash Miniconda-latest-linux.sh -b -p $HOME/miniconda
+       export PATH="$HOME/miniconda/bin/:$PATH"
        subtask "done"
 }
 
+header "Creating venv-ocw environment and installing dependencies"
+conda create --name venv-ocw -y --file ocw-conda-dependencies.txt
+task "Activating venv-ocw virtual environment"
+source activate venv-ocw
+
+conda config --set always_yes yes
+conda update -q conda
+
+header "Conda Information"
+echo "------------------------------------------------------------------"
+conda info -a
+
+echo 
 task "Installing python-dev"
 sudo apt-get -y install python-dev >> install_log 2>&1
 subtask "done"
-header "Part 1/2 of installation completed. Please start a new terminal and 
execute conda-install.sh script."
+
+cd $DIR
+
+header "Installing remaining dependencies via pip"
+pip install -r ocw-pip-dependencies.txt
+subtask "done"
+
+header "Installing ocw module"
+
+cd ..
+python setup.py install
+subtask "Finished installing OCW module"
+
+header "For any issues with installation please contact 
d...@climate.apache.org"

Reply via email to