This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients lemburg, loewis, zooko
Date 2009-10-16.10:23:24
SpamBayes Score 2.3604507e-11
Marked as misclassified No
Message-id <1255688606.95.0.843063737534.issue7146@psf.upfronthosting.co.za>
In-reply-to
Content
Zooko O'Whielacronx wrote:
> > 
> > Looking at http://bugs.python.org/setuptools/issue1 and reading the
> > source of Lib/platform.py, it appears to me that uname() returns
> > different strings identifying the amd64 architecture depending on what
> > operating system is running.  It would seem to me that it would be
> > better to report the same arch with the same string on all platforms.
platform.py generally follows (or tries to follow) the standards
for naming things on each platform. It does not try to streamline
naming standards across various OSes and platforms.

For 64-bit x86 compatible platforms, the names "x86_64", "amd64"
and "x64" are in common use.

Since the proposal relates to setuptools, I'd suggest to
do any such streamlining there, if needed and found necessary.

For matching a binary to a system configuration you only to need
to make sure that the name used for that particular system is
the same.

Since os.uname() does not exist on Windows, platform.uname()
can be used for this purpose.

What we could do is add a new API that returns canonical names
for the various platforms. That function could then return
"amd64" for AMD 64-bit architecture compatible processors.

I'm also thinking about adding a function to do platform
matching to platform.py: the function would take two
uname() results (or part thereof) and return True/False
depending on whether the platforms are binary compatible
or not.

Some background on the used 64-bit platform names:

MS started out with calling the 64-bit x86 compatible processors
"AMD64" and used "IA64" for the Itanium processor family. More
recently they switched to calling 64-bit versions "x64" and since
support for the Itanium processor family is being phased out this
will soon become the only name used for the 64-bit version of
Windows.

Cygwin on Windows uses "x86_64", FreeBSD uses "amd64", Linux
uses "x86_64". Mac OS X uses "x86_64" for Intels (and "ppc64"
for PowerPCs).

Resources:
http://www.stata.com/support/faqs/win/64bit.html
http://www.microsoft.com/servers/64bit/overview.mspx
http://www.cygwin.com/ml/cygwin/2005-10/msg00688.html
http://en.wikipedia.org/wiki/X86-64
History
Date User Action Args
2009-10-16 10:23:27lemburgsetrecipients: + lemburg, loewis, zooko
2009-10-16 10:23:26lemburgsetmessageid: <1255688606.95.0.843063737534.issue7146@psf.upfronthosting.co.za>
2009-10-16 10:23:25lemburglinkissue7146 messages
2009-10-16 10:23:24lemburgcreate