pcp
[Top] [All Lists]

Re: python3 woes on f22

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: python3 woes on f22
From: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date: Mon, 13 Jul 2015 10:00:59 +1000
Cc: pcp <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <y0mbnfhvx03.fsf@xxxxxxxx>
References: <5594A1B5.5090003@xxxxxxxxxx> <y0mbnfhvx03.fsf@xxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
On 07/13/2015 08:20 AM, Frank Ch. Eigler wrote:

mgoodwin wrote:

[...]  So either pcp-system-tools is missing a dep on python-pcp, or
the interpreter should be /usr/bin/python3 for platforms that
support python3. [...]

With Fedora 23 shipping python3 only in default installs,
/usr/bin/python will not exist there.

I would have hoped /usr/bin/python would still exist, and be the platform
default (either python2 or python3).

PCP could trigger installing
python2 on such a machine ...  or better, we should grow another
configury switch that changes the scripts' interpreter to
/usr/bin/python3.  (We did this just days ago for a wee python script
included with systemtap.)

yep. As David mentioned, our python scripts should use the platform
default interpreter. I think that's python2 on <= f22, which is what
tripped up the original issue (we had no dep on python-pcp, but the
interpreter in all our scripts is currently python2). If f23 defaults
to python3 then we should update all the scripts .. but to accommodate
platforms still defaulting to python2, yeah, we'd need to resort to
configury at build time to explicitly use the default interpreter.

That's pretty ugly IMO. we might be better off sticking with python2
and tweaking the deps (as has already been done). Or perhaps we could
create a pcp-python script that just execs the default interpreter,
and use that everywhere (/me ducks, but maybe it's worth considering).

Cheers
-- Mark

<Prev in Thread] Current Thread [Next in Thread>