diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2016-03-27 19:38:53 -0700 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2016-03-27 19:38:53 -0700 |
commit | 8756fbc0768f2f51f807ce3a3a12d5ee5a35fa05 (patch) | |
tree | f2a4acf0e5e6ef35fafeaf797a8830f2a99f7a81 | |
parent | 37aae6ed0b39c2e231a2b228766af1c8a97d974d (diff) | |
download | isort-8756fbc0768f2f51f807ce3a3a12d5ee5a35fa05.tar.gz |
Automatically create venv for development, put in sub directory (venv) tell gitignore to ignore the modern files
-rw-r--r-- | .env | 31 | ||||
-rw-r--r-- | .gitignore | 6 |
2 files changed, 31 insertions, 6 deletions
@@ -12,6 +12,33 @@ fi export PROJECT_NAME=$OPEN_PROJECT_NAME export PROJECT_DIR="$PWD" +if [ ! -d "venv" ]; then + if ! hash pyvenv 2>/dev/null; then + function pyvenv() + { + if hash pyvenv-3.5 2>/dev/null; then + pyvenv-3.5 $@ + fi + if hash pyvenv-3.4 2>/dev/null; then + pyvenv-3.4 $@ + fi + if hash pyvenv-3.3 2>/dev/null; then + pyvenv-3.3 $@ + fi + if hash pyvenv-3.2 2>/dev/null; then + pyvenv-3.2 $@ + fi + } + fi + + echo "Making venv for $PROJECT_NAME" + pyvenv venv + . venv/bin/activate + python setup.py install +fi + +. venv/bin/activate + # Let's make sure this is a hubflow enabled repo yes | git hf init >/dev/null 2>/dev/null @@ -20,7 +47,7 @@ alias root="cd $PROJECT_DIR" alias project="root; cd $PROJECT_NAME" # Commands -alias test="root; py.test -s" +alias test="root; py.test test_isort.py -s" alias install="_install_project" alias distribute="python setup.py sdist upload; python setup.py bdist_wheel upload" alias leave="_leave_project" @@ -45,4 +72,6 @@ function _leave_project() unalias install unalias distribute unalias leave + + deactivate } @@ -62,9 +62,5 @@ atlassian-ide-plugin.xml pip-selfcheck.json # Python3 Venv Files -bin/ -include/ -lib/ -lib64 +venv/ pyvenv.cfg -share/ |