Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export PYBUILD_NAME=urllib3
4 export PYTHONWARNINGS=d
5 # Use patched hypercorn; see https://github.com/urllib3/urllib3/issues/3334
6 export PYTHONPATH=$(CURDIR)/debian/vendor
7 export PYBUILD_TEST_PYTEST=1
8 export PYBUILD_TEST_ARGS=-m 'not requires_network'
9 # This test fails if urllib3.connection.RECENT_DATE hasn't been updated
10 # recently enough, which would be a problem for stable releases.
11 PYBUILD_TEST_ARGS += --deselect test/test_connection.py::TestConnection::test_recent_date
12 # These tests fail due to recent changes in Python:
13 # https://github.com/urllib3/urllib3/issues/5268
14 PYBUILD_TEST_ARGS += \
15 --deselect test/test_response.py::TestResponse::test_chunked_decoding_gzip_swallow_garbage \
16 --deselect 'test/test_response.py::TestResponse::test_read_chunked_with_trailing_data_does_not_hang[gzip]'
17 export LC_ALL=C.UTF-8
18 export CI=1 # Use longer timeouts, see https://github.com/urllib3/urllib3/issues/3164
19 # pybuild exports http_proxy=http://127.0.0.1:9/ by default, but that breaks
20 # some tests here and the package doesn't seem to try to connect to the
21 # internet without it.
22 export http_proxy=
23
24 %:
25 dh $@ --buildsystem=pybuild
26
27 override_dh_clean:
28 dh_clean
29 find . -type d -name .pytest_cache -exec rm -rf {} +
30
31 override_dh_auto_test:
32 PYTHONPATH=$(CURDIR)/debian/vendor dh_auto_test
33
34 override_dh_installchangelogs:
35 dh_installchangelogs CHANGES.rst