File: rules

package info (click to toggle)
pyfuse3 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,104 kB
  • sloc: javascript: 9,411; python: 2,662; ansic: 363; makefile: 33; sh: 14
file content (44 lines) | stat: -rwxr-xr-x 1,072 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
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1
export PYBUILD_NAME=pyfuse3
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=--installed "{dir}/test/"

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

override_dh_auto_build: build_cython build_sphinx
	dh_auto_build

build_cython:
	dh_testdir
	python3 setup.py build_cython
	touch $@

build_sphinx:
	dh_testdir
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	python3 setup.py build_ext --inplace
	python3 setup.py build_sphinx
endif
	touch $@

override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
	dh_strip -ppython3-pyfuse3 --dbg-package=python3-pyfuse3-dbg
endif

override_dh_auto_clean:
	# Remove documentation and cython output
	rm -rf build_cython build_sphinx src/pyfuse3.c doc/
	find \( \( -name '*.egg-info' -type d \) \
	     -o \( -name __pycache__  -type d \) \
	     -o \( -name '*.so' -type f \) \
	     -o \( -name '*.pyc' -type f \) \
	     \) -prune -exec rm -rf '{}' +
	dh_auto_clean

update_intersphinx:
	wget http://docs.python.org/3/objects.inv -O debian/python.inv