File: rules

package info (click to toggle)
python-llfuse 1.3.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,200 kB
  • sloc: python: 1,976; ansic: 487; makefile: 41; sh: 10
file content (54 lines) | stat: -rwxr-xr-x 1,388 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
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/make -f
# -*- makefile -*-

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

%:
	dh $@ --with python2,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 -ppython-llfuse --dbg-package=python-llfuse-dbg
	dh_strip -ppython3-llfuse --dbg-package=python3-llfuse-dbg
endif

override_dh_auto_clean:
	# Remove documentation and cython output
	rm -rf build_cython build_sphinx src/llfuse/capi_*.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

.PHONY: get-orig-source
get-orig-source:
	uscan --rename --destdir=$(CURDIR)/.. --repack --force-download \
	      --download-current-version --compression xz

.PHONY: uscan
uscan:
	uscan --rename --destdir=$(CURDIR)/.. --repack --compression xz