From 3ddc523acde262c738e093d8fdd9cb23793c24d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 9 Oct 2023 20:25:56 +0200 Subject: [PATCH] Always perform at least a basic import check in %check --- python-urllib3.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python-urllib3.spec b/python-urllib3.spec index 1b28ed5..39c7baa 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -138,8 +138,16 @@ sed -i -e 's/^import mock/from unittest import mock/' \ %pyproject_save_files urllib3 -%if %{with tests} %check +# urllib3.contrib.socks requires urllib3[socks] +# urllib3.contrib.ntlmpool is deprecated and requires ntlm +# urllib3.contrib.securetransport is macOS only +# urllib3.contrib.pyopenssl requires urllib3[secure] +%{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks} + -e urllib3.contrib.ntlmpool + -e urllib3.contrib.securetransport + -e urllib3.contrib.pyopenssl} +%if %{with tests} # Drop the dummyserver tests in koji. They fail there in real builds, but not # in scratch builds (weird). ignore="${ignore-} --ignore=test/with_dummyserver/"