[arch-general] a plea for python 2

Qadri Muhammad.A.Qadri at gmail.com
Wed Dec 14 22:53:58 EST 2011


On Wed, Dec 14, 2011 at 5:24 PM, Evan Martin <martine at danga.com> wrote:

> As a software developer, I am now getting contacted by users where my
> software doesn't work on Arch.  I even applied a patch submitted by an
> Arch user to make my code use "python2" only to discover it broke my
> software on Mac and Windows.
>
>  To give an alternate to the already present "Code-correctness" answers, I
might suggest A) contacting those distributing Windows and Mac binaries to
include the appropriate support for python2, or B) Accept doing it wrong
(sticking to python, not python2) and forcing Arch users to patch as
needed. I might suggest B since Arch users likely won't be afraid to patch
your program (or others' programs), and your program will probably be
installed via the AUR using a PKGBUILD that patches it (hopefully well).


> 2) Should I change the software I write to attempt to detect when I'm
>   on an Arch system and adjust scripts/etc. accordingly? (I can't just
>   "fix it" because there is no /usr/bin/python2 on existing systems like
>   Macs.)
>
> It sounds (from the rest of this thread and your statement above) like
you'd need to detect Mac vs. Windows vs. Linux, really, which reduces the
complexity of your code. Or you can leave Arch and its users to fend for
itself. Or you could have a development version that is for the bleeding
edge, and a script to modify everything appropriately. Or any number of
other solutions.


> - Here's a project of mine where on AUR they've attempted to patch
>  around the python/python2 thing in the PKGBUILD:
>    http://aur.archlinux.org/packages/ni/ninja-git/PKGBUILD
>  However, the patch is not sufficient, which lead to another bug report.
>
> I don't do much python and I know nothing about your project specifically,
but it seems to me like a find and sed. Something like
find . -type f 'sed' '-e' '"1s/python[^23]/python2/"' '{}' \;
But I could just be ignorant about some subtleties. Regardless, just give
it time. Some Archer will either fix it eventually or complain so another
Archer fixes it. Or suggest a better fix for your software yourself. The
need to patch this one line should not make or break your software in terms
of use. Though, again, I could just be spouting ignorance.

MAQ.


More information about the arch-general mailing list