Python packaging bug? [Attn: Jason Tishler]
Fri Jan 23 16:47:00 GMT 2004
On Fri, Jan 23, 2004 at 09:27:53AM -0500, Igor Pechtchanski wrote:
> I'm not sure if this is a bug (hence the question mark in the subject),
> but the two python scripts in /usr/bin ("idle" and "pydoc") refer to
> /usr/bin/python.exe in their #! line. Is there a particular reason why
> they don't just use /usr/bin/python? I know it makes no difference in
> Cygwin, but it might be confusing.
The above is by design:
def copy_scripts (self):
"""Copy each script listed in 'self.scripts'; if it's marked as
a Python script in the Unix way (first line matches
'first_line_re', ie. starts with "\#!" and contains "python"),
then adjust the first line to refer to the current Python
interpreter as we copy.
log.info("copying and adjusting %s -> %s", script,
"python" + sysconfig.get_config_var("EXE")),
Note the reference to EXE above.
> Also, I looked at the Python sources, and the sample scripts there
> contain '#! /usr/bin/env python' (not /usr/bin/python.exe). I'm
> guessing that this somehow gets changed in setup.py, but don't know
> enough Python to find exactly where this happens. This "problem" has
> been present since at least python-2.3-2 (maybe earlier).
Python uses the following:
#! /usr/bin/env python
as its standard trigger line. In this way, scripts will use the version
of python found on the user's PATH first. Some like this approach, some
Do we have too much time on our hands? :,)
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin