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/"