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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PY2VERS := $(shell pyversions -s)
PY3VERS := $(shell py3versions -s)
# For running tests, we need UTF-8 charset
# See #604706 for references about this method
LOCALE_PATH := debian/tmpdir/usr/lib/locale
LOCALE_NAME := en_US
LOCALE_CHARSET := UTF-8
%:
dh $@ --with python2,python3
override_dh_auto_install:
set -e ; \
for python in $(PY2VERS); do \
$$python setup.py install --no-compile -O0 --install-layout=deb \
--root $(CURDIR)/debian/python-prettytable; \
done
set -e ; \
for python in $(PY3VERS); do \
$$python setup.py install --no-compile -O0 --install-layout=deb \
--root $(CURDIR)/debian/python3-prettytable; \
done
override_dh_auto_clean:
set -e ; \
for python in $(PY2VERS); do \
$$python setup.py clean -a; \
done
set -e ; \
for python in $(PY3VERS); do \
$$python setup.py clean -a; \
done
find . -name \*.pyc -exec rm {} \;
rm -rf $(LOCALE_PATH)
dh_clean
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
# configure a local charset dir, for testing purposes
mkdir -p $(LOCALE_PATH)
localedef -i $(LOCALE_NAME) -c -f $(LOCALE_CHARSET) \
-A /usr/share/locale/locale.alias --quiet \
$(LOCALE_PATH)/$(LOCALE_NAME).$(LOCALE_CHARSET)
set -e ; \
for python in $(PY2VERS) $(PY3VERS); do \
PYTHONPATH=. LOCPATH=$(LOCALE_PATH) LC_ALL=$(LOCALE_NAME).$(LOCALE_CHARSET) $$python setup.py test ; \
done
endif
override_dh_installdocs:
dh_installdocs -A README
|