[pypy-dev] Freezing the ".pypy-26.so" name?

Donald Stufft donald at stufft.io
Sat Jun 13 09:31:04 CEST 2015



On June 13, 2015 at 3:23:21 AM, Armin Rigo (arigo at tunes.org) wrote:
> Hi Donald,
>  
> On 13 June 2015 at 09:13, Donald Stufft wrote:
> > For the uses of pip, it would be preferable if there was an exported stable ABI
> > that we could leverage to tag wheels with. For the people *making* Wheels, the
> > less often that stable ABI changed the better, since a single wheel would be
> > useful for more versions of PyPy then.
>  
> Sorry, I meant that nothing changed in the ABI, in addition to the
> API. You can just rename an existing "foo.pypy-25.so" to
> "foo.pypy-26.so" and it should work.
>  
> Note that you have to assume that I don't know the problems related to
> making wheels, and give some more details in your answer. I'm ready
> to hear about any suggestion if fixing "imp.get_suffixes()" is either
> not a good idea, or ok but the same information needs to be exported
> some other way too. The point is that using sys.version_info[:2] is
> too vague, given that it is always (2, 7), and using
> sys.pypy_version_info[:2] is (or will become) too precise.
>  
>  
> A bientôt,
>  
> Armin.
>  

Sorry, to be clear, I wasn't saying your idea was bad. I was just making it
clear that whatever it is should reflect the actual ABI of the module. So if
there are compile options (does JIT vs not change it?) then that should be
reflected in it too. Ideally it'd contain enough information to know if
something compiled for a particular PyPy is ABI compatible with another one.

As far as how it's exported, the suffixes is a good starting place, and if the
ABI tag can also be added to sysconfig.get_config_var("SOABI") that would be
good too.

For example, CPython (in the 3.x branch) has::

    >>> import sysconfig
    >>> sysconfig.get_config_var("SOABI")
    'cpython-34m'

This is a CPython 3.4 compiled with --with-pymalloc. The CPython bits are
here: https://www.python.org/dev/peps/pep-3149/

Generally though, I'm +1 on starting to define an actual ABI (and not breaking
it without updating the tag to reflect that). As far as wheels goes, the
important thing is that we'll make the SOABI part of the wheel filename and use
it to select which wheel we'll download and install. You don't need to worry
about that much other than the fact that defining one makes it better and
being conservative in changing it makes it better.

---  
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA




More information about the pypy-dev mailing list