Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 include /usr/share/dpkg/pkg-info.mk
4 include /usr/share/dpkg/architecture.mk
5
6 # Python versions
7 PY3DEF=$(shell py3versions -dv)
8 PY3VERS=$(shell py3versions -vr)
9
10 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
11 NUMJOBS=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
12 RUNTESTSOPTS=--shard_count=$(NUMJOBS)
13 endif
14
15 # In case matplotlib or anything else inquires
16 export HOME=$(CURDIR)/build
17 export MPLCONFIGDIR=$(CURDIR)/build
18
19 # For debian/generate-manpage
20 export DEB_VERSION_UPSTREAM
21
22 export PYBUILD_DESTDIR=debian/cython3
23
24 %:
25 dh $@ --buildsystem pybuild
26
27 execute_after_dh_install-arch:
28 # add debian version to watermark of generated files
29 sed -i -e "s/ on / (Debian $(DEB_VERSION)) on /" \
30 debian/cython3/usr/lib/python3*/dist-packages/Cython/Compiler/Version.py
31
32 execute_after_dh_auto_build-indep:
33 : # Build Documentation
34 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
35 $(MAKE) -C docs html
36 endif
37
38 override_dh_installdocs:
39 dh_installdocs -pcython-doc --doc-main-package=cython3
40 dh_installdocs --remaining-packages
41
42 override_dh_installchangelogs:
43 dh_installchangelogs --all CHANGES.rst
44
45 override_dh_auto_test-arch:
46 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))$(filter sparc64,$(DEB_HOST_ARCH)))
47 set -e; for P in $(PY3VERS); do \
48 echo =============== $$P start ===============; \
49 if PYTHONPATH=`/bin/ls -d $(CURDIR)/build/lib.*-$$P` \
50 /usr/bin/python$$P runtests.py $(RUNTESTSOPTS) \
51 --no-refnanny -v -v \
52 --exclude="(parallel|Debugger|annotate_html|numpy_test|subinterpreters_threading_stress_test)" \
53 --work-dir=build/work-dir 2>&1; \
54 then \
55 echo =============== $$P done ===============; \
56 else \
57 echo "=============== $$P done (FAILURES IGNORED) ==============="; \
58 fi; \
59 done
60 endif
61
62 override_dh_auto_test-indep:
63 # no tests
64
65 override_dh_strip:
66 dh_strip --dbgsym-migration='cython3-dbg (<< 0.29.36-1~)'
67
68 execute_after_dh_python3:
69 debian/generate-manpage cython "compile Cython code (.pyx) into C to build a Python extension" debian/cython3
70 debian/generate-manpage cygdb "run compiled Cython code under the GNU debugger" debian/cython3
71 debian/generate-manpage cythonize "compile Cython code (.pyx) into C to build a Python extension" debian/cython3
72 find debian/cython3 -name __pycache__ | xargs -r -- rm -rf
73
74 execute_after_dh_auto_clean:
75 rm -rf docs/build