[Mailman-Developers] [PATCH] Modifying #! env python line to match --with-python

Barry A. Warsaw barry@zope.com
Wed, 29 Aug 2001 13:30:05 -0400


>>>>> "BG" == Ben Gertzfield <che@debian.org> writes:

    BG> Many, many utility programs and other scripts that are in
    BG> Mailman CVS have #! /usr/bin/env python hard-coded in them,
    BG> and do not use the @PYTHON@ symbol exported from autoconf.

    BG> This means that the --with-python flag cannot be ever used if
    BG> python is not named "python"; for Debian Linux, this is a Big
    BG> Problem, because the python 1.6 and python 2.0 binaries have
    BG> different names. (/usr/bin/python vs /usr/bin/python2).

    BG> So, I created a patch that makes building possible when python
    BG> is called *anything*; I've tested it on Debian GNU/Linux
    BG> unstable, where python is called python2, and it works.

    BG> The patch (it's 500K, because it renames a lot of files) is
    BG> available at:

This is the primary reason why I don't want to apply the patch.  It's
much less pain IMO to add a little shell script called "python"
somewhere earlier in your path than /usr/bin.  That's the whole reason
why python is called through /usr/bin/env.  I understand that it can
be inconvenient to hack your $path, but it is less than the pain of
trying to retain the CVS history of those files through the SF
repository.

    BG> 4) Removes misc/mailman on a make distclean

Good catch, thanks.

    BG> There are some files in the Mailman CVS tree that have #!
    BG> /usr/bin/env python lines, but are never really executed.  I
    BG> didn't munge these files, because forcing folks to guess that
    BG> SOME files in the Mailman source tree are .in and others
    BG> aren't is icky These files are:

    | ./Mailman/Post.py:#! /usr/bin/env python

This is on purpose since the Post.py script is designed to be called
from the command line.

    | ./Mailman/Archiver/pipermail.py:#! /usr/bin/env python

This is probably a holdover from an earlier time.  Not worth worrying
about.

    | ./misc/Cookie.py:#!/usr/bin/env python

Basically, a contributed script.  Probably going away soon in MM2.1
since Python 2.0 provides a Cookie.py (although I have to check for
compatibility).

-Barry