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: Invalid value returned by util.get_platform() on HP
Type: Stage:
Components: Distutils Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, sable
Priority: normal Keywords:

Created on 2006-04-28 11:22 by sable, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg28366 - (view) Author: Sébastien Sablé (sable) Date: 2006-04-28 11:22
Hi,

I am working on a HP platform which is reported like
this by os.uname:

>>> print os.uname()
>>> ('HP-UX', 'newton', 'B.11.23', 'U', '9000/800')

as a result, distuils.util.get_platform() reports the
following value:

hp-ux-B.11.23-9000/800

Since this value is used by distutils "mainly to
distinguish platform-specific build directories", this
value is invalid as it contains a '/'; as a result the
directory structure in the build directory is messed up
and the installation fails.

The following patch corrected the problem:

--- util.py.old 2006-04-28 11:13:19.000000000 +0200
+++ util.py     2006-04-28 13:17:31.000000000 +0200
@@ -44,6 +44,7 @@
     # (to accommodate BSD/OS), and translate spaces
(for "Power Macintosh")
     osname = string.lower(osname)
     osname = string.replace(osname, '/', '')
+    machine = string.replace(machine, '/', '-')
     machine = string.replace(machine, ' ', '_')

     if osname[:5] == "linux":


regards
msg28367 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-04-28 16:59
Logged In: YES 
user_id=849994

Fixed in rev. 45786, 45787.
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43288
2006-04-28 11:22:38sablecreate