File: rules

package info (click to toggle)
faker 39.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,712 kB
  • sloc: python: 343,295; makefile: 183; sh: 20
file content (33 lines) | stat: -rwxr-xr-x 971 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
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/make -f

export PYBUILD_NAME=fake-factory
export DOC_PKG_NAME=faker-doc
SPHINXOPTS := -N

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_clean:
	rm -rf .mypy_cache

execute_before_dh_installman:
	PYTHONPATH="." help2man -n "command to generate fake data" --no-info \
		--output=debian/faker.1 debian/faker/usr/bin/faker

execute_after_dh_auto_install:
	# Move the python 3 script to the faker package
	mkdir -p debian/faker/usr/bin
	mv debian/python3-fake-factory/usr/bin/faker debian/faker/usr/bin/
	dh_auto_test

# tests needs package installed.
# please help to fix it if can
# see https://github.com/joke2k/faker/issues/1969
override_dh_auto_test:

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=`dirname $$(find .pybuild/ -type d -name "*$(PYBUILD_NAME)*dist-info" | head -n1)` \
	python3 -m sphinx -b html $(SPHINXOPTS) docs $(CURDIR)/debian/$(DOC_PKG_NAME)/usr/share/doc/$(DOC_PKG_NAME)/html
	dh_sphinxdoc
endif