#!/usr/bin/make -f # -*- makefile -*- #export DH_VERBOSE = 1 include /usr/share/dpkg/pkg-info.mk BUILD_DATE = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") SPHINXOPTS := -E -N -D html_last_updated_fmt="$(BUILD_DATE)" # All these tests are needed to ignore too due different behavior of pytest >=7.0. # Variable can be removed once https://github.com/pytest-dev/pytest/issues/9621 # is fixed. PYBUILD_TEST_ARGS_PYTEST7_IGNORE=\ and not test_auto_session_tracking_with_aggregates \ and not test_keyboard_interrupt_is_captured \ and not test_transaction_no_error \ and not test_transaction_with \ and not test_start_span_to_start_transaction \ and not test_tracestate_computation \ and not test_doesnt_add_new_tracestate_to_transaction_when_none_given \ and not test_adds_tracestate_to_transaction_when_to_traceparent_called \ and not test_adds_tracestate_to_transaction_when_getting_trace_context \ and not test_tracestate_is_immutable_once_set \ and not test_to_traceparent \ and not test_to_tracestate \ and not test_sentrytrace_extraction \ and not test_tracestate_extraction \ and not test_iter_headers \ and not test_tracestate_reinflation \ and not test_continue_from_headers \ and not test_memory_usage \ and not test_transactions_do_not_go_through_before_send \ and not test_start_span_after_finish \ and not test_span_trimming \ and not test_transaction_naming \ and not test_start_transaction \ and not test_finds_transaction_on_scope \ and not test_finds_transaction_when_descendent_span_is_on_scope \ and not test_finds_orphan_span_on_scope \ and not test_finds_non_orphan_span_on_scope \ and not test_start_transaction \ and not test_circular_references \ and not test_has_tracestate_enabled \ and not test_default_release \ export PYBUILD_NAME=sentry_sdk # Disable tests failing mostly because of internet access (httpbin.org) export PYBUILD_TEST_ARGS=-k '\ not test_basic and \ not test_403_not_captured and \ not test_half_initialized and \ not test_httplib_misuse and \ not test_crumb_capture and \ not test_errors and \ not test_proxy and \ not test_transport_works and \ not test_transport_infinite_loop and \ not test_simple_rate_limits and \ not test_data_category_limits and \ not test_complex_limits_without_data_category and \ not test_handled_exception and \ not test_unhandled_exception and \ not test_timeout_error and \ not test_performance_no_error and \ not test_performance_error and \ not test_traces_sampler_gets_correct_values_in_sampling_context and \ not test_session_mode_defaults_to_request_mode_in_wsgi_handler and \ not test_socks_proxy and \ not test_omit_url_data_if_parsing_fails and \ not test_omit_url_data_if_parsing_fails and \ not test_error_has_new_trace_context_performance_disabled and \ not test_error_has_new_trace_context_performance_enabled and \ not test_error_has_existing_trace_context_performance_enabled and \ not test_error_has_existing_trace_context_performance_disabled and \ not test_getaddrinfo_trace and \ not test_create_connection_trace \ $(PYBUILD_TEST_ARGS_PYTEST7_IGNORE) \ ' # Remove directory created while running tests on build export PYBUILD_AFTER_INSTALL_python3=rm -rf {destdir}/usr/lib/python3*/dist-packages/.hypothesis %: dh $@ --buildsystem=pybuild override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. python3 -m sphinx -b html $(SPHINXOPTS) docs/ $(CURDIR)/debian/python-sentry-sdk-doc/usr/share/doc/python-sentry-sdk-doc/html rm $(CURDIR)/debian/python-sentry-sdk-doc/usr/share/doc/python-sentry-sdk-doc/html/.nojekyll dh_sphinxdoc endif override_dh_auto_clean: rm -rf docs/.build dh_auto_clean