File: rules

package info (click to toggle)
python-aiohttp 3.11.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 16,156 kB
  • sloc: python: 51,898; ansic: 20,843; makefile: 395; javascript: 31; sh: 3
file content (40 lines) | stat: -rwxr-xr-x 1,133 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
#!/usr/bin/make -f

export PYBUILD_NAME = aiohttp
# enable pytest also here to make backports easier
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS={dir}/tests
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Work around https://bugs.debian.org/1051837
egg_info := aiohttp.egg-info
egg_info_safe := debian/aiohttp.egg-info.safe
define save-egg-info =
if [ ! -d $(egg_info_safe) ]; then cp -a $(egg_info) $(egg_info_safe); fi
endef
define restore-egg-info =
if [ -d $(egg_info_safe) ]; then rm -rf $(egg_info); cp -a $(egg_info_safe) $(egg_info); fi
endef

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

override_dh_auto_build:
	$(save-egg-info)
	# Ignore missing references.
	${MAKE} -C docs html SPHINXOPTS=
	dh_auto_build

override_dh_auto_clean:
	rm -rf .cache
	$(save-egg-info)
	dh_auto_clean
	$(restore-egg-info)

override_dh_strip:
	dh_strip --dbgsym-migration='python3-aiohttp-dbg (<< 3.7.4-2~)'

override_dh_auto_test:
	# disable tests for now:
	# https://bugs.python.org/issue28634 needs to be fixed in Debian
	# and tests patched to not access internet during build (see https://bugs.debian.org/830567)