aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile30
2 files changed, 24 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 92fccc8..68379df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@
# Emacs tmp files
.#*
+venv/
build/
dist/
diff --git a/Makefile b/Makefile
index 23ecffa..c0b35ef 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,26 @@
# Makefile for "fg21sim"
-#
-# 2016-09-20
-#
-init:
- pip3 install --user -r requirements.txt
+default:
+ @echo "+-------------------------------------------------------------+"
+ @echo "| Make Utility for fg21sim |"
+ @echo "+-------------------------------------------------------------+"
+ @echo "Available targets:"
+ @echo " + venv"
+ @echo " create virtualenv 'venv' and install the dependencies"
+ @echo " + test"
+ @echo " run the test cases"
-test:
- nosetests tests
+# Create virtualenv and install/update the dependencies
+venv: venv/bin/activate
+venv/bin/activate: requirements.txt
+ test -d "venv" || virtualenv -p python3 venv
+ ./venv/bin/pip3 install --user -r requirements.txt
+ touch venv/bin/activate
+
+# Install this package to the virtualenv
+devbuild: venv
+ ./venv/bin/python3 setup.py install
+
+# Run the test cases
+test: devbuild
+ ./venv/bin/python3 tests/runtests.py