diff Mac/Tools/fixapplepython23.py @ 50381:7431638e7dd8 3.0

Merged revisions 68062,68064 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r68062 | ronald.oussoren | 2008-12-30 06:59:02 -0600 (Tue, 30 Dec 2008) | 12 lines Make it possible to install a framework build of Python 3.x on OSX. This the build machinery on OSX to re-enable building (and installing) PythonLauncher.app and IDLE.app. This needs ports of fixes to Lib/distutils/util.py and Include/pymacconfig.h to be fully functiontional, to be fully functional. I also have a patch for Makefile.pre.in that I'll post on bugs.python.org for review. ........ r68064 | ronald.oussoren | 2008-12-30 08:16:51 -0600 (Tue, 30 Dec 2008) | 11 lines Py3k: update OSX installer-generator This update makes sure that the installer won't write files in /usr/local/bin by default. The installer also won't replace /Library/Frameworks/Python.framework/Version/Current. Both to ensure that the installer doens't break an existing install of python 2.x. ........
author Benjamin Peterson <benjamin@python.org>
date Tue, 30 Dec 2008 20:19:21 +0000
parents acdffb5b4352
children
line wrap: on
line diff
--- a/Mac/Tools/fixapplepython23.py	Tue Dec 30 18:10:53 2008 +0000
+++ b/Mac/Tools/fixapplepython23.py	Tue Dec 30 20:19:21 2008 +0000
@@ -14,7 +14,7 @@
 """
 import sys
 import os
-import gestalt as _gestalt
+import platform
 
 MAKEFILE='/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/config/Makefile'
 CHANGES=((
@@ -99,11 +99,12 @@
         print("fixapplypython23: no fix is needed on MacOSX on Intel")
         sys.exit(0)
 
-    if gestalt.gestalt('sysv') < 0x1030:
+    osver =  platform.mac_ver()
+    if osver != '10.3' and os.ver < '10.3.':
         print('fixapplepython23: no fix needed on MacOSX < 10.3')
         sys.exit(0)
 
-    if gestalt.gestalt('sysv') >= 0x1040:
+    if osver >= '10.4':
         print('fixapplepython23: no fix needed on MacOSX >= 10.4')
         sys.exit(0)