diff --git a/00251-change-user-install-location.patch b/00251-change-user-install-location.patch index b4068f7..dd7a07a 100644 --- a/00251-change-user-install-location.patch +++ b/00251-change-user-install-location.patch @@ -51,7 +51,7 @@ index aed254ad50..568dbdb945 100644 if os.path.isdir(sitedir): addsitedir(sitedir, known_paths) diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py -index 517b13acaf..f85ab25d27 100644 +index 517b13acaf..928d1a0541 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -104,6 +104,11 @@ @@ -119,7 +119,7 @@ index 517b13acaf..f85ab25d27 100644 + # we only change the defaults here, so explicit --prefix will take precedence + # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe + if (scheme == 'posix_prefix' and -+ get_config_vars('prefix')[0] == '/usr' and ++ sys.prefix == '/usr' and + 'RPM_BUILD_ROOT' not in os.environ): + _extend_dict(vars, _config_vars_local()) + else: diff --git a/python3.12.spec b/python3.12.spec index c8f6fd8..d3fa09e 100644 --- a/python3.12.spec +++ b/python3.12.spec @@ -336,7 +336,7 @@ Source11: idle3.appdata.xml # (Patches taken from github.com/fedora-python/cpython) -# 00251 # 7f0caf37f83f1e591194e93fd0f8cefede49bba6 +# 00251 # 6a4ec74157aa01f1ada9f29f30a371cd9e5369e8 # Change user install location # # Set values of base and platbase in sysconfig from /usr