Hey Miro, On Thu, Jun 30, 2022, at 12:12 PM, Miro Hrončok wrote: > In order to remove certain flags, packagers have the following tool: > > # Unset -s on 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//) > > Or: > > # Don't add -P to Python shebang > # This package only works when /usr/bin is in sys.path > %global py3_shebang_flags %(echo %py3_shebang_flags | sed s/P//) > > > > In the implementation PR, Maxwell suggested a different approach: > https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/141#comment-109228 > > Basically, packagers would do something like this: > > > # Unset -s on python shebang - ensure that extensions installed with pip > # to user locations are seen and properly loaded > %global _python3_shebang_nousersite %{nil} > > Or: > > # Don't add -P to Python shebang > # This package only works when /usr/bin is in sys.path > %global _python3_shebang_safepath %{nil} > > The macro names are not set in stone, it could even be %_python3_shebang_s and > %_python3_shebang_P. > > The previous sed-based way would still work and packages that already use it > would not need to change immediately. > > Do you consider the macro based approach better (worth it)? And if so, do you > prefer actual flag letters in the macro names, or the verbose names? I'd much prefer the explicit named macro approach to the sed approach, I'd also prefer the flag letters in this case. It might be a bit contrary to have shorter macro names but the short names force me to look up what the options do for Python instead of never looking int to them because I think I know what 'nousersite' or 'safepath' means. This likely comes down to personal taste so I'm interested to see what others think as well. Regards, Simon _______________________________________________ packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure