| |
@@ -865,8 +865,8 @@
|
| |
Shebang lines to invoke Python *SHOULD* be `+#!%{python3} -%{py3_shebang_flags}+`
|
| |
and they *MAY* include extra flags.
|
| |
|
| |
- If the default flags from <<py3_shebang_flags,the `+%{py3_shebang_flags}+` macro>>
|
| |
- are not desirable,
|
| |
+ If (some of) the default flags from
|
| |
+ <<py3_shebang_flags,the `+%{py3_shebang_flags}+` macro>> are not desirable,
|
| |
packages *SHOULD* explicitly redefine the macro to remove them.
|
| |
|
| |
Using `+#!%{python3}+` (`+#!/usr/bin/python3+`)
|
| |
@@ -881,10 +881,19 @@
|
| |
or just placed in the current directory)
|
| |
don’t interfere with the RPM installed software.
|
| |
Sometimes, such content is desirable, such as with plugins.
|
| |
- Undefining <<py3_shebang_flags,the `+%{py3_shebang_flags}+` macro>>
|
| |
- or redefining it to a set of flags without `+s+`,
|
| |
+ Redefining <<py3_shebang_flags,the `+%{py3_shebang_flags}+` macro>>
|
| |
+ to a set of flags without `+s+`,
|
| |
rather than not using the macro at all,
|
| |
ensures that existing or future automation won’t add the flag.
|
| |
+ The default set of flags might be extended in the future,
|
| |
+ hence only explicitly removing the undesired flags is more future-proof than emptying the macro:
|
| |
+
|
| |
+ [source,spec]
|
| |
+ ----
|
| |
+ # Remove -s from Python shebang - ensure that extensions installed with pip
|
| |
+ # to user locations are seen and properly loaded
|
| |
+ %global py3_shebang_flags %(echo %py3_shebang_flags | sed s/s//)
|
| |
+ ----
|
| |
|
| |
The <<pyproject_install,`+%pyproject_install+` macro>>
|
| |
automatically changes all Python shebangs
|
| |