File: rules

package info (click to toggle)
pyx3 0.17-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,328 kB
  • sloc: python: 27,656; makefile: 225; ansic: 130; sh: 17
file content (49 lines) | stat: -rwxr-xr-x 1,574 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

execute_before_dh_auto_clean:
	$(MAKE) clean

execute_before_dh_auto_build:
	cd pyx/data/lfs; python3 createlfs.py

override_dh_auto_build-indep:
	$(MAKE) -C faq all
	$(MAKE) -C manual all

execute_after_dh_auto_install:
	rm -f $(CURDIR)/debian/tmp/usr/lib/python*/*-packages/pyx/data/lfs/createlfs.*
	rm -f $(CURDIR)/debian/tmp/usr/lib/python*/*-packages/output
	rm -f $(CURDIR)/debian/*/usr/lib/python*/*-packages/pyx/font/_t1code.c
	rm -f $(CURDIR)/debian/*/usr/lib/python*/*-packages/pyx/pykpathsea.c

override_dh_installdocs-indep:
	mv manual/_build/html/ manual/_build/manual/
	mv faq/_build/html/ faq/_build/faq/
	dh_installdocs -Xobjects.inv
	ln -sf /usr/share/javascript/mathjax/ \
	  debian/python3-pyx-doc/usr/share/doc/python3-pyx/manual/_static/mathjax
	dh_sphinxdoc

execute_after_dh_installexamples-indep:
	# A handful of examples have "#!/usr/bin/env python" that needs
	# cleaning up in the package.
	find debian/python*doc/usr/share/doc/python3-pyx/examples/ \
	  -name \*py \
	  -exec grep -l -e '#!/usr/bin/env' {} + | \
	  xargs sed -i -r 's/(#!\/usr\/bin\/env python)$$/\13/'
	# also clean up the example-building INDEX files
	find debian/python*doc/usr/share/doc/python3-pyx/examples/ -name INDEX -delete

override_dh_compress:
	dh_compress --all -X.pdf -X.ipynb

export PYBUILD_TEST_CUSTOM = 1
export PYBUILD_TEST_ARGS = PYTHON={interpreter} make -C test unit functional

override_dh_auto_test-indep:
	# No tests for the doc package