[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Program shebang line with specific ‘/usr/bin/pythonX.Y’ interpreter (was: Bug#635476: current packaging work for Coverage)




Ben Finney <ben+debian@benfinney.id.au> wrote:
>Dmitry Shachnev <mitya57@gmail.com> writes:
>
>> In your particular case, python3-coverage depends on 'python3 (<<
>> 3.4), python3 (>= 3.3)', so when it is installed /usr/bin/python3
>will
>> be always a link to python3.3, so the shebang doesn't matter here.
>But
>> in general, I recommend people to use non-versioned shebangs in their
>> packages.
>
>For dependencies, the ‘debian/control’ has:
>
>=====
>…
>Package: python-coverage
>Depends:
>    ${python:Depends},
>…
>Package: python3-coverage
>Depends:
>    …
>    ${python3:Depends},
>…
>=====
>
>The dependencies in the resulting binary packages are created by the
>Debhelper tools for Python.
>
>The shebang is created by the Distribute tools that install the program
>for the ‘entry_points’ option in ‘setup.py’.
>
>So that's why the binary package is matching the shebang line to the
>Python dependency in each binary package.
>
>
>This is conforming with the current Python policy §1.4.1: if the
>program
>isn't designed to work with the default Python (currently Python 2.7),
>it must specify ‘/usr/bin/pythonX.Y’ as the interpreter name.
>
>I don't know the rationale for that dichotomy – only ‘/usr/bin/python’
>or ‘/usr/bin/pythonX.Y’ – but I also don't know why you recommend
>against it. What is your reason for wanting that policy changed?

More updated than changed. Python3 didn't exist when that was written. We've updated the policy in many respects,  but this is a spot I missed. 

The reason is that it simplifies moving to a new default python/python3 version and removing the old one. 

Scott K


Reply to: