| |
@@ -19,7 +19,8 @@
|
| |
|
| |
== Multiple Python Runtimes
|
| |
|
| |
- For backwards compatibility, `/usr/bin/python` is, if it is installed, a symbolic link to `/usr/bin/python2`.
|
| |
+ Since Fedora 31 `/usr/bin/python` is, if it is installed, a symbolic link to `/usr/bin/python3`.
|
| |
+ It was a symbolic link to `/usr/bin/python2` on previous releases.
|
| |
|
| |
Packages in Fedora MUST NOT use `/usr/bin/python`. Instead packages for Python 3 MUST use `/usr/bin/python3` (even if upstream supports both Python 2 and 3). As a result of that `/usr/bin/python` (as well as `/usr/bin/env python` and similar) MUST NOT be used in shebang lines or as a dependency of a package. As of Fedora 30, all uses of unversioned python executables in shebang lines will fail the build.
|
| |
These shebangs MUST be fixed. If it is necessary to disable the checks, please see the information in xref:index#_shebang_lines[Shebang lines].
|
| |
@@ -116,13 +117,14 @@
|
| |
|
| |
=== The %python_provide macro
|
| |
|
| |
- In order to make the switch from Python 2 to Python 3 automatic, all packages that provide `+python3-%{srcname}+` (for any `+%{srcname}+`) SHOULD use the `+%python_provide+` macro with the package name, for example:
|
| |
+ All packages that provide `+python3-%{srcname}+` (for any `+%{srcname}+`) SHOULD use the `+%python_provide+` macro with the package name, for example:
|
| |
|
| |
----
|
| |
%{?python_provide:%python_provide python3-%{srcname}}
|
| |
----
|
| |
|
| |
- This eases distribution-wide renaming of Python packages. (For example, in the future a virtual provide of `+python-%{srcname}+` might become appropriate for Python 3 libraries. In that case, `+%python_provide+` will be changed to add it.) Packages that do not include this macro would need to be adapted to such changes manually.
|
| |
+ In Fedora 31 and further, it adds a virtual provide of `+python-%{srcname}+` for Python 3 libraries.
|
| |
+ For previous releases, it used to add the virtual provide for Python 2 libraries.
|
| |
|
| |
== Automatic Provides with a standardized name
|
| |
|
| |
@@ -175,8 +177,8 @@
|
| |
|Notes
|
| |
|
| |
|`+%{__python}+`
|
| |
- |`+/usr/bin/python+`
|
| |
- |Prohibited (see note below).
|
| |
+ |`+/usr/bin/python+` (for backwards compatibility)
|
| |
+ |Don't use this macro without redefining it. Defining is changes the meaning of other "unversioned" Python macros such as `+%{python_sitelib}+`.
|
| |
|
| |
|`+%{__python3}+`
|
| |
|`+/usr/bin/python3+`
|
| |