[ python-Bugs-1478326 ] Invalid value returned by util.get_platform() on HP

SourceForge.net noreply at sourceforge.net
Fri Apr 28 18:59:28 CEST 2006


Bugs item #1478326, was opened at 2006-04-28 11:22
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1478326&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils
Group: Platform-specific
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Sébastien Sablé (sable)
Assigned to: Nobody/Anonymous (nobody)
Summary: Invalid value returned by util.get_platform() on HP

Initial Comment:
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

----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2006-04-28 16:59

Message:
Logged In: YES 
user_id=849994

Fixed in rev. 45786, 45787.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1478326&group_id=5470


More information about the Python-bugs-list mailing list