[issue9270] distutils.util.getplatform and sysconfig.getplatform differ

bugs-python@vendor.thewrittenword.com report at bugs.python.org
Fri Jul 16 05:27:58 CEST 2010


New submission from bugs-python at vendor.thewrittenword.com <bugs-python at vendor.thewrittenword.com>:

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('/', '_')

----------
assignee: tarek
components: Distutils
messages: 110411
nosy: bugs-python at vendor.thewrittenword.com, tarek
priority: normal
severity: normal
status: open
title: distutils.util.getplatform and sysconfig.getplatform differ
type: compile error
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9270>
_______________________________________


More information about the Python-bugs-list mailing list