3 SPHINXBUILD = $(PYTHON) -m sphinx
5 DOCHTML = $(DOCDIR)/html
6 DOCTREES = $(DOCDIR)/doctrees
7 ALLSPHINXOPTS = -d $(DOCTREES) $(SPHINXOPTS) $(DOCDIR)
9 FULLVER = pylibacl-$(VERSION)
10 DISTFILE = $(FULLVER).tar.gz
13 RSTFILES = doc/index.rst doc/module.rst doc/news.rst doc/readme.md doc/conf.py
18 $(PYTHON) ./setup.py build_ext --inplace
20 $(DOCHTML)/index.html: $(MODNAME) $(RSTFILES) acl.c
21 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCHTML)
24 doc: $(DOCHTML)/index.html
27 fakeroot $(PYTHON) ./setup.py sdist
31 TDIR=$$(mktemp -d) && \
32 trap "rm -rf $$TDIR" EXIT; \
33 tar xzf dist/$(DISTFILE) -C $$TDIR && \
34 (cd $$TDIR/$(FULLVER) && make doc && make test && make dist) && \
35 echo "All good, you can upload $(DISTFILE)!"
39 for ver in 3.4 3.5 3.6 3.7 3.8 3.9; do \
40 for flavour in "" "-dbg"; do \
41 if type python$$ver$$flavour >/dev/null; then \
42 echo Testing with python$$ver$$flavour; \
43 python$$ver$$flavour ./setup.py build_ext -i; \
44 python$$ver$$flavour -m pytest tests ;\
49 if type $$pp >/dev/null; then \
50 echo Testing with $$pp; \
51 $$pp ./setup.py build_ext -i; \
52 $$pp -m pytest tests; \
57 python3 setup.py build_ext -i
58 python3 -m pytest tests
61 while inotifywait -e CLOSE_WRITE tests/test_*.py; do \
62 python3 -m pytest tests; \
67 $(MAKE) test CFLAGS="-coverage"
68 lcov --capture --no-external --directory . --output-file coverage.info
69 genhtml coverage.info --output-directory out
72 rm -rf $(DOCHTML) $(DOCTREES)
78 MYPYPATH=. mypy --check-untyped-defs --warn-incomplete-stub tests/test_acls.py
80 .PHONY: doc test clean dist coverage ci types