[Distutils] distutils.util.get_platform() - Linux vs Windows

Chris Barker - NOAA Federal chris.barker at noaa.gov
Mon Aug 19 19:13:08 CEST 2013


On Fri, Aug 16, 2013 at 2:18 AM,  <samuel.ferencik at barclays.com> wrote:
> It seems distutils.util.get_platform() semantically differs on Windows and Linux.
>
> Windows: the return value is derived from the architecture of the *interpreter*, hence for 32-bit Python running on 64-bit Windows get_platform() = 'win32' (32-bit).
>
> Linux: the return value is derived from the architecture of the *OS*, hence for 32-bit Python running on 64-bit Linux get_platform() = 'linux-x86_64' (64-bit).
>
> Is this intentional?

This seems just plain wrong to me.

For the record, running a 32 bit Python on a 64 bit OS_X box:

In [5]: distutils.util.get_platform()
Out[5]: 'macosx-10.6-i386'

which is the answer I want.

-Chris



> My context (where this hit me): I was trying to install the 32-bit version of the Perforce API (compiled module) on 64-bit Windows and on 64-bit Linux. My command-line was
>
>   python3.3-32 setup.py install --root FOO --install-platlib=lib.$PLAT
>
> (note the '-32' and the '$PLAT')
>
> On Windows, this installed the 32-bit version of the API into "FOO\lib.win32". On Linux, this installed the 64-bit version of the API into "FOO/lib.linux-x86_64". I'm not sure which is more correct behavior but the asymmetry seems suspicious.
>
> Sam
> _______________________________________________
>
> This message is for information purposes only, it is not a recommendation, advice, offer or solicitation to buy or sell a product or service nor an official confirmation of any transaction. It is directed at persons who are professionals and is not intended for retail customer use. Intended for recipient only. This message is subject to the terms at: www.barclays.com/emaildisclaimer.
>
> For important disclosures, please see: www.barclays.com/salesandtradingdisclaimer regarding market commentary from Barclays Sales and/or Trading, who are active market participants; and in respect of Barclays Research, including disclosures relating to specific issuers, please see http://publicresearch.barclays.com.
>
> _______________________________________________
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig



-- 

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.Barker at noaa.gov


More information about the Distutils-SIG mailing list