On Mon, Aug 19, 2013 at 11:15 PM, <samuel.feren...@barclays.com> wrote:
> What does your 'uname -m' return? x86_64 > Is it possible you're really running a 32-bit > Python on a *32-bit* OS X kernel? [http://superuser.com/q/161195] nope -- I am quite deliberately running a 32 bit Python on my 64 bit OS (I have some custom code C++ I"m using that is not yet 64 bit safe). > return value is wrong on Linux and correct on > Windows, right? no -- I'm saying that it's right on Windows (and OS-X), but wrong on Linux. >That get_platform() should return "32-bit" for a 32-bit process > running on a 64-bit system. yes, it should. > TBH, I was expecting the opposite; to me, "platform" > means the OS, which would mean that Linux does well to derive the return value > from the OS's architecture. except what would be the utility of that? this is a call made within python, and it's part of distutils, so what the caller wants to know is the platform that this particular python was build for, NOT the platform is happens to be running on. i.e. what platform do I want to build binary extensions for, and/or what platform do I want to download binary wheels for. So I'm pretty sure that currently Windows and OS-X have it right, and Linux is broken. I'm guessing running 32 bit python on a 64 bit LInux is not that common, however. (and it's less common to download binaries...) To add complexity, if I run the Apple-supplied python2.7.1 (which is 32_64 bit universal, but runs 64 bit on my machine), I get: >>> distutils.util.get_platform() 'macosx-10.7-intel' Which is more useful than it may look at first -- "intel" means "both intel platforms", i.e. i386 and x86_64. and 10.7 means -- built for OS-X 10.7 and above. so I think it's doing the right thing. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig