From 8f815e1628af4b1aa960202f2b05101b99c297bb Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sat, 23 Nov 2019 22:34:29 +0100 Subject: [PATCH] Add a distcheck Makefile target MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Too bad setuptools doesn't have it built-in… --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bafcd44..6761bff 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ DOCDIR = doc DOCHTML = $(DOCDIR)/html DOCTREES = $(DOCDIR)/doctrees ALLSPHINXOPTS = -d $(DOCTREES) $(SPHINXOPTS) $(DOCDIR) +VERSION = 0.6.1 +FULLVER = pyxattr-$(VERSION) +DISTFILE = $(FULLVER).tar.gz MODNAME = xattr.so RSTFILES = doc/index.rst doc/module.rst doc/news.rst doc/readme.md doc/conf.py @@ -31,6 +34,14 @@ doc/news.rst: NEWS 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 $(PYVERS); do \ for flavour in "" "-dbg"; do \ @@ -77,4 +88,4 @@ clean: rm -f *.so rm -rf build -.PHONY: doc test clean dist coverage +.PHONY: doc test clean dist distcheck coverage -- 2.39.5