| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
include /usr/share/dpkg/pkg-info.mk |
| 7 |
|
| 8 |
BUILD_DATE = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") |
| 9 |
SPHINXOPTS := -N -D html_last_updated_fmt="$(BUILD_DATE)" |
| 10 |
|
| 11 |
export PYBUILD_NAME=chardet |
| 12 |
export PYBUILD_BEFORE_TEST=cp {dir}/test.py {build_dir} |
| 13 |
export PYBUILD_AFTER_TEST=rm {build_dir}/test.py |
| 14 |
export PYBUILD_TEST_ARGS=test.py -v -k 'not test_detect_all_and_detect_one_should_agree' |
| 15 |
|
| 16 |
%: |
| 17 |
dh $@ --with sphinxdoc --buildsystem=pybuild |
| 18 |
|
| 19 |
override_dh_sphinxdoc: |
| 20 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 21 |
PYTHONPATH=src python3 -m sphinx -b html $(SPHINXOPTS) docs $(CURDIR)/debian/python-chardet-doc/usr/share/doc/python-chardet-doc/html |
| 22 |
dh_sphinxdoc |
| 23 |
endif |
| 24 |
|
| 25 |
override_dh_clean: |
| 26 |
dh_clean |
| 27 |
rm -rf .hypothesis/ |