python-singlespec - how to deal with scripts
Hi, I need some advise on how to deal with scrpits that come with a python package and are inteded to end up in %{_bindir} The package in question - python-relatorio 0.10.0 - is build for python2 and 3 1) How to deal with the shebang in the script, which is currently /usr/bin/env python ? 2) how to call the %files section properly? %{_bindir}/relatorio-render causes the rpm check to fail as it is packed three times (for python36, 38 and 39) %python_for_executables %{_bindir}/relatorio-render throws an error as well...... Hints welcome.....thank you!
Hi Axel, Am 13.09.21 um 09:40 schrieb Axel Braun:
Hi,
I need some advise on how to deal with scrpits that come with a python package and are inteded to end up in %{_bindir}
https://en.opensuse.org/openSUSE:Packaging_Python#Executables should answer all your questions.
The package in question - python-relatorio 0.10.0 - is build for python2 and 3
(For Leap. (A))
1) How to deal with the shebang in the script, which is currently /usr/bin/env python ?
`%python_clone -a %{buildroot}%{_bindir}/relatorio-render ` sets the correct shebang for all flavors.
2) how to call the %files section properly?
%python_alternative %{_bindir}/relatorio-render
%{_bindir}/relatorio-render causes the rpm check to fail as it is packed three times (for python36, 38 and 39)
For TW. For Leap, this is python2 and python3 (see (A) above). If you don't want all the flavors, don't use %python_subpackages, or use %skip_pythonXY, or redefine %pythons. Ben
Hello Ben, Am Montag, 13. September 2021, 09:58:58 CEST schrieb Ben Greiner:
Am 13.09.21 um 09:40 schrieb Axel Braun:
I need some advise on how to deal with scrpits that come with a python package and are inteded to end up in %{_bindir}
https://en.opensuse.org/openSUSE:Packaging_Python#Executables should answer all your questions.
I read it, but obviously I did not unterstand the way it should work. Let me see if I can rephrase it..... [...]
For TW. For Leap, this is python2 and python3 (see (A) above). If you don't want all the flavors, don't use %python_subpackages, or use %skip_pythonXY, or redefine %pythons.
Not sure if anyone needs it in all flavours - from my end the default python3 would be sufficient.... Thanks Axel
participants (2)
-
Axel Braun
-
Ben Greiner