File: rules

package info (click to toggle)
mutagen 1.40.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,504 kB
  • sloc: python: 22,303; makefile: 63
file content (55 lines) | stat: -rwxr-xr-x 1,389 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
55
#!/usr/bin/make -f

export PYBUILD_NAME=mutagen

# This is generally a good idea to avoid littering the filesystem with unneeded
# pyc files, but it is also specifically needed to avoid byte-compilation of
# the binaries in tools/ when the test suite is run.
export PYTHONDONTWRITEBYTECODE=yes

# Set UTF-8 locale as the tests expect this
export LC_ALL=C.UTF-8


ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
SPHINXDOC=,sphinxdoc
else
SPHINXDOC=
endif
%:
	dh $@ --with python2,python3,pypy$(SPHINXDOC) --buildsystem=pybuild

ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. \
	   http_proxy='127.0.0.1:9' \
	   https_proxy='127.0.0.1:9' \
	   python3 -m sphinx -N -b html docs/ $(CURDIR)/.pybuild/docs/html/
	$(MAKE) -C docs/man
endif


override_dh_auto_install:
	dh_auto_install
# Don't ship binaries or manpages in the pypy or python3 packages
	rm -rf debian/pypy-mutagen/usr/bin \
	       debian/pypy-mutagen/usr/lib/pypy/share \
	       debian/pypy-mutagen/usr/share \
	       debian/python-mutagen/usr/share/man \
	       debian/python3-mutagen/usr/bin \
	       debian/python3-mutagen/usr/share


override_dh_installchangelogs:
	dh_installchangelogs NEWS


override_dh_clean:
	dh_clean
	rm -rf docs/man/_man


override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="{interpreter} setup.py test --no-quality" dh_auto_test