1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
#!/usr/bin/make -f
PY2VERS=$(shell pyversions -vr)
PY3VERS=$(shell py3versions -vr)
PYVERS=$(PY2VERS) $(PY3VERS)
DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk
clean:
dh_testdir
dh_testroot
rm -f *-stamp
rm -f build-*
rm -rf build
rm -rf docs/_build
find . -name *\.py[co] -exec rm {} \;
dh_clean
build: build-indep build-arch
build-arch: $(PYVERS:%=build-python%)
touch $@
build-python%:
dh_testdir
python$* setup.py build
touch $@
build-indep:
make -C $(CURDIR)/docs man
touch $@
install: $(PYVERS:%=install-python%)
install-python%: build
if echo "$*" | grep -q 3\..* ; then \
python$* setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-gmpy2/; \
else \
python$* setup.py install --install-layout=deb --root $(CURDIR)/debian/python-gmpy2/; \
fi
test: $(PYVERS:%=test-python%)
test-python%: install
if echo "$*" | grep -q 3\..* ; then \
PYTHONPATH=$(CURDIR)/debian/python3-gmpy2/usr/lib/python3/dist-packages:$(PYTHONPATH) python$* test/runtests.py; \
else \
PYTHONPATH=$(CURDIR)/debian/python-gmpy2/usr/lib/python$*/dist-packages:$(PYTHONPATH) python$* test/runtests.py; \
fi
binary-indep: build install test
binary-arch: build install test
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installman
dh_installexamples
dh_python2
dh_python3
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary test install
|