[Python-checkins] r68076 - in python/branches/release30-maint: Doc/distutils/apiref.rst Include/pymacconfig.h Lib/distutils/util.py Makefile.pre.in

benjamin.peterson python-checkins at python.org
Tue Dec 30 19:10:55 CET 2008


Author: benjamin.peterson
Date: Tue Dec 30 19:10:53 2008
New Revision: 68076
Log:
Merged revisions 68074-68075 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
 r68074 | benjamin.peterson | 2008年12月30日 11:56:45 -0600 (2008年12月30日) | 18 lines
 
 Merged revisions 67982,67988,67990 via svnmerge from 
 svn+ssh://pythondev@svn.python.org/python/trunk
 
 ........
 r67982 | benjamin.peterson | 2008年12月28日 09:37:31 -0600 (2008年12月28日) | 1 line
 
 fix WORD_BIGEDIAN declaration in Universal builds; fixes #4060 and #4728
 ........
 r67988 | ronald.oussoren | 2008年12月28日 13:40:56 -0600 (2008年12月28日) | 1 line
 
 Issue4064: architecture string for universal builds on OSX
 ........
 r67990 | ronald.oussoren | 2008年12月28日 13:50:40 -0600 (2008年12月28日) | 3 lines
 
 Update the fix for issue4064 to deal correctly with all three variants of
 universal builds that are presented by the configure script.
 ........
................
 r68075 | benjamin.peterson | 2008年12月30日 12:05:46 -0600 (2008年12月30日) | 2 lines
 
 use $(RUNSHARED) to run plat-mac/regen
................
Modified:
 python/branches/release30-maint/Doc/distutils/apiref.rst
 python/branches/release30-maint/Include/pymacconfig.h
 python/branches/release30-maint/Lib/distutils/util.py
 python/branches/release30-maint/Makefile.pre.in
Modified: python/branches/release30-maint/Doc/distutils/apiref.rst
==============================================================================
--- python/branches/release30-maint/Doc/distutils/apiref.rst	(original)
+++ python/branches/release30-maint/Doc/distutils/apiref.rst	Tue Dec 30 19:10:53 2008
@@ -1100,6 +1100,24 @@
 
 For non-POSIX platforms, currently just returns ``sys.platform``.
 
+ For MacOS X systems the OS version reflects the minimal version on which
+ binaries will run (that is, the value of ``MACOSX_DEPLOYMENT_TARGET``
+ during the build of Python), not the OS version of the current system. 
+
+ For universal binary builds on MacOS X the architecture value reflects
+ the univeral binary status instead of the architecture of the current
+ processor. For 32-bit universal binaries the architecture is ``fat``, 
+ for 64-bit universal binaries the architecture is ``fat64``, and 
+ for 4-way universal binaries the architecture is ``universal``. 
+
+ Examples of returned values on MacOS X:
+
+ * ``macosx-10.3-ppc``
+
+ * ``macosx-10.3-fat``
+
+ * ``macosx-10.5-universal``
+
 .. % XXX isn't this also provided by some other non-distutils module?
 
 
Modified: python/branches/release30-maint/Include/pymacconfig.h
==============================================================================
--- python/branches/release30-maint/Include/pymacconfig.h	(original)
+++ python/branches/release30-maint/Include/pymacconfig.h	Tue Dec 30 19:10:53 2008
@@ -15,6 +15,8 @@
 # undef SIZEOF_SIZE_T
 # undef SIZEOF_TIME_T
 # undef SIZEOF_VOID_P
+# undef SIZEOF__BOOL
+# undef WORDS_BIGENDIAN
 
 # undef VA_LIST_IS_ARRAY
 # if defined(__LP64__) && defined(__x86_64__)
@@ -28,12 +30,19 @@
 
 # undef SIZEOF_LONG
 # ifdef __LP64__
+#	 define SIZEOF__BOOL		1
+# define SIZEOF__BOOL		1
 # define SIZEOF_LONG 		8
 # define SIZEOF_PTHREAD_T 	8
 # define SIZEOF_SIZE_T 		8
 # define SIZEOF_TIME_T 		8
 # define SIZEOF_VOID_P 		8
 # else
+# ifdef __ppc__
+#	 define SIZEOF__BOOL		4
+# else
+#	 define SIZEOF__BOOL		1
+# endif
 # define SIZEOF_LONG 		4
 # define SIZEOF_PTHREAD_T 	4
 # define SIZEOF_SIZE_T 		4
@@ -54,6 +63,11 @@
 
 # endif
 
+#ifdef __BIG_ENDIAN__
+#define WORDS_BIGENDIAN 1
+#endif /* __BIG_ENDIAN */
+
+
 #endif /* defined(_APPLE__) */
 
 #endif /* PYMACCONFIG_H */
Modified: python/branches/release30-maint/Lib/distutils/util.py
==============================================================================
--- python/branches/release30-maint/Lib/distutils/util.py	(original)
+++ python/branches/release30-maint/Lib/distutils/util.py	Tue Dec 30 19:10:53 2008
@@ -99,7 +99,11 @@
 if not macver:
 macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET')
 
- if not macver:
+ if 1:
+ # Always calculate the release of the running machine,
+ # needed to determine if we can build fat binaries or not.
+
+ macrelease = macver
 # Get the system version. Reading this plist is a documented
 # way to get the system version (see the documentation for
 # the Gestalt Manager)
@@ -115,16 +119,18 @@
 r'<string>(.*?)</string>', f.read())
 f.close()
 if m is not None:
- macver = '.'.join(m.group(1).split('.')[:2])
+ macrelease = '.'.join(m.group(1).split('.')[:2])
 # else: fall back to the default behaviour
 
+ if not macver:
+ macver = macrelease
+
 if macver:
 from distutils.sysconfig import get_config_vars
 release = macver
 osname = "macosx"
 
-
- if (release + '.') >= '10.4.' and \
+ if (macrelease + '.') >= '10.4.' and \
 '-arch' in get_config_vars().get('CFLAGS', '').strip():
 # The universal build will build fat binaries, but not on
 # systems before 10.4
@@ -133,9 +139,13 @@
 # 'universal' instead of 'fat'.
 
 machine = 'fat'
+ cflags = get_config_vars().get('CFLAGS')
 
- if '-arch x86_64' in get_config_vars().get('CFLAGS'):
- machine = 'universal'
+ if '-arch x86_64' in cflags:
+ if '-arch i386' in cflags:
+ machine = 'universal'
+ else:
+ machine = 'fat64'
 
 elif machine in ('PowerPC', 'Power_Macintosh'):
 # Pick a sane name for the PPC architecture.
Modified: python/branches/release30-maint/Makefile.pre.in
==============================================================================
--- python/branches/release30-maint/Makefile.pre.in	(original)
+++ python/branches/release30-maint/Makefile.pre.in	Tue Dec 30 19:10:53 2008
@@ -899,7 +899,7 @@
 	export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
 	export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
 	export EXE; EXE="$(BUILDEXE)"; \
-	cd $(srcdir)/Lib/$(PLATDIR); ./regen
+	cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
 
 # Install the include files
 INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /