summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 23 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b2ac0c0..683f97c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,26 @@
-PYTHON ?= python
+PYTHON=python3
+VENV=.venv
-install:
- python install.py
+# Setup and install all of the required tools for building, testing,
+# and deploying
+setup::
+ rm -rf $(VENV)
+ $(PYTHON) -m venv $(VENV)
+ ./$(VENV)/bin/python -m pip install pytest
+ ./$(VENV)/bin/python -m pip install pytest-cov
+ ./$(VENV)/bin/python -m pip install build
+ ./$(VENV)/bin/python -m pip install twine
-test:
- cd test && $(PYTHON) testlex.py
- cd test && $(PYTHON) testyacc.py
+# Run unit tests
+test::
+ ./$(VENV)/bin/python -m pip install .
+ ./$(VENV)/bin/python tests/testlex.py
+ ./$(VENV)/bin/python tests/testyacc.py
-.PHONY: install test
+# Build an artifact suitable for installing with pip
+build::
+ ./$(VENV)/bin/python -m build
+
+# Install into the default Python
+install::
+ $(PYTHON) -m pip install .