[New-bugs-announce] [issue27004] Handle script shbang options
report at bugs.python.org
Wed May 11 15:39:10 EDT 2016
New submission from Orion Poplawski:
Fedora would like to enforce that python scripts installed into /usr/bin use the "-s" option. We have tried to enforce this by doing:
python setup.py build --executable '/usr/bin/python2 -s'
However, as reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1335203
this breaks scripts that already have options in them as the options are tacked onto the end, e.g.:
#!/usr/bin/python2 -s -E
Which linux doesn't handle.
It seems we have a couple options:
- Replace the entire shbang line with the argument to --executable
- Try to merge options into a single one (-sE)
- Have a separate option, say --executable-args to specify the options. Although the question still remains as to whether or not to replace the existing option or append.
nosy: dstufft, eric.araujo, opoplawski
title: Handle script shbang options
versions: Python 2.7, Python 3.6
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce