You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by go...@apache.org on 2014/06/05 00:36:27 UTC
[1/5] git commit: Drop virtualenvwrapper
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 <si...@gmail.com>
Authored: Wed Jun 4 11:05:18 2014 -0700
Committer: cgoodale <si...@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.
[3/5] git commit: Removed the extra second source activate command
for conda
Posted by go...@apache.org.
Removed the extra second source activate command for conda
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/b8dda5f7
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/b8dda5f7
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/b8dda5f7
Branch: refs/heads/master
Commit: b8dda5f7a8c41143a48f2f9fba1f511898c823db
Parents: 7ccd34b
Author: cgoodale <si...@gmail.com>
Authored: Wed Jun 4 12:37:37 2014 -0700
Committer: cgoodale <si...@gmail.com>
Committed: Wed Jun 4 12:37:37 2014 -0700
----------------------------------------------------------------------
easy-ocw/install-osx.sh | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/b8dda5f7/easy-ocw/install-osx.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-osx.sh b/easy-ocw/install-osx.sh
index e9419a9..c3ddddc 100755
--- a/easy-ocw/install-osx.sh
+++ b/easy-ocw/install-osx.sh
@@ -149,9 +149,6 @@ 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.
[5/5] git commit: Merge branch 'CLIMATE-451'
Posted by go...@apache.org.
Merge branch 'CLIMATE-451'
- Resolve PR #57
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/fbe45740
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/fbe45740
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/fbe45740
Branch: refs/heads/master
Commit: fbe4574005515d3236c6bae827e365bddc81a7fd
Parents: ac2ad6d 98e3cb5
Author: cgoodale <si...@gmail.com>
Authored: Wed Jun 4 15:35:03 2014 -0700
Committer: cgoodale <si...@gmail.com>
Committed: Wed Jun 4 15:35:03 2014 -0700
----------------------------------------------------------------------
easy-ocw/install-osx.sh | 73 ++++++++++++++++++++++++++++----------------
1 file changed, 46 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
[4/5] git commit: Add additional POST INSTALL Message
Posted by go...@apache.org.
Add additional POST INSTALL Message
- Elaborated the POST INSTALL Message when the -e flag is used
- Create a new POST INSTALL Message for those who do not use the -e
option
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/98e3cb5f
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/98e3cb5f
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/98e3cb5f
Branch: refs/heads/master
Commit: 98e3cb5f53979b876da8c8acbcb0dea654dcb006
Parents: b8dda5f
Author: cgoodale <si...@gmail.com>
Authored: Wed Jun 4 13:23:55 2014 -0700
Committer: cgoodale <si...@gmail.com>
Committed: Wed Jun 4 13:23:55 2014 -0700
----------------------------------------------------------------------
easy-ocw/install-osx.sh | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/98e3cb5f/easy-ocw/install-osx.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-osx.sh b/easy-ocw/install-osx.sh
index c3ddddc..1e6a248 100755
--- a/easy-ocw/install-osx.sh
+++ b/easy-ocw/install-osx.sh
@@ -158,6 +158,12 @@ pip install -r ocw-pip-dependencies.txt >> install_log
if [ $WITH_VIRTUAL_ENV == 1 ]; then
echo "***POST INSTALLATION NOTE***
+
+If you are familiar with virtualenv you should know that activating
+the new 'ocw' environment is different because we use conda to install
+packages. An example of the command you want to run is listed in the
+alias below.
+
To make it easier to change into the 'ocw' virtualenv add the
following alias to your ~/.bash_profile
@@ -165,5 +171,26 @@ following alias to your ~/.bash_profile
When you want to use ocw in the future, you just have to type 'ocw'
in your terminal."
+else
+ echo "***POST INSTALLATION NOTE***
+
+If you have run this script within your own virtualenv you need to know
+a couple of caveats/side effects that are caused by using conda to install
+packages within the virtualenv.
+
+- Virtualenv wrapper will throw errors like those outlined here:
+https://issues.apache.org/jira/browse/CLIMATE-451
+
+- You will not be able to 'activate' the environment using the normal
+virtualenv command, you must instead use the conda activate command as follows:
+
+source path/to/your_env/bin/activate path/to/your_env
+
+Example: (assuming your env is in ~/.virtualenv/ocw)
+
+source ~/.virtualenv/ocw/bin/activate ~/.virtualenv/ocw
+
+"
+
fi
[2/5] git commit: Add note about using an alias for ocw activation
Posted by go...@apache.org.
Add note about using an alias for ocw activation
Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/7ccd34b8
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/7ccd34b8
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/7ccd34b8
Branch: refs/heads/master
Commit: 7ccd34b83b16eae26e7ed90cf7cd2c66952f7c59
Parents: ca50fbf
Author: cgoodale <si...@gmail.com>
Authored: Wed Jun 4 11:43:29 2014 -0700
Committer: cgoodale <si...@gmail.com>
Committed: Wed Jun 4 11:43:29 2014 -0700
----------------------------------------------------------------------
easy-ocw/install-osx.sh | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/climate/blob/7ccd34b8/easy-ocw/install-osx.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-osx.sh b/easy-ocw/install-osx.sh
index 4b058d7..e9419a9 100755
--- a/easy-ocw/install-osx.sh
+++ b/easy-ocw/install-osx.sh
@@ -157,3 +157,16 @@ source ~/ocw/bin/activate ~/ocw >> install_log
# with pip.
header "Installing additional Python packages"
pip install -r ocw-pip-dependencies.txt >> install_log
+
+
+if [ $WITH_VIRTUAL_ENV == 1 ]; then
+ echo "***POST INSTALLATION NOTE***
+To make it easier to change into the 'ocw' virtualenv add the
+following alias to your ~/.bash_profile
+
+ alias ocw='source ~/ocw/bin/activate ~/ocw/'
+
+When you want to use ocw in the future, you just have to type 'ocw'
+in your terminal."
+fi
+