[New-bugs-announce] [issue7146] [PATCH] platform.uname()[4] returns 'amd64' on Windows and 'x86-64' on Linux
Zooko O'Whielacronx
report at bugs.python.org
Fri Oct 16 01:40:52 CEST 2009
New submission from Zooko O'Whielacronx <zooko at zooko.com>:
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.
Could someone with win64 report the output of:
python -c 'import platform;print platform.uname()[4]'
Here is a patch against trunk that just replaces any 'x86_64' with 'amd64':
HACK yukyuk:~/playground/python/trunk$ svn diff
Index: Lib/platform.py
===================================================================
--- Lib/platform.py (revision 75443)
+++ Lib/platform.py (working copy)
@@ -1225,6 +1225,9 @@
system = 'Windows'
release = 'Vista'
+ # normalize 'amd64' arch
+ if machine == 'x86_64':
+ machine = 'amd64'
_uname_cache = system,node,release,version,machine,processor
return _uname_cache
----------
components: Library (Lib)
messages: 94112
nosy: zooko
severity: normal
status: open
title: [PATCH] platform.uname()[4] returns 'amd64' on Windows and 'x86-64' on Linux
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7146>
_______________________________________
More information about the New-bugs-announce
mailing list