[Patches] [Patch #103220] Cygwin util.get_platform() fix

noreply@sourceforge.net noreply@sourceforge.net
Fri, 19 Jan 2001 08:26:36 -0800


Patch #103220 has been updated. 

Project: python
Category: distutils
Status: Closed
Submitted by: jlt63
Assigned to : akuchling
Summary: Cygwin util.get_platform() fix

Follow-Ups:

Date: 2001-Jan-19 08:26
By: akuchling

Comment:
Since it only affects the results on the Cygwin platform and have
no way of testing it, I'll assume it's correct for that platform.  Checked
in.
-------------------------------------------------------

Date: 2001-Jan-18 16:25
By: gvanrossum

Comment:
Oops, this should have been assigned to Andrew.

Andrew, does it look OK?  Please check it in then!

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

Date: 2001-Jan-13 20:01
By: jlt63

Comment:
> how is the "machine" in cygwin determined?

It is derived from Window's GetSystemInfo(). See the following, if
interested:

http://msdn.microsoft.com/library/psdk/sysmgmt/sysinfo_3t67.htm

> You seem to go with the "os-release-machine" format

Not for any good reason, I was just trying to get rid of the "(0.31/3/2)"
cruft.
I'm willing to go with "os-release", if that is deemed more appropriate. 
Let
me know and I will upload a revised patch.

> so I assume cygwin does distinguish the machines

I don't think it does -- it just reports the machine type.

> but I have no idea wht the possibilities are

The current list is: i[3-6]86, alpha, mips, and unknown.
-------------------------------------------------------

Date: 2001-Jan-12 23:15
By: moshez

Comment:
Hmmmmm...only one question, since I don't have Cygwin to play with: how is
the "machine" in cygwin determined? You seem to go with the
"os-release-machine" format, so I assume cygwin does distinguish the
machines, but I have no idea wht the possibilities are.
-------------------------------------------------------

Date: 2001-Jan-12 18:32
By: jlt63

Comment:
This patch adds support for Cygwin to util.get_platform(). A Cygwin
specific case is needed due to the format of Cygwin's uname command:

$ uname -r
1.1.7(0.31/3/2)

Since the release field contains slashes, a path component name that
is based on this information becomes multiple path components instead
of a single one.

This patch corrects this problem by only using the leading part of the
release field that matches the regular expression "[\d.]+".

The procedure to apply the patch is as follows:

$ cd Lib/distutils
$ # save util.patch to the current directory
$ patch <util.patch
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=103220&group_id=5470