File: rules

package info (click to toggle)
cssutils 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,352 kB
  • sloc: python: 20,353; sh: 62; makefile: 27
file content (36 lines) | stat: -rwxr-xr-x 1,246 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
#!/usr/bin/make -f

export PYBUILD_NAME=cssutils
export PYBUILD_DEST_DIR_python3=debian/python3-cssutils
export PYBUILD_TEST_python3=--test-nose

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

override_dh_auto_test:
	# Disable tests requiring internet access.
	PYBUILD_SYSTEM=custom \
	    PYBUILD_TEST_ARGS_python3="nosetests3 -v \
					         --exclude=test_parseUrl \
						 --exclude=test_handlers \
					         --py3where {build_dir}/cssutils/tests;" \
	    dh_auto_test

override_dh_auto_install:
	dh_auto_install
	# Remove py2 executables from py3 package
	rm $(PYBUILD_DEST_DIR_python3)/usr/bin/cssparse_py2
	rm $(PYBUILD_DEST_DIR_python3)/usr/bin/csscombine_py2
	rm $(PYBUILD_DEST_DIR_python3)/usr/bin/csscapture_py2

override_dh_installman:
	cp debian/man/cssparse.manpage1 debian/man/cssparse_py3.1
	dh_installman -p python3-cssutils debian/man/cssparse_py3.1
	cp debian/man/csscombine.manpage1 debian/man/csscombine_py3.1
	dh_installman -p python3-cssutils debian/man/csscombine_py3.1
	cp debian/man/csscapture.manpage1 debian/man/csscapture_py3.1
	dh_installman -p python3-cssutils debian/man/csscapture_py3.1

override_dh_auto_clean:
	rm -f debian/man/cssparse_py3.1 debian/man/csscombine_py3.1 \
		debian/man/csscapture_py3.1