2 SPHINXBUILD = python3 -m sphinx
4 DOCHTML = $(DOCDIR)/html
5 DOCTREES = $(DOCDIR)/doctrees
6 ALLSPHINXOPTS = -d $(DOCTREES) $(SPHINXOPTS) $(DOCDIR)
9 RSTFILES = doc/index.rst doc/module.rst NEWS README.rst doc/conf.py
14 ./setup.py build_ext --inplace
16 $(DOCHTML)/index.html: $(MODNAME) $(RSTFILES)
17 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCHTML)
20 doc: $(DOCHTML)/index.html
23 fakeroot ./setup.py sdist
26 @for ver in 2.7 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7; do \
27 for flavour in "" "-dbg"; do \
28 if type python$$ver$$flavour >/dev/null; then \
29 echo Testing with python$$ver$$flavour; \
30 python$$ver$$flavour ./setup.py test -q; \
34 for pp in pypy pypy3; do \
35 if type $$pp >/dev/null; then \
36 echo Testing with $$pp; \
37 $$pp ./setup.py test -q; \
43 $(MAKE) test CFLAGS="-coverage"
44 lcov --capture --directory . --output-file coverage.info
45 genhtml coverage.info --output-directory out
48 rm -rf $(DOCHTML) $(DOCTREES)
53 .PHONY: doc test clean dist coverage