[Python-Dev] Mapping Darwin 8.2.0 to Mac OS X 10.4.2 in platform.py
Ronald Oussoren
ronaldoussoren at mac.com
Thu Sep 22 08:30:52 CEST 2005
On 22-sep-2005, at 5:26, Guido van Rossum wrote:
> The platform module has a way to map system names such as returned by
> uname() to marketing names. It maps SunOS to Solaris, for example. But
> it doesn't map Darwin to Mac OS X. I think I know how to map Darwin
> version numbers to OS X version numbers: from
> http://www.opensource.apple.com/darwinsource/ it is clear that OS X
> 10.a.b corresponds to Darwin (a+4).b, except for OS X versions <=
> 10.1. I'd be happy to write the code and add it to system_alias() in
> platform.py. Is this a good idea?
There's no good reason to assume that the mapping from kernel version
to marketing version will stay the same in the future. The savest way
to get the marketing version of the currently running OSX is to run /
usr/sbin/sw_vers and parse its output. There might also be a public
API for getting the same information. Py2app, and specifically the
bdist_mpkg component of that, contains code to parse sw_vers output.
Ronald
>
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/
> ronaldoussoren%40mac.com
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2105 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-dev/attachments/20050922/476055ec/smime.bin
More information about the Python-Dev
mailing list