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

Ben Gertzfield che@debian.org
Thu, 30 Aug 2001 08:28:19 +0900


>>>>> "BAW" == Barry A Warsaw <barry@zope.com> writes:

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

The problem is that BOTH python AND python2 can and are installed on a
Debian system, and 'python' will be python 1.x.  

You can't edit $path for every user possible who will run anything
mailman related..  This patch is pretty necessary.  You can do the
changes by hand, though.  All I did was:

find mailman -type f -print0 | xargs -0 grep -H '#!.*env.*python' > list

to see which files needed to be changed, and then used that list after
editing it for sanity:

for i in `cat list`; do; \
mv $i $i.in; \
perl -pi.old -e 's/(#!.*env).*python/$! \@PYTHON\@/' $i.in; \
done

That was most of the patch.  The rest (the Makefile and configure.in
changes) are pretty small, and I can send you a smaller patch
containing just that if you'd like. I agree, though, I wouldn't be
comfortable applying such a large patch myself.

Ben

-- 
Brought to you by the letters Q and N and the number 16.
"You should be glad you don't have diaper rash. Mah Jongg."
Debian GNU/Linux maintainer of Gimp and GTK+ -- http://www.debian.org/