[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Update on Python Version Compatibility
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] Update on Python Version Compatibility |
Date: |
Tue, 29 Mar 2016 09:39:53 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Fred Wright <address@hidden>:
> My original impression was that it's relevant even to top-level programs,
> but upon rereading the doc, I guess not. But I don't see it in gps/,
> either. This isn't about making it work, it's about setting it up so that
> any future change that accidentally relies on implicit relative imports
> fails the same way in Python 2 as it does in Python 3.
I understand, but I don't grasp the full ramifications of the feature.
I added the prefix dots required to make the gps/ module imports work under
Python 3; is anything else required?
> BTW, the concept of a "target Python" is needed to be able to build C
> extensions for Python 3, since they need to build with the right include
> files for Python 3, and simply getting the 'INCLUDEPY' config_var from the
> scons Python (guaranteed to be Python 2 for the time being) doesn't cut
> it. For testing I just kludged in something to patch the value, but it
> will need something better to work for real.
>
> This also means that the regression tests will *have* to use the target
> Python when targeting Python 3, unless there were a more elaborate scheme
> to provide multiple versions of the extensions. I.e., gpsfake won't work
> with Python 2 if the packet module is built (only) for Python 3.
That much I understand. I built the C extension modules for Python 2, but
that was quite a long time ago and I've forgotten a lot of the recipe.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>