File install-usr-local.patch of Package python-pip

Index: pip-24.0/src/pip/_internal/locations/_sysconfig.py
===================================================================
--- pip-24.0.orig/src/pip/_internal/locations/_sysconfig.py
+++ pip-24.0/src/pip/_internal/locations/_sysconfig.py
@@ -160,6 +160,10 @@ def get_scheme(
     if prefix is not None and scheme_name == "osx_framework_library":
         scheme_name = "posix_prefix"
 
+    # pip installations by default to local
+    if prefix is None and scheme_name == "posix_prefix" and "RPM_BUILD_ROOT" not in os.environ:
+        prefix = f"{sys.prefix}/local"
+
     if home is not None:
         variables = {k: home for k in _HOME_KEYS}
     elif prefix is not None:
openSUSE Build Service is sponsored by