summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2022-10-27 13:44:12 -0500
committerDavid Beazley <dave@dabeaz.com>2022-10-27 13:44:12 -0500
commitaf80858e888c5f36979da88fcb1080de7b848967 (patch)
tree2f2fb95414baee83e489eac1b936602599ea9eba /Makefile
parent818ab0684e33f5f513fc839673ff56ea330b6380 (diff)
downloadply-af80858e888c5f36979da88fcb1080de7b848967.tar.gz
Reorganization. Added makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..683f97c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+PYTHON=python3
+VENV=.venv
+
+# 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
+
+# Run unit tests
+test::
+ ./$(VENV)/bin/python -m pip install .
+ ./$(VENV)/bin/python tests/testlex.py
+ ./$(VENV)/bin/python tests/testyacc.py
+
+# Build an artifact suitable for installing with pip
+build::
+ ./$(VENV)/bin/python -m build
+
+# Install into the default Python
+install::
+ $(PYTHON) -m pip install .