Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 DEB_BUILD_OPTION_PARALLEL = 1
4 include /usr/share/dpkg/buildopts.mk
5
6 # PyPy doesn't harden well, and handles opt and debug itself
7 BUILDFLAGS_ENV := DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotector,-fortify
8 BUILDFLAGS_ENV += DEB_CFLAGS_MAINT_STRIP="-O0 -O1 -O2 -O3 -Os -Ofast -g"
9 export CFLAGS = $(shell $(BUILDFLAGS_ENV) dpkg-buildflags --get CFLAGS)
10 export LDFLAGS = $(shell $(BUILDFLAGS_ENV) dpkg-buildflags --get LDFLAGS)
11
12 %:
13 dh $@ --with sphinxdoc
14
15 override_dh_auto_configure:
16 # This rule left intentionally empty
17
18 override_dh_auto_build-arch: pypy/goal/pypy3.11-c
19 $(MAKE) -C pypy/doc man BUILDDIR=$(CURDIR)/build-docs
20
21 # Build cffi modules
22 pypy/goal/pypy3.11-c lib_pypy/pypy_tools/build_cffi_imports.py
23 debian/scripts/verify-all-headers-present.py
24 debian/scripts/gen-sysconfigdata.sh
25
26 override_dh_auto_build-indep:
27 $(MAKE) -C pypy/doc html BUILDDIR=$(CURDIR)/build-docs
28
29 cpython27/python:
30 dh_autoreconf -D cpython27
31 cd cpython27 && ./configure --with-system-ffi --with-system-expat --enable-unicode=ucs4
32 cd cpython27 && $(MAKE) -j$(DEB_BUILD_OPTION_PARALLEL) CFLAGS="$(CFLAGS) -std=c17"
33
34 pypy/goal/pypy3.11-c: cpython27/python
35 debian/scripts/translate.sh --python $(CURDIR)/cpython27/python
36
37 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
38 override_dh_auto_test-arch: export TMPDIR = $(CURDIR)/build-tests-tmp
39 override_dh_auto_test-arch: export HOME = $(TMPDIR)
40 override_dh_auto_test-arch:
41 rm -rf $(TMPDIR) build-tests
42 mkdir $(TMPDIR) build-tests
43 ln -sf pycparser223/pycparser/ pycparser
44 # Test failures currently ignored
45 PYTHONPATH=. cpython27/python -u \
46 testrunner/runner.py \
47 --logfile=build-tests/pytest-A.log \
48 --config=pypy/pytest-A.cfg \
49 --root=pypy || true
50 cpython27/python -u pypy/test_all.py \
51 --pypy=pypy/goal/pypy3.11-c \
52 --resultlog=build-tests/pypy-c.log \
53 pypy/module/pypyjit/test_pypy_c || true
54 rm pycparser
55 TERM=$${TERM:-dumb} cpython27/python -u \
56 pypy/test_all.py \
57 --pypy=pypy/goal/pypy3.11-c \
58 --resultlog=build-tests/lib-python.log \
59 lib-python || true
60 endif
61
62 override_dh_auto_install:
63 debian/scripts/gen-backend-versions.py
64
65 override_dh_auto_clean:
66 sed 's/^@/#/' cpython27/Makefile.pre.in | $(MAKE) -C cpython27 -f - srcdir=. distclean
67 dh_auto_clean
68
69 override_dh_fixperms-arch:
70 debian/scripts/cleanup-lib.sh pypy3-lib
71 find debian/pypy3-tk \( -name '*.pyc' -o -name '__pycache__' \) -delete
72 # Fix interpreters
73 find debian/pypy3-tk \
74 -name '*.py' -print0 \
75 | xargs -0 sed -i -e '1s|^#!.*python.*|#!/usr/bin/pypy3|'
76 dh_fixperms -a
77
78 override_dh_fixperms-indep:
79 debian/scripts/cleanup-lib.sh pypy3-lib-testsuite
80 dh_fixperms -i
81
82 override_dh_sphinxdoc-arch:
83 # dh_sphinxdoc doesn't fail silently when there are no docs
84
85 override_dh_compress:
86 dh_compress -X.inv -X.txt
87
88 override_dh_shlibdeps-arch:
89 dh_shlibdeps --package=pypy3 -- -dPre-Depends
90 dh_shlibdeps --arch --remaining-packages
91
92 override_dh_installdeb:
93 debian/scripts/maintscript.sh pypy3.preinst
94 debian/scripts/maintscript.sh pypy3.postinst
95 debian/scripts/maintscript.sh pypy3.prerm
96 debian/scripts/maintscript.sh pypy3-lib.prerm
97 dh_installdeb