[Distutils] Shebang lines, /usr/bin/python, and PEP394

Toshio Kuratomi a.badger at gmail.com
Thu Jul 25 18:04:46 CEST 2013


Over on python-dev we're talking about Linux Distributions switching from
python2 to python3, what steps they need to take and in what order.  One of
the things that's come up [1]_ is that a very early step in the process is making
sure that shebang lines use /usr/bin/python2 or /usr/bin/python3 as noted in
PEP394 [2]_.  Faced with the prospect of patching a whole bunch of scripts
in the distribution, I'm wondering what distutils, distlib, setuptools, etc
do with shebang lines.
* Do they rewrite shebang lines?
* If so, do they use #!/usr/bin/python2 or do they use #!/usr/bin/python ?
* If the latter, is there hope that we could change that to match with PEP-394's
  recommendations?  (setuptools seems to be moving relatively quickly these
  days so that seems reasonably easy.... distutils is tied to the release
  schedule of core python-2.7.x although if the change is accepted into the
  CPython tree we might consider backporting it to the current distribution
  package early.

.. [1]_: http://mail.python.org/pipermail/python-dev/2013-July/127565.html
.. [2]_: http://www.python.org/dev/peps/pep-0394/#recommendation

Thanks,
Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130725/7a46ad85/attachment.pgp>


More information about the Distutils-SIG mailing list