File: rules

package info (click to toggle)
pcpp 1.30-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: python: 5,430; makefile: 19
file content (31 lines) | stat: -rwxr-xr-x 898 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# magic debhelper rule
%:
	dh $@ --buildsystem=pybuild

override_dh_auto_install:
	set -e && for py3vers in $(shell py3versions -sv); do \
	  python$$py3vers setup.py install --install-layout=deb \
	    --root $(CURDIR)/debian/python3-pcpp; \
        done
	echo "#!/usr/bin/python3 " > debian/python3-pcpp/usr/bin/pcpp-python
	tail -n +2 debian/python3-pcpp/usr/bin/pcpp >> debian/python3-pcpp/usr/bin/pcpp-python
	rm debian/python3-pcpp/usr/bin/pcpp
	rm -f debian/python3-pcpp/usr/lib/python3/dist-packages/LICENSE.txt

override_dh_auto_clean:
	# dh_auto_clean avoid bug where this calls python, not python3
	python3 setup.py clean 
	rm -fr *.egg-info
	rm -fr build __pycache__ .pytest_cache .pybuild

override_dh_auto_build:
	# ditto.
	python3 setup.py build --force

override_dh_auto_test:
	@echo Ignore tests