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.

classification
Title: distutils.util.getplatform and sysconfig.getplatform differ
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: tarek Nosy List: bugs-python@vendor.thewrittenword.com, eric.araujo, tarek
Priority: normal Keywords:

Created on 2010-07-16 03:27 by bugs-python@vendor.thewrittenword.com, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg110411 - (view) Author: The Written Word (bugs-python@vendor.thewrittenword.com) Date: 2010-07-16 03:27
We had issues building python 2.7 on hppa-hp-hpux machines because sysconfig and distutils had different ideas of the platform name.

./python -c 'import os, sys; from distutils.util import get_platform as plat1; from sysconfig import get_platform as plat2; print plat1();print plat2()'
hp-ux-B.11.11-9000_785
hp-ux-B.11.11-9000-785

Notice that one has an underscore, the other a dash.

Either the code is sysconfig or distutils needs to change slightly so that they match.
e.g.
Index: Lib/sysconfig.py
===================================================================
--- Lib/sysconfig.py.orig       2010-05-19 22:20:14.000000000 +0000
+++ Lib/sysconfig.py    2010-07-16 02:52:39.385322407 +0000
@@ -569,3 +569,3 @@
     machine = machine.replace(' ', '_')
-    machine = machine.replace('/', '-')
+    machine = machine.replace('/', '_')
msg115765 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-09-07 14:37
Thanks for the report. I just checked 2.7 and 3.2 (by monkey-patching os.uname to return something with a space and calling the two get_platform) and this is fixed (both use an underscore), probably thanks to the freeze and revert of distutils.
msg130456 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-09 19:01
Checked distutils2 too, it’s okay.
History
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53516
2011-03-09 19:01:55eric.araujosettype: compile error -> behavior
messages: + msg130456
nosy: tarek, eric.araujo, bugs-python@vendor.thewrittenword.com
2010-09-07 14:37:01eric.araujosetstatus: open -> closed

versions: + Python 3.2
nosy: + eric.araujo

messages: + msg115765
resolution: fixed
stage: resolved
2010-07-16 03:27:57bugs-python@vendor.thewrittenword.comcreate