aboutsummaryrefslogtreecommitdiffstats
path: root/python/Makefile
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-07-22 01:55:37 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-07-22 01:55:37 +0200
commitf4a4eecd538c3130ebb15f51e80edc6bfa65af75 (patch)
tree6925a7745b76c831d4e2f9b639d3b83172667d58 /python/Makefile
parentc53289026c9cf85b9d674609bdcdfaad83187bbb (diff)
downloadrefcat-f4a4eecd538c3130ebb15f51e80edc6bfa65af75.tar.gz
refcat-f4a4eecd538c3130ebb15f51e80edc6bfa65af75.zip
update README
Diffstat (limited to 'python/Makefile')
-rw-r--r--python/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/python/Makefile b/python/Makefile
index 817d366..6564171 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -9,6 +9,8 @@ endif
SHELL := /bin/bash
PY_FILES := $(shell find . -name \*.py -print)
PKGNAME := refcat
+# A class for which we should render an image.
+TOP_CLASS := BrefCombined
# The "zipapp" we build, cf. PEP441, https://www.python.org/dev/peps/pep-0441/,
# https://shiv.readthedocs.io/
@@ -20,15 +22,17 @@ ZIPAPP := $(PKGNAME).pyz
# make refcat.pyz PYTHON_INTERPRETER='"/usr/bin/env python3.8"'
PYTHON_INTERPRETER := "/usr/bin/env python3.8"
-.PHONY: test
-test:
- pytest -v tests
+.PHONY: all
+all: notes/deps.png
$(ZIPAPP): $(PY_FILES)
# https://shiv.readthedocs.io/en/latest/cli-reference.html
# note: use SHIV_ROOT envvar to override expansion dir (e.g. if home is networked)
shiv --reproducible --compressed --entry-point refcat.cli:main --python $(PYTHON_INTERPRETER) --output-file $(ZIPAPP) .
+notes/deps.png: $(ZIPAPP)
+ ./refcat.pyz dot $(TOP_CLASS) | dot -Tpng > notes/deps.png
+
.PHONY: deploy
deploy: $(ZIPAPP)
ifndef DEPLOY_TARGET
@@ -37,6 +41,10 @@ else
rsync -avP $^ ${DEPLOY_TARGET}
endif
+.PHONY: test
+test:
+ pytest -v tests
+
.PHONY: fmt
fmt:
yapf -p -i -r $(PKGNAME) tests