3 ### Standard Makefile for Python packages.
10 ###--------------------------------------------------------------------------
11 ### Version information.
13 distdir := $(shell $(PYTHON) setup.py -q distdir)
15 ###--------------------------------------------------------------------------
16 ### Useful targets implemented by the `setup.py' program.
23 clean-hook::; rm -f MANIFEST RELEASE
27 OPTS-dist += --dist-dir .
30 OPTS-install += --prefix $(prefix)
34 ###--------------------------------------------------------------------------
35 ### Interfacing `setup.py' to make.
37 pysetup = $(PYTHON) setup.py \
38 $(if $(filter-out undefined,$(origin CMD-$1)),$(CMD-$1),$1) \
41 $(foreach t, $(PYTARGETS), $t-hook):: %:
42 $(PYTARGETS):: %: %-hook setup.py
47 ###--------------------------------------------------------------------------
52 $(PYTHON) setup.py sdist --dist-dir _distcheck
53 cd _distcheck && tar xvfz $(distdir).tar.gz
54 cd _distcheck/$(distdir) && make && make check && make dist
55 cp _distcheck/$(distdir)/$(distdir).tar.gz .
58 ###----- That's all, folks --------------------------------------------------