summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2016-03-27 19:38:53 -0700
committerTimothy Crosley <timothy.crosley@gmail.com>2016-03-27 19:38:53 -0700
commit8756fbc0768f2f51f807ce3a3a12d5ee5a35fa05 (patch)
treef2a4acf0e5e6ef35fafeaf797a8830f2a99f7a81
parent37aae6ed0b39c2e231a2b228766af1c8a97d974d (diff)
downloadisort-8756fbc0768f2f51f807ce3a3a12d5ee5a35fa05.tar.gz
Automatically create venv for development, put in sub directory (venv) tell gitignore to ignore the modern files
-rw-r--r--.env31
-rw-r--r--.gitignore6
2 files changed, 31 insertions, 6 deletions
diff --git a/.env b/.env
index d53c77e1..11514d73 100644
--- a/.env
+++ b/.env
@@ -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
}
diff --git a/.gitignore b/.gitignore
index a4399826..24a8bb32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,9 +62,5 @@ atlassian-ide-plugin.xml
pip-selfcheck.json
# Python3 Venv Files
-bin/
-include/
-lib/
-lib64
+venv/
pyvenv.cfg
-share/