File: rules

package info (click to toggle)
pycallgraph 1.1.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 416 kB
  • sloc: python: 1,925; makefile: 47
file content (27 lines) | stat: -rwxr-xr-x 942 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
#!/usr/bin/make -f

PYTHON3=$(shell py3versions -d)

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install

	# rename the module
	mv debian/python3-pycallgraph/usr/lib/${PYTHON3}/dist-packages/pycallgraph2 debian/python3-pycallgraph/usr/lib/${PYTHON3}/dist-packages/pycallgraph
	mv debian/python3-pycallgraph/usr/lib/${PYTHON3}/dist-packages/pycallgraph2-1.1.3.egg-info debian/python3-pycallgraph/usr/lib/${PYTHON3}/dist-packages/pycallgraph-1.1.3.egg-info

	# and make sure every module/script imports get renamed too
	find debian/python3-pycallgraph/usr/ -type f -exec sed -i 's/pycallgraph2/pycallgraph/g' {} \;

override_dh_auto_test:
	dh_auto_test -- \
		--before-test "cp -r scripts/ {build_dir}" \
		--after-test  "rm -r {build_dir}/scripts {build_dir}//pycallgraph.gdf {build_dir}//pycallgraph.png"

override_dh_installexamples:
	dh_installexamples examples/*

override_dh_installdocs:
	dh_installdocs README.md