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
|
#!/usr/bin/make -f
include /usr/share/python3/python.mk
python2_all = pyversions -r | tr ' ' '\n' | xargs -t -I {} env PYTHONWARNINGS=d {}
python3_all = $(patsubst py%,py3%,$(python2_all))
build2 = python setup.py build --build-lib build/2/
build3 = python3 setup.py build --build-lib build/3/
install = install $(py_setup_install_args)
.PHONY: clean
clean: debian/control
dh_clean
rm -rf build
.PHONY: build build-arch build-indep
build build-indep: build/stamp
build/stamp: setup.py
$(build2)
$(build3)
ifeq "$(filter nocheck,$(DEB_BUILD_OPTIONS))" ""
export PYTHONPATH=build/2/ && $(python2_all) tests/romantest.py --verbose
export PYTHONPATH=build/3/ && $(python3_all) tests/romantest.py --verbose
endif
touch $(@)
.PHONY: binary binary-arch binary-indep
binary binary-indep: build/stamp debian/control
dh_testroot
dh_prep
$(build2) $(install) --root=debian/python-roman/
$(build3) $(install) --root=debian/python3-roman/
sed -i 's/^\(Metadata-Version\): 1\.0$$/\1: 1\.1/' debian/*/usr/lib/python*/*-packages/*.egg-info
dh_python2
dh_python3
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
# vim:ts=4 sw=4 noet
|