climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From good...@apache.org
Subject [1/5] git commit: Drop virtualenvwrapper
Date Wed, 04 Jun 2014 22:36:27 GMT
Repository: climate
Updated Branches:
  refs/heads/master ac2ad6d05 -> fbe457400


Drop virtualenvwrapper

- Using just virtualenv now if -e flag is used
- Virtualenv will be created in ~/ocw location


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

Branch: refs/heads/master
Commit: ca50fbf8cc889a235b7ae96648a799aafb07d693
Parents: e9437d0
Author: cgoodale <sigep311@gmail.com>
Authored: Wed Jun 4 11:05:18 2014 -0700
Committer: cgoodale <sigep311@gmail.com>
Committed: Wed Jun 4 11:05:18 2014 -0700

----------------------------------------------------------------------
 easy-ocw/install-osx.sh | 36 +++++++++---------------------------
 1 file changed, 9 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/ca50fbf8/easy-ocw/install-osx.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-osx.sh b/easy-ocw/install-osx.sh
index dd477c5..4b058d7 100755
--- a/easy-ocw/install-osx.sh
+++ b/easy-ocw/install-osx.sh
@@ -62,7 +62,7 @@ echo
 WITH_VIRTUAL_ENV=0
 WITH_HOMEBREW=0
 WITH_INTERACT=1
-
+INIT_PWD=$PWD
 while getopts ":h :e :q" FLAG
 do
     case $FLAG in
@@ -131,33 +131,12 @@ if [ $WITH_VIRTUAL_ENV == 1 ]; then
         subtask "done"
     fi
 
-    # Check if virtualenvwrapper is installed or not. If it's not, we'll
-    # install it for the user. Why wouldn't you want to use virtualenvwrapper?!?!
-    # It's super awesome! By default, virtualenvwrapper installs to the same place
-    # as virtualenv so we'll look for the necessary scripts there. This is fairly
-    # brittle, but it should be sufficient for the majority of cases.
-    virtualEnvLoc=`which virtualenv`
-    virtualEnvWrapperLoc="${virtualEnvLoc}wrapper.sh"
-
-    if [ ! -f $virtualEnvWrapperLoc ]; then
-        task "Installing virtualenvwrapper ..."
-        pip install virtualenvwrapper >> install_log
-        subtask "done"
-
-        task "Setting/sourcing necessary virtualenv things ..."
-        # Need to setup environment for virtualenv
-        export WORKON_HOME=$HOME/.virtualenvs
-        subtask "done"
-    fi
-
-    # Just to be safe, we'll source virtualenvwrapper. This is really only
-    # necessary if we installed it for the user.
-    source $virtualEnvWrapperLoc
-
     # Create a new environment for OCW work
-    task "Creating a new environment ..."
-    mkvirtualenv ocw >> install_log
-    workon ocw >> install_log
+    task "Creating a new environment in ~/ocw..."
+    cd ~
+    virtualenv ocw >> install_log
+    source ~/ocw/bin/activate >> install_log
+    cd $INIT_PWD
     subtask "done"
 fi
 
@@ -170,6 +149,9 @@ conda init >> install_log
 header "Installing dependencies with conda ..."
 echo | conda install --file ocw-conda-dependencies.txt
 
+# Before installing packages with pip we need to activate the virtualenv with conda
+source ~/ocw/bin/activate ~/ocw >> install_log
+
 # We only use conda for the annoying dependencies like numpy,
 # scipy, matplotlib, and basemap. For everything else, we stick
 # with pip.


Mime
View raw message