diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 23 insertions, 7 deletions
@@ -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 . |