gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] Minimum Python Version


From: Fred Wright
Subject: Re: [gpsd-dev] Minimum Python Version
Date: Wed, 27 Jan 2016 16:27:01 -0800 (PST)

On Wed, 27 Jan 2016, Eric S. Raymond wrote:

> Fred Wright <address@hidden>:
> > One of the issues I ran across in getting 3.16 to work on the Mac is that
> > several Python programs changed the shebang lines to specify "python2", in
> > order to defend against Python3 as a default.  But OSX has no "python2" by
> > default; it can be set up manually or via the MacPorts python2_select
> > port, but without that all programs specifying "python2" fail.
>
> Please set that up, and ship us a doc patch for INSTALL explaining
> how this needs to be done for the Mac.  I do intend to move us to 3.x,
> but there is enough Python code that this can't be done quickly.

What I've currently done in MacPorts (pending) for 3.16 is:

1) It has an explicit dependency on python2_select, to ensure that the
selector is available.

2) There's a conditional "port note" (which is displayed at install time
and can be recalled later as well) if there's no "python2", indicating the
problem and the command needed to fix it.

3) If "port test" finds no "python2", it outputs an error message similar
to the note, and then fails (since gpsfake won't run without "python2").

I thought it would be excessively rude to directly *issue* a "port select
python2" command as part of the install, particularly given that some
users might not even care about running the Python programs, so this
seemed like a reasonable compromise.  It's also similar to the way that
installing a given Python version tells you how to use "port select
python" to make it the default, but doesn't actually do it for you.

Updating INSTALL would still be useful for people *not* using MacPorts,
but that's probably not just an OSX issue, either.

> > The Python version specification in build.txt is "Python 2.x, x >= 6", but
> > strictly speaking, that's a *build* requirement, not a *run* requirement.
> > I wasn't able to find any user-level "system requirements" documentation
> > giving a minimum Python version for end users to run the Python programs.
>
> The intention is to require 2.6 for runtime.  That is pretty safe at this 
> point;
> even LTS Centos has it, I believe.

So presumably any patch requiring >=2.6 is acceptable.

BTW, I currently have the MacPorts gpsd port specifically depending on
Python 2.7.  This is because the scons port currently depends specifically
on 2.7, so it didn't seem worth the trouble to implement a variant for
changing the Python version dependency that wouldn't work, anyway. :-)

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]