here's a project underway in Fedora 12 to finally resolve the issues with Red Hat including #!/usr/bin/env python in our python executables: https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython There's also a Fedora bug opened on this, and comments in there state that this is a big priority for RHEL6: https://bugzilla.redhat.com/show_bug.cgi?id=518994 For RHEL5, we've been instructed by Product Management to open bugs on a package-by-package basis to address the problem. In this case, python-docs in RHEL5 has at least one instance of a python script containing #!/usr/bin/env python"
Not entirely true. python-docs is a documentation package full of HTML files. Although some documents do use #!/usr/bin/env python in examples of python code and there's also a few .txt files that contain python code, there's no python executable in this package that would call it. Should the documents & examples be fixed too?
Event posted on 09-08-2009 09:02am EDT by kbaxley For the sake of consistency, please go ahead and fix them, but this is not a high priority item. There may be a case where a customer will use one of those examples as a template or something like that and it could end up generating an unwanted surprise. This event sent from IssueTracker by kbaxley issue 339216
Makes sense. Thanks for the clarification.
This can be done fasttrack
(In reply to comment #2) > Event posted on 09-08-2009 09:02am EDT by kbaxley > > For the sake of consistency, please go ahead and fix them, but this is not > a high priority item. > > There may be a case where a customer will use one of those examples as a > template or something like that and it could end up generating an unwanted > surprise. I was deliberately special-casing "system executables" when I wrote https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython since they're intended to be run with the system version of python. Upstream's guidance on this is that python developers should use #!/usr/bin/env python as the shebang: http://docs.python.org/tutorial/interpreter.html#executable-python-scripts since this allows you to write scripts that work on a locally-built python environment by setting your PATH. So for the case of RPM packaging, it's the right thing to do, but for other cases it might not be, and changing the documentation in the manner of comment #2 could be misleading. Note that the /tutorial/interpreter.html page above is one of the files we ship within the python-docs package. So perhaps we could update that with downstream-specific guidance?
RHEL-5.10 (the next RHEL-5 minor release) is going to be the first production phase 2 [1] release of RHEL-5. Since phase 2 we'll be addressing only security and critical issues. [1] https://access.redhat.com/support/policy/updates/errata/