Thanks for the feedback. I updated the PR to use get_platform and get_host_platform. More testing is still needed before it's ready to merge to make sure it still does what it was intended to do.
-----Original Message----- From: Python-Dev <python-dev-bounces+paulmon=microsoft....@python.org> On Behalf Of Xavier de Gaye Sent: Tuesday, February 19, 2019 12:06 PM To: Steve Dower <steve.do...@python.org>; python-dev@python.org Subject: Re: [Python-Dev] Is distutils.util.get_platform() the "current" or the "target" platform > [Any reason for dropping python-dev?] Sorry. just clicked the wrong button. > And the answer is a resounding "yes, it returns the target platform"? It > seems you're saying this, but the wording of your email sounds just enough of > a question that I'm not sure whether you are definitively answering it or not. The answer is yes indeed, it returns the target platform. This is a listing of the non-obvious steps that lead to this conclusion. Xavier On 2/19/19 8:45 PM, Steve Dower wrote: > [Any reason for dropping python-dev?] > > On 19Feb2019 1139, Xavier de Gaye wrote: >> Is distutils.util.get_platform() the "current" or the "target" platform ? > > I *think* you're answering this below, yes? > >> * When cross-compiling on posix platforms using autoconf, configure is >> run with the '--host=host-type' [1] command line option to specify >> the target platform. >> >> * The AC_CANONICAL_HOST macro is used by configure.ac to get the >> canonical variables `host' and `host_cpu' [2]. >> Those variables are used to compute _PYTHON_HOST_PLATFORM. >> >> * The Makefile generated by configure runs setup.py, >> generate-posix-vars, etc... on the build platform using >> PYTHON_FOR_BUILD, a native python interpreter that is set >> to run with the _PYTHON_HOST_PLATFORM environment variable. >> >> * get_platform() in setup.py and in Lib/distutils/util.py returns the >> value of _PYTHON_HOST_PLATFORM when cross-compiling. >> >> So the process of cross-compilation on posix platforms has >> get_platform() return the target ('host' in autoconf terminology) platform. >> >> [1] >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.gnu.org%2Fsavannah-checkouts%2Fgnu%2Fautoconf%2Fmanual%2Fautoconf-2.69%2Fhtml_node%2FSpecifying-Target-Triplets.html&data=02%7C01%7CPaul.Monson%40microsoft.com%7C186de203c3d644c7517208d696a5f266%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636862036817328765&sdata=2PMKn%2Bt5ed82gkSBnew0nT1TA1qzDuU3VZNOFPYPqIM%3D&reserved=0 >> [2] >> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.gnu.org%2Fsavannah-checkouts%2Fgnu%2Fautoconf%2Fmanual%2Fautoconf-2.69%2Fhtml_node%2FCanonicalizing.html&data=02%7C01%7CPaul.Monson%40microsoft.com%7C186de203c3d644c7517208d696a5f266%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636862036817328765&sdata=zRtcyLjDrkL%2BfcignLCDjtUri29j7mCscdVkGqhNk50%3D&reserved=0 > > And the answer is a resounding "yes, it returns the target platform"? It > seems you're saying this, but the wording of your email sounds just enough of > a question that I'm not sure whether you are definitively answering it or not. > > Cheers, > Steve _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Flistinfo%2Fpython-dev&data=02%7C01%7CPaul.Monson%40microsoft.com%7C186de203c3d644c7517208d696a5f266%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636862036817328765&sdata=Au0xrggEwNRRAen6dr8GnBuTTvMbxVhSuWOtX67p3Ts%3D&reserved=0 Unsubscribe: https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman%2Foptions%2Fpython-dev%2Fpaulmon%2540microsoft.com&data=02%7C01%7CPaul.Monson%40microsoft.com%7C186de203c3d644c7517208d696a5f266%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636862036817328765&sdata=nVHiEW69so29h6uTbY7XDjPF6%2FwU0pnlNpQEeYSoygY%3D&reserved=0 _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com