File disable-ssl-context-in-buildenv.patch of Package python-pip

Index: pip-26.0/src/pip/_internal/cli/index_command.py
===================================================================
--- pip-26.0.orig/src/pip/_internal/cli/index_command.py
+++ pip-26.0/src/pip/_internal/cli/index_command.py
@@ -49,7 +49,11 @@ def _create_truststore_ssl_context() ->
         return None
 
     ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
-    ctx.load_verify_locations(certifi.where())
+    try:
+        ctx.load_verify_locations(certifi.where())
+    except (FileNotFoundError, ssl.SSLError):
+        logger.warning("Disabling truststore because of missing certificates")
+        return None
     return ctx
 
 
openSUSE Build Service is sponsored by