[Python-Dev] shebang policy, and pip
Christian Tismer
tismer at stackless.com
Wed Oct 8 12:16:42 CEST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Howdy,
this question is a bit about general policy which is not yet
covered in the python recommendations:
I see projects which do check-ins like "get rid of shebang lines"
and they remove those lines from non-script sources.
It is not always clear to me what to do, so I tend to leave those
lines in per default, in order not to waste time thinking about it,
but well, today I was confronted with that.
Digging a bit deeper shows the following:
python docs:
No mention of shebang, but for Windows.
https://docs.python.org/3/search.html?q=shebang&check_keywords=yes&area=default
https://docs.python.org/3/using/windows.html?highlight=shebang
Google's python style guide also says when a shebang is needed, but
does not forbid it.
Pep 394 explains how to use shebang, but still nothing about not using it.
http://legacy.python.org/dev/peps/pep-0394/
So is there anything officially preferred, and should that go into pep 8?
Special case with pip
- ------------------
I was looking through my installed packages and wondered quite
much about pip:
Pip has a shebang in the __init__ file, but no shebang in the
__main__ file.
I guess this is wrong and should be in the executable file,
which is __main__ .
cheers - Chris
- --
Christian Tismer :^) tismer at stackless.com
Software Consulting : http://www.stackless.com/
Karl-Liebknecht-Str. 121 : http://www.pydica.net/
14482 Potsdam : GPG key -> 0xFB7BEE0E
phone +49 173 24 18 776 fax +49 (30) 700143-0023
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - https://gpgtools.org
iQEcBAEBCgAGBQJUNQ8FAAoJEOcwEVD7e+4Of5MH/13YyXRzPVXfsLDbfe/CRkFF
ORVAPkRB90OaEmbLTvBXPhFlAgEwcQnpdO+tmqigvlORd0cSXQKIxoPOiqq601gs
XV56aREqBCT26XMaKTuoPdu4DaW+TkwyWSn70eq4U/P7YjF3ZlNt8IkA5mteM7an
ycRYMnknEaIvP/xpZdGp+v4pq5LA42LWAY1awnBk4eMP04uDowSmcuLELpZrmSCr
iMkw6wPUdZxGVtQNwSses0mh3DuaQuwrubhHMnLoOKn/lqRjckG2Ii2BIHlWy9lQ
5X3y8IdWPh7awio8xaibNqsWaP+0DT97g2H7QZf8YIG7/DkHL/iacSr7NAPBXXQ=
=IODc
-----END PGP SIGNATURE-----
More information about the Python-Dev
mailing list