Hi Bruno, Le jeudi 22 mars 2018 à 02:36:13, Bruno Friedmann a écrit :
On jeudi, 22 mars 2018 10.39:39 h CET Sébastien 'sogal' Poher wrote:
Hi everyone,
I am packaging pyrenamer [0] in order to submit it to Factory. As it is, I got this warning [1] because of the 'shebang' calling '/usr/bin/env python' instead of '/usr/bin/python' (which should be 'python2'). I have fixed it by adding the following:
sed -i 's|/usr/bin/env\ python|/usr/bin/python2|1' %{buildroot}/%{_bindir}/%{name}
in %install section.
Is it a good way to do it or is there a more recommended way ?
Thank you
[0] https://build.opensuse.org/package/show/utilities/pyrenamer
[1] full warning is: pyrenamer.noarch: E: env-script-interpreter (Badness: 9) /usr/bin/pyrenamer /usr/bin/env python This script uses 'env' as an interpreter. For the rpm runtime dependency detection to work, the shebang #!/usr/bin/env python needs to be patched into #!/usr/bin/python otherwise the package dependency generator merely adds a dependency on /usr/bin/env rather than the actual interpreter /usr/bin/python. Alternatively, if the file should not be executed, then ensure that it is not marked as executable or don't install it in a path that is reserved for executables.
I wonder why you have it in utilities when it's available in pypi I would say it should goes to devel:languages:python repository even if it's an application.
Using pypi you will find the 1.1 version certainly better than the older 0.6.0 https://pypi.python.org/pypi/pyrenamer
Bonus there's no env line to fix in it. And you will be able to build it for python2 and python3
Actually we are no speaking of the same thing. I am not trying to package py-renamer (the py module you are thinking of) but Pyrenamer [0] the Python2 + gtk2 graphical mass renaming app :) That is also the reason why it fits in utilities. [0] https://launchpad.net/pyrenamer -- Sébastien 'sogal' Poher -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org