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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PYTHON2=$(shell pyversions -r)
PYTHON3=$(shell py3versions -r)
%:
dh $@ --with python2,python3
override_dh_clean:
dh_clean
rm -rf Features.html build/ Python?/unicodedata_db.h
override_dh_auto_build:
dh_auto_build
set -e; \
for python in $(PYTHON3); do \
$$python setup.py build ; \
$$python-dbg setup.py build ; \
done
rst2html docs/Features.rst > Features.html
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
set -e; \
for python in $(PYTHON2); do \
LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib"); \
PYTHONPATH=$$LIB $$python Python2/test_regex.py; \
done
-for python in $(PYTHON3); do \
LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_platlib)"); \
PYTHONPATH=$$LIB $$python Python3/test_regex.py; \
done
endif
override_dh_install:
set -e; \
for python in $(PYTHON2); do \
$$python setup.py install --install-layout=deb --root=$(CURDIR)/debian/python-regex; \
$$python-dbg setup.py install --install-layout=deb --root=$(CURDIR)/debian/python-regex-dbg; \
done
set -e; \
for python in $(PYTHON3); do \
$$python setup.py install --install-layout=deb --root=$(CURDIR)/debian/python3-regex; \
$$python-dbg setup.py install --install-layout=deb --root=$(CURDIR)/debian/python3-regex-dbg; \
done
# don't install pure python module in dbg pkgs
rm -rfv $(CURDIR)/debian/python*-regex-dbg/usr/lib/python*/dist-packages/*.py*
rm -rfv $(CURDIR)/debian/python*-regex-dbg/usr/lib/python*/dist-packages/*.egg-info
override_dh_installdocs:
dh_installdocs --link-doc=python-regex
override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
dh_strip -ppython-regex --dbg-package=python-regex-dbg
dh_strip -ppython3-regex --dbg-package=python3-regex-dbg
endif
|