From cd78398d6affdd4e7841771e9070da9ce10e2881 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Tue, 26 Nov 2019 22:22:51 +0100 Subject: [PATCH] Add a distcheck target --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 3e76944..634c6d0 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ DOCDIR = doc DOCHTML = $(DOCDIR)/html DOCTREES = $(DOCDIR)/doctrees ALLSPHINXOPTS = -d $(DOCTREES) $(SPHINXOPTS) $(DOCDIR) +VERSION = 0.5.4 +FULLVER = pylibacl-$(VERSION) +DISTFILE = $(FULLVER).tar.gz MODNAME = posix1e.so RSTFILES = doc/index.rst doc/module.rst NEWS README.rst doc/conf.py @@ -23,6 +26,14 @@ doc: $(DOCHTML)/index.html dist: fakeroot $(PYTHON) ./setup.py sdist +distcheck: dist + set -e; \ + TDIR=$$(mktemp -d) && \ + trap "rm -rf $$TDIR" EXIT; \ + tar xzf dist/$(DISTFILE) -C $$TDIR && \ + (cd $$TDIR/$(FULLVER) && make doc && make test && make dist) && \ + echo "All good, you can upload $(DISTFILE)!" + test: @for ver in 2.7 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7; do \ for flavour in "" "-dbg"; do \ -- 2.39.5