File: rules

package info (click to toggle)
rapidfuzz 3.12.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,436 kB
  • sloc: python: 7,571; cpp: 7,481; sh: 30; makefile: 23
file content (33 lines) | stat: -rwxr-xr-x 979 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=rapidfuzz
export PYBUILD_TEST_PYTEST=1

SPHINXBUILD=sphinx-build
SPHINXBUILDDIR=build

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_configure:
	mkdir -p buildlib
	cd buildlib && cmake ../ \
	    -D CMAKE_MODULE_PATH=/usr/lib/python3/dist-packages/skbuild/resources/cmake

execute_after_dh_auto_build-indep:
	: # ensure that this target is non-empty
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	export PYTHONPATH=$$(pybuild --print build_dir | grep "^$$(py3versions -d)" | sed -e 's/^.*: //'); \
	    cd docs && $(SPHINXBUILD) -b html -d $(SPHINXBUILDDIR)/doctrees . $(SPHINXBUILDDIR)/html
endif

override_dh_auto_test-indep:
	# No need to run tests when only building documentation package

execute_after_dh_auto_clean:
	rm -rf docs/$(SPHINXBUILDDIR)
	rm -rf buildlib _skbuild

override_dh_installdocs:
	dh_installdocs -ppython-$(PYBUILD_NAME)-doc --doc-main-package=python3-$(PYBUILD_NAME)
	dh_installdocs --remaining-packages