File: rules

package info (click to toggle)
python-charset-normalizer 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 656 kB
  • sloc: python: 4,690; sh: 34; makefile: 24
file content (23 lines) | stat: -rwxr-xr-x 814 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk

BUILD_DATE  = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -N -D html_last_updated_fmt="$(BUILD_DATE)"

export PYBUILD_NAME=charset_normalizer
export PYBUILD_BEFORE_TEST=cp -r {dir}/data {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/.coverage {build_dir}/data/

%:
	dh $@ --with=sphinxdoc --buildsystem=pybuild

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs/ $(CURDIR)/debian/python-charset-normalizer-doc/usr/share/doc/python-charset-normalizer-doc/html
	rm $(CURDIR)/debian/python-charset-normalizer-doc/usr/share/doc/python-charset-normalizer-doc/html/.nojekyll
	dh_sphinxdoc
endif