diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 35 |
1 files changed, 15 insertions, 20 deletions
@@ -1,36 +1,26 @@ -.PHONY: check build wheel install clean sphinx-apidoc documentation +.PHONY: check check-style check-type \ + build wheel install clean sphinx-apidoc documentation PYTHON = python -BUILDER = $(PYTHON) -m build -INSTALLER = $(PYTHON) -m installer -VERSION = $(shell $(PYTHON) -c 'print(__import__("toml").load(open("pyproject.toml"))["project"]["version"])') -WHEEL = dist/rainbow_parenthesis-$(VERSION)-py3-none-any.whl DOC_OUTPUT = doc.rendered DESTDIR = / PREFIX = /usr -INSTALL_FLAGS = --destdir=$(DESTDIR) \ - --prefix=$(PREFIX) - -build: $(WHEEL) - -$(WHEEL): pyproject.toml $(shell find rainbow_parenthesis -type f -name '*.py') - $(BUILDER) --no-isolation --wheel +build: pyproject.toml $(shell find rainbow_parenthesis -type f -name '*.py') + $(PYTHON) -m build --no-isolation --wheel install: build - @echo "WHEEL=$(WHEEL)" - $(INSTALLER) $(INSTALL_FLAGS) $(WHEEL) - -clean: - -rm -r build - -rm -r dist - -rm -r rainbow_parenthesis.egg-info/ + $(PYTHON) -m installer --destdir=$(DESTDIR) --prefix=$(PREFIX) dist/*.whl -check: +check-style: flake8 rainbow_parenthesis + +check-type: mypy -p rainbow_parenthesis +check: check-style check-type + # Generate some rst files from our source code sphinx-apidoc: sphinx-apidoc --separate --force -o doc rainbow_parenthesis @@ -40,3 +30,8 @@ $(DOC_OUTPUT)/index.html: sphinx-apidoc sphinx-build -b dirhtml doc $(DOC_OUTPUT) documentation: sphinx-apidoc + +clean: + -rm -r build + -rm -r dist + -rm -r rainbow_parenthesis.egg-info/ |