Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export PYBUILD_NAME=fake-factory
4 export DOC_PKG_NAME=faker-doc
5 SPHINXOPTS := -N
6
7 %:
8 dh $@ --buildsystem=pybuild
9
10 execute_after_dh_clean:
11 rm -rf .mypy_cache
12
13 execute_before_dh_installman:
14 PYTHONPATH="." help2man -n "command to generate fake data" --no-info \
15 --output=debian/faker.1 debian/faker/usr/bin/faker
16
17 execute_after_dh_auto_install:
18 # Move the python 3 script to the faker package
19 mkdir -p debian/faker/usr/bin
20 mv debian/python3-fake-factory/usr/bin/faker debian/faker/usr/bin/
21 dh_auto_test
22
23 # tests needs package installed.
24 # please help to fix it if can
25 # see https://github.com/joke2k/faker/issues/1969
26 override_dh_auto_test:
27
28 override_dh_sphinxdoc:
29 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
30 PYTHONPATH=`dirname $$(find .pybuild/ -type d -name "*$(PYBUILD_NAME)*dist-info" | head -n1)` \
31 python3 -m sphinx -b html $(SPHINXOPTS) docs $(CURDIR)/debian/$(DOC_PKG_NAME)/usr/share/doc/$(DOC_PKG_NAME)/html
32 dh_sphinxdoc
33 endif