[Python-ideas] bdist naming scheme (compatibility tags) PEP
mal at egenix.com
Thu Aug 9 10:07:49 CEST 2012
Daniel Holth wrote:
> Platform Tag
> The platform tag is simply `distutils.util.get_platform()` with all
> hyphens `-` and periods `.` replaced with underscore `_`.
This part is going to cause problems. distutils is good at identifying
Linux and Windows and giving them sensible platform names, but it
doesn't do a good job for other OSes.
For e.g. FreeBSD it adds too much detail, for Mac OS X it doesn't have
enough detail and it also has a tendency to change even for Python
dot releases (esp. for Mac OS X which constantly causes problems).
I think your naming scheme ought to focus more on the platform
part, as the other parts (Python version and implementation) are
For the platform, the installer would have to detect whether a
package is compatible with the platform. This often requires intimate
knowledge about the platform.
Things to consider:
* OS name
* OS version, if that matters for compatibility
* C lib version, if that matters for compatibility
* ABI version, if that matters for compatibility
* architecture (Intel, PowerPC, Sparc, ARM, etc)
* bits (32, 64, 128, etc.)
* fat builds which include multiple variants in a single
and probably some more depending on OS.
In some cases, a package will also have external requirements such
as specific versions of a library (e.g. 0.9.8 vs. 1.0.0 OpenSSL
library, or 2.2 vs. 2.3 unixODBC). These quickly get complicated
up to the point where you need to run a script in order to determine
whether a platform is compatible with the package or not.
Putting all that information into a tag is going to be difficult,
so an installer will either have to access more meta information
about the package from some other resource than the file name
(which is what PyPI is heading at), or download all variants
that fit the target platform and then look inside the files
for more meta information.
So the tag name format will have to provide a set of basic
"dimensions" for the platform (e.g. OS name, architecture, bits),
but also needs to provide user defined additions that can
be used to differentiate between all the extra variants which
may be needed, and which can easily be parsed by a human with
more background knowledge about the target system and his/her
needs to select the right file.
Professional Python Services directly from the Source (#1, Aug 09 2012)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
2012-08-25: FrOSCon, St. Augustin, Germany ... 16 days to go
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the Python-ideas