Re: [Python-ideas] compatibility triples for binary distributions

IMO implementation names should be compatible with PEP-421http://www.python.org/dev/peps/pep-0421/.
Also instead of a cryptic long string, maybe some structured one?. For example (JSON): {"implementation":"cpython","machine":"x86_64"} It's longer but more readable IMO (and easier to parse).
On Wednesday, July 25, 2012 7:55:34 AM UTC-7, Daniel Holth wrote:
I am working on a specification that might be useful in the PKG-INFO Platform or Supported-Platform tags. It tries to express which Python versions a built distribution works on with a triple (Implementation+Language Version, ABI, Architecture), anticipating an ABI that is not tied to a single CPython release.
A typical tag would be py27-noabi-noarch or cp33-cp33dmu-linux_x86_64.
cp27-noabi-noarch is a package that requires CPython 2.7 but doesn't include extension modules.
The Python implementation is abbreviated. Each implementation has a two-letter code:
py: Generic Python cp: CPython ip: IronPython pp: PyPy jy: Jython
concatenated with py_version_nodot “27”. The minor version can be omitted “py2” or “py3” when appropriate.
The ABI tag is an abbreviated SOABI “cp33m”, or, for “pure Python” packages, “noabi”. For pypy it was more or less suggested that the ABI would have to be a hash of the source code revision and the translation/compilation options.
The platform tag is distutils.util.get_platform() with all periods and hyphens replaced with underscore, or the string ‘noarch’.
I use the term "built distribution" instead of "binary distribution" because it includes pure python packages that for example have had 2to3 run ahead of time and are installable without setup.py.
Will it work? The ABI in particular may be so messy that it should be lumped with architecture. What is the ABI for packages that use ctypes or cffi?

Sorry for breaking threading, I actually wanted to reply to the post from Daniel Holth, but for some reason I don't have the original.
Miki Tebeka wrote:
IMO implementation names should be compatible with PEP-421http://www.python.org/dev/peps/pep-0421/.
Also instead of a cryptic long string, maybe some structured one?. For example (JSON): {"implementation":"cpython","machine":"x86_64"} It's longer but more readable IMO (and easier to parse).
+1
See below.
On Wednesday, July 25, 2012 7:55:34 AM UTC-7, Daniel Holth wrote:
[...]
The Python implementation is abbreviated. Each implementation has a two-letter code:
py: Generic Python cp: CPython ip: IronPython pp: PyPy jy: Jython
Who would be responsible for registering and tracking these two-letter codes? What counts as "generic python" -- surely if anything is "generic", it is CPython?
I can see that you have missed out on a number of existing or experimental implementations, including:
Stackless WPython ActivePython CLPython PyMite Python-iPod TinyPy Unladen Swallow CapPython HotPy Skulpt HoPe Berp
among others. Some of these may be dead projects; others may be working but not maintained; some are actively maintained. Even if they only have a small number of users, they are still legitimate Python implementations. If there is need to distinguish implementations at all, surely there is a need to distinguish (say) TinyPy from CapPython?
I think that this demonstrates the folly of using a central registry of codes for implementations. There are more implementations than just the "big four", and although some of them have the life-expectancy of mayflies, some of them go on for many years.

On 25/07/2012 9:57 PM, Steven D'Aprano wrote:
Some of these may be dead projects; others may be working but not maintained; some are actively maintained.
Some self-impose obscurity by choosing un-google-able names...
HoPe

On 08/08/12 05:03, Matt Chaput wrote:
On 25/07/2012 9:57 PM, Steven D'Aprano wrote:
Some of these may be dead projects; others may be working but not maintained; some are actively maintained.
Some self-impose obscurity by choosing un-google-able names...
HoPe
Second link on Google for "hope python":
http://kenai.com/projects/hope
http://www.google.com.au/search?q=hope+python
participants (3)
-
Matt Chaput
-
Miki Tebeka
-
Steven D'Aprano