Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 export PYBUILD_NAME=requests
4 export PYBUILD_TEST_PYTEST=1
5 export PYTHONWARNINGS=d
6 export PYBUILD_BEFORE_TEST=\
7 set -e; \
8 rm -rf {dir}/debian/certs.orig; \
9 cp -a {dir}/tests/certs {dir}/debian/certs.orig; \
10 for cert in expired mtls valid/server; do \
11 $(MAKE) -C "{dir}/tests/certs/$$cert" clean all; \
12 done
13 export PYBUILD_AFTER_TEST=\
14 set -e; \
15 rm -rf {dir}/tests/certs; \
16 mv {dir}/debian/certs.orig {dir}/tests/certs
17 TESTS_TO_EXCLUDE="not test_use_proxy_from_environment and \
18 not TestGetEnvironProxies and \
19 not test_mixed_case_scheme_acceptable and \
20 not test_HTTP_200_OK_GET_ALTERNATIVE and \
21 not test_unicode_get and \
22 not test_HTTP_302_ALLOW_REDIRECT_GET and \
23 not test_HTTP_307_ALLOW_REDIRECT_POST and \
24 not test_HTTP_307_ALLOW_REDIRECT_POST_WITH_SEEKABLE and \
25 not test_HTTP_302_TOO_MANY_REDIRECTS and \
26 not test_HTTP_302_TOO_MANY_REDIRECTS_WITH_PARAMS and \
27 not test_http_301_changes_post_to_get and \
28 not test_http_301_doesnt_change_head_to_get and \
29 not test_http_302_changes_post_to_get and \
30 not test_http_302_doesnt_change_head_to_get and \
31 not test_http_303_changes_post_to_get and \
32 not test_http_303_doesnt_change_head_to_get and \
33 not test_header_and_body_removal_on_redirect and \
34 not test_transfer_enc_removal_on_redirect and \
35 not test_fragment_maintained_on_redirect and \
36 not test_HTTP_200_OK_GET_WITH_PARAMS and \
37 not test_HTTP_200_OK_GET_WITH_MIXED_PARAMS and \
38 not test_set_cookie_on_301 and \
39 not test_cookie_sent_on_redirect and \
40 not test_cookie_removed_on_expire and \
41 not test_cookie_quote_wrapped and \
42 not test_cookie_persists_via_api and \
43 not test_request_cookie_overrides_session_cookie and \
44 not test_request_cookies_not_persisted and \
45 not test_generic_cookiejar_works and \
46 not test_param_cookiejar_works and \
47 not test_cookielib_cookiejar_on_redirect and \
48 not test_requests_in_history_are_not_overridden and \
49 not test_history_is_always_a_list and \
50 not test_user_agent_transfers and \
51 not test_HTTP_200_OK_HEAD and \
52 not test_HTTP_200_OK_PUT and \
53 not test_BASICAUTH_TUPLE_HTTP_200_OK_GET and \
54 not test_proxy_authorization_preserved_on_request and \
55 not test_basicauth_with_netrc and \
56 not test_DIGEST_HTTP_200_OK_GET and \
57 not test_DIGEST_AUTH_RETURNS_COOKIE and \
58 not test_DIGEST_AUTH_SETS_SESSION_COOKIES and \
59 not test_DIGEST_STREAM and \
60 not test_DIGESTAUTH_WRONG_HTTP_401_GET and \
61 not test_DIGESTAUTH_QUOTES_QOP_VALUE and \
62 not test_POSTBIN_GET_POST_FILES and \
63 not test_invalid_files_input and \
64 not test_POSTBIN_SEEKED_OBJECT_WITH_NO_ITER and \
65 not test_POSTBIN_GET_POST_FILES_WITH_DATA and \
66 not test_post_with_custom_mapping and \
67 not test_conflicting_post_params and \
68 not test_request_ok_set and \
69 not test_status_raising and \
70 not test_decompress_gzip and \
71 not test_unicode_header_name and \
72 not test_pyopenssl_redirect and \
73 not test_http_with_certificate and \
74 not test_certificate_failure and \
75 not test_urlencoded_get_query_multivalued_param and \
76 not test_different_encodings_dont_break_post and \
77 not test_unicode_multipart_post and \
78 not test_unicode_method_name and \
79 not test_unicode_method_name_with_request_object and \
80 not test_custom_content_type and \
81 not test_hook_receives_request_arguments and \
82 not test_prepared_request_hook and \
83 not test_prepared_from_session and \
84 not test_request_with_bytestring_host and \
85 not test_time_elapsed_blank and \
86 not test_request_and_response_are_pickleable and \
87 not test_prepared_request_is_pickleable and \
88 not test_prepared_request_with_file_is_pickleable and \
89 not test_prepared_request_with_hook_is_pickleable and \
90 not test_session_pickling and \
91 not test_fixes_1329 and \
92 not test_uppercase_scheme_redirect and \
93 not test_header_remove_is_case_insensitive and \
94 not test_params_are_merged_case_sensitive and \
95 not test_header_validation and \
96 not test_auth_is_stripped_on_http_downgrade and \
97 not test_auth_is_retained_for_redirect_on_host and \
98 not test_manual_redirect_with_partial_body_read and \
99 not test_redirect_with_wrong_gzipped_header and \
100 not test_requests_history_is_saved and \
101 not test_json_param_post_content_type_works and \
102 not test_response_iter_lines and \
103 not test_response_context_manager and \
104 not test_unconsumed_session_response_closes_connection and \
105 not test_response_json_when_content_is_None and \
106 not test_custom_redirect_mixin and \
107 not test_stream_timeout and \
108 not test_none_timeout and \
109 not test_read_timeout and \
110 not test_connect_timeout and \
111 not test_total_timeout_connect and \
112 not test_encoded_methods and \
113 not test_proxy_env_vars_override_default and \
114 not test_urllib3_retries and \
115 not test_redirecting_to_bad_url and \
116 not test_json_decode_compatibility and \
117 not test_set_environ and \
118 not test_json_decode_persists_doc_attr and \
119 not test_header_with_subclass_types and \
120 not test_urllib3_pool_connection_closed"
121 export PYBUILD_TEST_ARGS=tests -k ${TESTS_TO_EXCLUDE}
122
123 ifneq ($(PYBUILD_AUTOPKGTEST),1)
124 BUILD_DATE = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
125 SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"
126 endif
127
128 %:
129 dh $@ --buildsystem=pybuild
130
131 override_dh_installchangelogs:
132 dh_installchangelogs HISTORY.md
133
134 override_dh_sphinxdoc:
135 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
136 PYTHONPATH=src python3 -m sphinx $(SPHINXOPTS) -N -bhtml docs/ \
137 debian/python-requests-doc/usr/share/doc/python-requests-doc/html/
138
139 dh_sphinxdoc
140 endif