[Python-checkins] python/nondist/sandbox/setuptools api_tests.txt, 1.2, 1.3 pkg_resources.py, 1.49, 1.50
pje@users.sourceforge.net
pje at users.sourceforge.net
Thu Jul 21 06:51:07 CEST 2005
- Previous message: [Python-checkins] python/nondist/sandbox/setuptools EasyInstall.txt, 1.45, 1.46 api_tests.txt, 1.1, 1.2 pkg_resources.py, 1.48, 1.49
- Next message: [Python-checkins] python/nondist/sandbox/setuptools EasyInstall.txt, 1.46, 1.47 api_tests.txt, 1.3, 1.4 pkg_resources.py, 1.50, 1.51
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/nondist/sandbox/setuptools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9649
Modified Files:
api_tests.txt pkg_resources.py
Log Message:
Tweak Mac OS platform string based on Mac SIG feedback: remove "micro"
version number, and map "PowerPC" and "Power_Macintosh" to "ppc".
Index: api_tests.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/api_tests.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- api_tests.txt 21 Jul 2005 01:11:31 -0000 1.2
+++ api_tests.txt 21 Jul 2005 04:50:50 -0000 1.3
@@ -256,7 +256,7 @@
Basic equality works as on other platforms::
>>> from pkg_resources import compatible_platforms as cp
- >>> reqd = 'macosx-10.4.2-Power_Macintosh'
+ >>> reqd = 'macosx-10.4-ppc'
>>> cp(reqd, reqd)
True
>>> cp("win32", reqd)
@@ -264,19 +264,19 @@
Distributions made on other machine types are not compatible::
- >>> cp("macosx-10.4.2-Intel", reqd)
+ >>> cp("macosx-10.4-i386", reqd)
False
Distributions made on earlier versions of the OS are compatible, as
long as they are from the same top-level version. The patchlevel version
number does not matter::
- >>> cp("macosx-10.4.5-Power_Macintosh", reqd)
+ >>> cp("macosx-10.4-ppc", reqd)
True
- >>> cp("macosx-10.3.5-Power_Macintosh", reqd)
+ >>> cp("macosx-10.3-ppc", reqd)
True
- >>> cp("macosx-10.5.5-Power_Macintosh", reqd)
+ >>> cp("macosx-10.5-ppc", reqd)
False
- >>> cp("macosx-9.5.5-Power_Macintosh", reqd)
+ >>> cp("macosx-9.5-ppc", reqd)
False
Index: pkg_resources.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/pkg_resources.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- pkg_resources.py 21 Jul 2005 01:11:31 -0000 1.49
+++ pkg_resources.py 21 Jul 2005 04:50:50 -0000 1.50
@@ -103,8 +103,11 @@
try:
version = _macosx_vers()
machine = os.uname()[4].replace(" ", "_")
- return "macosx-%d.%d.%d-%s" % (int(version[0]), int(version[1]),
- int(version[2]), machine)
+ machine = {
+ 'PowerPC':'ppc', 'Power_Macintosh':'ppc'
+ }.get(machine,machine)
+ return "macosx-%d.%d-%s" % (int(version[0]), int(version[1]),
+ machine)
except ValueError:
# if someone is running a non-Mac darwin system, this will fall
# through to the default implementation
@@ -113,14 +116,11 @@
from distutils.util import get_platform
return get_platform()
-macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)\.(\d+)-(.*)")
+macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
# XXX darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
-
-
-
def compatible_platforms(provided,required):
"""Can code for the `provided` platform run on the `required` platform?
@@ -143,7 +143,7 @@
# are they the same major version and machine type?
if provMac.group(1) != reqMac.group(1) or \
- provMac.group(4) != reqMac.group(4):
+ provMac.group(3) != reqMac.group(3):
return False
# is the required OS major update >= the provided one?
- Previous message: [Python-checkins] python/nondist/sandbox/setuptools EasyInstall.txt, 1.45, 1.46 api_tests.txt, 1.1, 1.2 pkg_resources.py, 1.48, 1.49
- Next message: [Python-checkins] python/nondist/sandbox/setuptools EasyInstall.txt, 1.46, 1.47 api_tests.txt, 1.3, 1.4 pkg_resources.py, 1.50, 1.51
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list