Python: Add -P to default shebangs
Summary
The -P
flag will be added to the Python shebang macros (%{py3_shbang_opts}
, %{py3_shbang_opts_nodash}
, %{py3_shebang_flags}
, %{py_shbang_opts}
, %{py_shbang_opts_nodash}
, %{py_shebang_flags}
). Packages that adhere to those macros will change their Python shbanegs from #! /usr/bin/python3 -s
to #! /usr/bin/python3 -sP
and as a result, will no longer have the directory of the script (such as /usr/bin
) in sys.path
. An opt-out mechanism exists.
Owner
- Name: Miro Hrončok, Victor Stinner
- Email: python-maint@redhat.com
Current status
- Targeted release: Fedora Linux 37
- Last updated: 2022-05-10
- FESCo issue: <will be assigned by the Wrangler>
- Tracker bug: <will be assigned by the Wrangler>
- Release notes tracker: <will be assigned by the Wrangler>
Detailed Description
Feedback
Benefit to Fedora
Scope
- Proposal owners:
- Other developers:
- Release engineering: #Releng issue number
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with Objectives:
Upgrade/compatibility impact
How To Test
User Experience
Dependencies
Contingency Plan
- Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
- Contingency deadline: N/A (not a System Wide Change)
- Blocks release? N/A (not a System Wide Change), Yes/No
Documentation
N/A (not a System Wide Change)