Bug 2133849

Summary: Downstream-only patch in Python 3: #251 Change user install location
Product: [Fedora] Fedora Reporter: Tomas Orsava <torsava>
Component: python3.14Assignee: Miro HronĨok <mhroncok>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: low    
Version: rawhideCC: cstratak, ksurma, mhroncok, pviktori, python-maint, python-packagers-sig, thrnciar, torsava, vstinner
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Orsava 2022-10-11 15:08:02 UTC
From python3.11.spec:

# 00251 # af0f1ba72e01cb93371ff21fb7ca889daa43fa7a
# Change user install location
#
# Set values of base and platbase in sysconfig from /usr
# to /usr/local when RPM build is not detected
# to make pip and similar tools install into separate location.
#
# Set values of prefix and exec_prefix in distutils install command
# to /usr/local if executable is /usr/bin/python* and RPM build
# is not detected to make distutils and pypa/distutils install into separate location.
#
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
# Downstream only.
#
# We've tried to rework in Fedora 36/Python 3.10 to follow https://bugs.python.org/issue43976
# but we have identified serious problems with that approach,
# see https://bugzilla.redhat.com/2026979 or https://bugzilla.redhat.com/2097183
#
# pypa/distutils integration: https://github.com/pypa/distutils/pull/70
Patch251: 00251-change-user-install-location.patch

Comment 1 Tomas Orsava 2022-10-11 15:10:43 UTC
Previously tracked in BZ#1287556.

Comment 2 Petr Viktorin (pviktori) 2022-10-12 12:25:20 UTC
The next step is aligning with PEP 668: https://peps.python.org/pep-0668/
Change proposal draft: https://fedoraproject.org/wiki/Changes/PythonMarkExternallyManaged
But there are some issues: https://discuss.python.org/t/pep-668-marking-python-base-environments-as-externally-managed/10302/46