.bash_aliases should be cat-ed >> to the .bash_aliases
activate_environment should be copied to a $PATH dir
activate.patch should be aplied to the bin/activate script
Last active
December 28, 2015 23:58
-
-
Save txomon/7582355 to your computer and use it in GitHub Desktop.
Activator for python environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias activate="source activate_environment" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- bin/activate 2013-11-25 20:52:47.237686899 +0100 | |
+++ bin/activate 2013-10-25 02:37:31.005159153 +0200 | |
@@ -46,2 +46,22 @@ export PATH | |
+LD_LIBRARY_PATH="$VIRTUAL_ENV/lib" | |
+export LD_LIBRARY_PATH | |
+ | |
+CMAKE_PREFIX_PATH="$VIRTUAL_ENV" | |
+export CMAKE_PREFIX_PATH | |
+ | |
+CMAKE_INSTALL_PREFIX="$VIRTUAL_ENV" | |
+export CMAKE_INSTALL_PREFIX | |
+ | |
+C_INCLUDE_PATH="$VIRTUAL_ENV/include" | |
+export C_INCLUDE_PATH | |
+ | |
+CMAKE_LIBRARY_PATH="$VIRTUAL_ENV/lib" | |
+export CMAKE_LIBRARY_PATH | |
+ | |
+LIBRARY_PATH="$VIRTUAL_ENV/lib" | |
+export LIBRARY_PATH | |
+ | |
+alias cmake="cmake -D CMAKE_INSTALL_PREFIX='$CMAKE_INSTALL_PREFIX' " | |
+ | |
# unset PYTHONHOME if set | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oldpwd=$PWD | |
while true; do | |
if [ -f "$PWD/bin/activate" ]; then | |
source $PWD/bin/activate | |
break | |
elif [ -f "$PWD/ve/bin/activate" ]; then | |
source $PWD/ve/bin/activate | |
break | |
else | |
cd .. | |
if [ "$PWD" == "/" ]; then | |
break | |
fi | |
fi | |
done | |
cd $oldpwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment