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.
27 clean-hook::; rm -f MANIFEST RELEASE
31 OPTS-dist += --dist-dir .
34 OPTS-install += --prefix $(prefix)
38 ###--------------------------------------------------------------------------
39 ### Interfacing `setup.py' to make.
41 pysetup = $(PYTHON) setup.py \
42 $(if $(filter-out undefined,$(origin CMD-$1)),$(CMD-$1),$1) \
45 $(foreach t, $(PYTARGETS), $t-hook):: %:
46 $(PYTARGETS):: %: %-hook setup.py
51 ###--------------------------------------------------------------------------
56 $(PYTHON) setup.py sdist --dist-dir _distcheck
57 cd _distcheck && tar xvfz $(distdir).tar.gz
58 cd _distcheck/$(distdir) && make && make check && make dist
59 cp _distcheck/$(distdir)/$(distdir).tar.gz .
62 ###----- That's all, folks --------------------------------------------------