Should python programs which use '#!/usr/bin/env python3' be patched to call python directly? Is there a use case for packaged programs _not_ using the system python?
If some virtual env wrappers are being used, /usr/bin/env python3 may not return /usr/bin/python3.
"MM" == Matthew Miller mattdm@fedoraproject.org writes:
MM> Should python programs which use '#!/usr/bin/env python3' be patched MM> to call python directly?
Absolutely.
MM> Is there a use case for packaged programs _not_ using the system MM> python?
If they want to break? I can stick whatever I like in ~/bin (and often have). That shouldn't change the functionality of system components.
I suppose this could be made clearer in the guidelines; It's kind of implicit in the "Multiple Python Runtimes" section but should probably be stated explicitly.
- J<
On Thu, Sep 24, 2015 at 10:17:14AM -0500, Jason L Tibbitts III wrote:
I suppose this could be made clearer in the guidelines; It's kind of implicit in the "Multiple Python Runtimes" section but should probably be stated explicitly.
Yes please. I think [/usr]/bin/env is a common enough pattern that if we want people to not use it (and I agree that it's not right for stuff packaged to be run with our own main python package), we should spell it out.
On Thu, Sep 24, 2015 at 6:20 PM, Matthew Miller mattdm@fedoraproject.org wrote:
On Thu, Sep 24, 2015 at 10:17:14AM -0500, Jason L Tibbitts III wrote:
I suppose this could be made clearer in the guidelines; It's kind of implicit in the "Multiple Python Runtimes" section but should probably be stated explicitly.
Yes please. I think [/usr]/bin/env is a common enough pattern that if we want people to not use it (and I agree that it's not right for stuff packaged to be run with our own main python package), we should spell it out.
Check added in rpmlint: https://github.com/rpm-software-management/rpmlint/commit/3c42240d8e12bd9a59...
Le 26/09/2015 09:14, Ville Skyttä a écrit :
Check added in rpmlint: https://github.com/rpm-software-management/rpmlint/commit/3c42240d8e12bd9a59...
IIUC, this change will detect "/usr/bin/env" and report it as wrong whatever the language is.
The initial discussion was about python. I can understand the need in this case.
For other language, it can make sense to use /usr/bin/env.
Especially, with PHP where compatibility is usually very good, and where upstream test against various versions (travis)
And this allow to run the packaged command against SCL installed PHP runtime. A good example is "PHPUnit" which works perfectly with PHP 5.4, 5.5, 5.6 and even 7.0.
I think, following upstream is better in this case, else you loose most interest of providing such app. in our repository, and I have started to "restore" upstream shebang in some of my packages.
Yes... I know,.. SCL are RHEL only :(
Remi.
-- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
On Sat, Sep 26, 2015 at 3:42 PM, Remi Collet Fedora@famillecollet.com wrote:
Le 26/09/2015 09:14, Ville Skyttä a écrit :
Check added in rpmlint: https://github.com/rpm-software-management/rpmlint/commit/3c42240d8e12bd9a59...
IIUC, this change will detect "/usr/bin/env" and report it as wrong whatever the language is.
The initial discussion was about python. I can understand the need in this case.
For other language, it can make sense to use /usr/bin/env.
Especially, with PHP where compatibility is usually very good, and where upstream test against various versions (travis)
And this allow to run the packaged command against SCL installed PHP runtime. A good example is "PHPUnit" which works perfectly with PHP 5.4, 5.5, 5.6 and even 7.0.
I think, following upstream is better in this case, else you loose most interest of providing such app. in our repository, and I have started to "restore" upstream shebang in some of my packages.
Yes... I know,.. SCL are RHEL only :(
So here comes the question, should fedora-review enable env checking as default?
Le 26/09/2015 09:51, Christopher Meng a écrit :
So here comes the question, should fedora-review enable env checking as default?
It can be useful, but as a "warning"
So it can be fixed (e.g. python case) And to check that the default interpreter is required (e.g. php-cli)
But, as there is no Guidelines about this (only a very old draft, never approved), this will probably requires a "clear" explanation message.
Remi.
On Sat, Sep 26, 2015 at 10:42 AM, Remi Collet Fedora@famillecollet.com wrote:
Le 26/09/2015 09:14, Ville Skyttä a écrit :
Check added in rpmlint: https://github.com/rpm-software-management/rpmlint/commit/3c42240d8e12bd9a59...
IIUC, this change will detect "/usr/bin/env" and report it as wrong whatever the language is.
That's right and intentional, and matches what I think about the issue. A followup commit however adds interpreter arguments to all errors/warnings where interpreter is output in order to make it possible to filter out whatever of these one considers unwanted.
packaging@lists.fedoraproject.org