Daniel,
   The Xcode 4.6's clang breaks the InfoTest in python27 with the failure...

test test_cmath failed -- Traceback (most recent call last):
  File 
"/sw/src/fink.build/python27-2.7.3-1/Python-2.7.3/Lib/test/test_cmath.py", line 
352, in test_specific_values
    msg=error_message)
  File 
"/sw/src/fink.build/python27-2.7.3-1/Python-2.7.3/Lib/test/test_cmath.py", line 
94, in rAssertAlmostEqual
    'got {!r}'.format(a, b))
AssertionError: atan0000: atan(complex(0.0, 0.0))
Expected: complex(0.0, 0.0)
Received: complex(0.0, -0.0)
Received value insufficiently close to expected value.

Backporting the change described in 
http://hg.python.org/cpython/rev/336653319112
with the attached python27 info file and patch eliminates the InfoTest failure
on x86_64-apple-darwin12.
         Jack
diff -ru Python-2.7.2.orig/Lib/ctypes/macholib/dyld.py 
Python-2.7.2/Lib/ctypes/macholib/dyld.py
--- Python-2.7.2.orig/Lib/ctypes/macholib/dyld.py       2011-06-11 
11:46:24.000000000 -0400
+++ Python-2.7.2/Lib/ctypes/macholib/dyld.py    2011-12-29 18:30:21.000000000 
-0500
@@ -26,6 +26,7 @@
 
 DEFAULT_LIBRARY_FALLBACK = [
     os.path.expanduser("~/lib"),
+    "@PREFIX@/lib",
     "/usr/local/lib",
     "/lib",
     "/usr/lib",
diff -ru Python-2.7.2.orig/Lib/platform.py Python-2.7.2/Lib/platform.py
--- Python-2.7.2.orig/Lib/platform.py   2011-06-11 11:46:25.000000000 -0400
+++ Python-2.7.2/Lib/platform.py        2011-12-29 18:28:04.000000000 -0500
@@ -810,6 +810,15 @@
     if info is not None:
         return info
 
+    # If that doesn't work fall back to posix.uname
+    import posix
+    major,minor,patch=string.split(posix.uname()[2],'.')
+    release = '%s.%s.%s' %('10',int(major)-4, minor)
+    if posix.uname()[4]=='Power Macintosh':
+        machine='PowerPC'
+    else:
+        machine='i386'
+
     # If that also doesn't work return the default values
     return release,versioninfo,machine
 
diff -ru Python-2.7.2.orig/Makefile.pre.in Python-2.7.2/Makefile.pre.in
--- Python-2.7.2.orig/Makefile.pre.in   2011-06-11 11:46:26.000000000 -0400
+++ Python-2.7.2/Makefile.pre.in        2011-12-29 18:28:04.000000000 -0500
@@ -432,8 +432,7 @@
        fi
 
 libpython$(VERSION).dylib: $(LIBRARY_OBJS)
-        $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined 
dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib 
-Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ 
$(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
-                
+        $(CC) -dynamiclib -Wl,-single_module @LIBTOOL_CRUFT@ -o $@ 
$(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LDLAST)
 
 libpython$(VERSION).sl: $(LIBRARY_OBJS)
        $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) 
$(LDLAST)
@@ -802,7 +801,7 @@
 # Install the interpreter with $(VERSION) affixed
 # This goes into $(exec_prefix)
 altbininstall: $(BUILDPYTHON)
-       @for i in $(BINDIR) $(LIBDIR); \
+       @for i in $(BINDIR) $(LIBDIR) $(LIBPL); \
        do \
                if test ! -d $(DESTDIR)$$i; then \
                        echo "Creating directory $$i"; \
@@ -815,9 +814,9 @@
                if test -n "$(DLLLIBRARY)" ; then \
                        $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
                else \
-                       $(INSTALL_SHARED) $(LDLIBRARY) 
$(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
+                       $(INSTALL_SHARED) $(LDLIBRARY) 
$(DESTDIR)$(LIBPL)/$(INSTSONAME); \
                        if test $(LDLIBRARY) != $(INSTSONAME); then \
-                               (cd $(DESTDIR)$(LIBDIR); $(LN) -sf 
$(INSTSONAME) $(LDLIBRARY)) \
+                               (cd $(DESTDIR)$(LIBPL); $(LN) -sf $(INSTSONAME) 
$(LDLIBRARY)) \
                        fi \
                fi; \
        else    true; \
diff -ru Python-2.7.2.orig/Misc/python-config.in 
Python-2.7.2/Misc/python-config.in
--- Python-2.7.2.orig/Misc/python-config.in     2011-06-11 11:46:26.000000000 
-0400
+++ Python-2.7.2/Misc/python-config.in  2011-12-29 18:28:04.000000000 -0500
@@ -46,11 +46,10 @@
     elif opt in ('--libs', '--ldflags'):
         libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
         libs.append('-lpython'+pyver)
-        # add the prefix/lib/pythonX.Y/config dir, but only if there is no
-        # shared library in prefix/lib/.
+        # add the prefix/lib/pythonX.Y/config dir (fink keeps shared
+        # library there too)
         if opt == '--ldflags':
-            if not getvar('Py_ENABLE_SHARED'):
-                libs.insert(0, '-L' + getvar('LIBPL'))
+            libs.insert(0, '-L' + getvar('LIBPL'))
             libs.extend(getvar('LINKFORSHARED').split())
         print ' '.join(libs)
 
diff -ru Python-2.7.2.orig/Misc/python.pc.in Python-2.7.2/Misc/python.pc.in
--- Python-2.7.2.orig/Misc/python.pc.in 2011-06-11 11:46:26.000000000 -0400
+++ Python-2.7.2/Misc/python.pc.in      2011-12-29 18:28:04.000000000 -0500
@@ -1,6 +1,6 @@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-libdir=@libdir@
+libdir=@libdir@/python@VERSION@/config
 includedir=@includedir@
 
 Name: Python
diff -ru Python-2.7.2.orig/Modules/_bsddb.c Python-2.7.2/Modules/_bsddb.c
--- Python-2.7.2.orig/Modules/_bsddb.c  2011-06-11 11:46:26.000000000 -0400
+++ Python-2.7.2/Modules/_bsddb.c       2011-12-29 18:28:04.000000000 -0500
@@ -9766,7 +9766,13 @@
     ADD_INT(d, DB_REP_PERMANENT);
 
 #if (DBVER >= 44)
+#if (DBVER >= 50)
+    ADD_INT(d, DB_REP_CONF_AUTOINIT);
+#else
     ADD_INT(d, DB_REP_CONF_NOAUTOINIT);
+#endif /* 5.0 */
+#endif /* 4.4 */
+#if (DBVER >= 44)
     ADD_INT(d, DB_REP_CONF_DELAYCLIENT);
     ADD_INT(d, DB_REP_CONF_BULK);
     ADD_INT(d, DB_REP_CONF_NOWAIT);
diff -ru Python-2.7.2.orig/Modules/dbmmodule.c Python-2.7.2/Modules/dbmmodule.c
--- Python-2.7.2.orig/Modules/dbmmodule.c       2011-06-11 11:46:27.000000000 
-0400
+++ Python-2.7.2/Modules/dbmmodule.c    2011-12-29 18:28:04.000000000 -0500
@@ -19,7 +19,7 @@
 static char *which_dbm = "GNU gdbm";  /* EMX port of GDBM */
 #endif
 #elif defined(HAVE_GDBM_NDBM_H)
-#include <gdbm/ndbm.h>
+#include <ndbm.h>
 static char *which_dbm = "GNU gdbm";
 #elif defined(HAVE_GDBM_DASH_NDBM_H)
 #include <gdbm-ndbm.h>
diff -ru Python-2.7.2.orig/Modules/posixmodule.c 
Python-2.7.2/Modules/posixmodule.c
--- Python-2.7.2.orig/Modules/posixmodule.c     2011-06-11 11:46:27.000000000 
-0400
+++ Python-2.7.2/Modules/posixmodule.c  2011-12-29 18:28:04.000000000 -0500
@@ -457,7 +457,7 @@
 #endif
 
 /* Return a dictionary corresponding to the POSIX environment table */
-#ifdef WITH_NEXT_FRAMEWORK
+#ifdef __APPLE__
 /* On Darwin/MacOSX a shared library or framework has no access to
 ** environ directly, we must obtain it with _NSGetEnviron().
 */
@@ -479,7 +479,7 @@
     d = PyDict_New();
     if (d == NULL)
         return NULL;
-#ifdef WITH_NEXT_FRAMEWORK
+#ifdef __APPLE__
     if (environ == NULL)
         environ = *_NSGetEnviron();
 #endif
diff -ru Python-2.7.2.orig/configure Python-2.7.2/configure
--- Python-2.7.2.orig/configure 2011-06-11 11:46:28.000000000 -0400
+++ Python-2.7.2/configure      2011-12-29 18:28:04.000000000 -0500
@@ -4962,7 +4962,7 @@
          ;;
     Darwin*)
        LDLIBRARY='libpython$(VERSION).dylib'
-       BLDLIBRARY='-L. -lpython$(VERSION)'
+       BLDLIBRARY="$LDLIBRARY"
        RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
        ;;
     AIX*)
@@ -7505,8 +7505,8 @@
        #ARCH_RUN_32BIT="true"
     fi
 
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only 
${MACOSX_DEFAULT_ARCH}"
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(BINLIBDEST)/config/$(INSTSONAME)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) 
-current_version $(VERSION)';;
 esac
 
@@ -7653,20 +7653,8 @@
                        LDCXXSHARED="$LDCXXSHARED "'-bundle_loader 
$(BINDIR)/python$(VERSION)$(EXE)'
                fi ;;
        Darwin/*)
-               # Use -undefined dynamic_lookup whenever possible (10.3 and 
later).
-               # This allows an extension to be used in any Python
-
-               if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
-               then
-                       if test "${enable_universalsdk}"; then
-                               LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot 
${UNIVERSALSDK} ${LDFLAGS}"
-                       fi
-                       LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
-                       LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
-                       BLDSHARED="$LDSHARED"
-               else
-                       LDSHARED='$(CC) -bundle'
-                       LDCXXSHARED='$(CXX) -bundle'
+                       LDSHARED='$(CC) $(LDFLAGS) -bundle'
+                       LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
                        if test "$enable_framework" ; then
                                # Link against the framework. All externals 
should be defined.
                                BLDSHARED="$LDSHARED 
"'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
@@ -7674,11 +7662,10 @@
                                LDCXXSHARED="$LDCXXSHARED 
"'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
                        else
                                # No framework, use the Python app as 
bundle-loader
-                               BLDSHARED="$LDSHARED "'-bundle_loader 
$(BUILDPYTHON)'
-                               LDSHARED="$LDSHARED "'-bundle_loader 
$(BINDIR)/python$(VERSION)$(EXE)'
-                               LDCXXSHARED="$LDCXXSHARED "'-bundle_loader 
$(BINDIR)/python$(VERSION)$(EXE)'
+                               BLDSHARED="$LDSHARED "'$(BLDLIBRARY)'
+                               LDSHARED="$LDSHARED "'-L$(BINLIBDEST)/config 
-lpython$(VERSION)'
+                               LDCXXSHARED="$LDCXXSHARED 
"'-L$(BINLIBDEST)/config -lpython$(VERSION)'
                        fi
-               fi
                ;;
        Linux*|GNU*|QNX*)
                LDSHARED='$(CC) -shared'
@@ -13734,7 +13721,7 @@
 
 if test $ac_sys_system = Darwin
 then
-       LIBS="$LIBS -framework CoreFoundation"
+       LIBS="$LIBS -Wl,-framework,CoreFoundation"
 fi
 
 
diff -ru Python-2.7.2.orig/setup.py Python-2.7.2/setup.py
--- Python-2.7.2.orig/setup.py  2011-06-11 11:46:28.000000000 -0400
+++ Python-2.7.2/setup.py       2011-12-29 18:28:04.000000000 -0500
@@ -250,13 +250,17 @@
                                               longest, g)
 
         if missing:
+            num_missing=len(missing)
             print
             print ("Python build finished, but the necessary bits to build "
                    "these modules were not found:")
             print_three_column(missing)
             print ("To find the necessary bits, look in setup.py in"
                    " detect_modules() for the module's name.")
+            print ("(Fink package build should have 5 missing)")
             print
+            if num_missing != 5:
+                sys.exit(1)
 
         if self.failed:
             failed = self.failed[:]
@@ -264,6 +268,7 @@
             print "Failed to build these modules:"
             print_three_column(failed)
             print
+            sys.exit(1)
 
     def build_extension(self, ext):
 
@@ -369,9 +374,8 @@
 
     def detect_modules(self):
         # Ensure that /usr/local is always used
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-        self.add_multiarch_paths()
+        add_dir_to_list(self.compiler.library_dirs, '@PREFIX@/lib')
+        add_dir_to_list(self.compiler.include_dirs, '@PREFIX@/include')
 
         # Add paths specified in the environment variables LDFLAGS and
         # CPPFLAGS for header and library files.
@@ -799,7 +801,7 @@
         # a release.  Most open source OSes come with one or more
         # versions of BerkeleyDB already installed.
 
-        max_db_ver = (4, 8)
+        max_db_ver = (5, 1)
         min_db_ver = (4, 1)
         db_setup_debug = False   # verbose debug prints from this script?
 
@@ -835,50 +837,8 @@
         # construct a list of paths to look for the header file in on
         # top of the normal inc_dirs.
         db_inc_paths = [
-            '/usr/include/db4',
-            '/usr/local/include/db4',
-            '/opt/sfw/include/db4',
-            '/usr/include/db3',
-            '/usr/local/include/db3',
-            '/opt/sfw/include/db3',
-            # Fink defaults (http://fink.sourceforge.net/)
-            '/sw/include/db4',
-            '/sw/include/db3',
+            '@PREFIX@/include/db4'
         ]
-        # 4.x minor number specific paths
-        for x in gen_db_minor_ver_nums(4):
-            db_inc_paths.append('/usr/include/db4%d' % x)
-            db_inc_paths.append('/usr/include/db4.%d' % x)
-            db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
-            db_inc_paths.append('/usr/local/include/db4%d' % x)
-            db_inc_paths.append('/pkg/db-4.%d/include' % x)
-            db_inc_paths.append('/opt/db-4.%d/include' % x)
-            # MacPorts default (http://www.macports.org/)
-            db_inc_paths.append('/opt/local/include/db4%d' % x)
-        # 3.x minor number specific paths
-        for x in gen_db_minor_ver_nums(3):
-            db_inc_paths.append('/usr/include/db3%d' % x)
-            db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
-            db_inc_paths.append('/usr/local/include/db3%d' % x)
-            db_inc_paths.append('/pkg/db-3.%d/include' % x)
-            db_inc_paths.append('/opt/db-3.%d/include' % x)
-
-        # Add some common subdirectories for Sleepycat DB to the list,
-        # based on the standard include directories. This way DB3/4 gets
-        # picked up when it is installed in a non-standard prefix and
-        # the user has added that prefix into inc_dirs.
-        std_variants = []
-        for dn in inc_dirs:
-            std_variants.append(os.path.join(dn, 'db3'))
-            std_variants.append(os.path.join(dn, 'db4'))
-            for x in gen_db_minor_ver_nums(4):
-                std_variants.append(os.path.join(dn, "db4%d"%x))
-                std_variants.append(os.path.join(dn, "db4.%d"%x))
-            for x in gen_db_minor_ver_nums(3):
-                std_variants.append(os.path.join(dn, "db3%d"%x))
-                std_variants.append(os.path.join(dn, "db3.%d"%x))
-
-        db_inc_paths = std_variants + db_inc_paths
         db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)]
 
         db_ver_inc_map = {}
@@ -1004,12 +964,7 @@
         # We hunt for #define SQLITE_VERSION "n.n.n"
         # We need to find >= sqlite version 3.0.8
         sqlite_incdir = sqlite_libdir = None
-        sqlite_inc_paths = [ '/usr/include',
-                             '/usr/include/sqlite',
-                             '/usr/include/sqlite3',
-                             '/usr/local/include',
-                             '/usr/local/include/sqlite',
-                             '/usr/local/include/sqlite3',
+        sqlite_inc_paths = [ '@PREFIX@/include'
                            ]
         MIN_SQLITE_VERSION_NUMBER = (3, 0, 8)
         MIN_SQLITE_VERSION = ".".join([str(x)
@@ -1021,7 +976,7 @@
         if sys.platform == 'darwin':
             sysroot = macosx_sdk_root()
 
-        for d in inc_dirs + sqlite_inc_paths:
+        for d in sqlite_inc_paths:
             f = os.path.join(d, "sqlite3.h")
 
             if sys.platform == 'darwin' and is_macosx_sdk_path(d):
@@ -1053,11 +1008,9 @@
             sqlite_dirs_to_check = [
                 os.path.join(sqlite_incdir, '..', 'lib64'),
                 os.path.join(sqlite_incdir, '..', 'lib'),
-                os.path.join(sqlite_incdir, '..', '..', 'lib64'),
-                os.path.join(sqlite_incdir, '..', '..', 'lib'),
             ]
             sqlite_libfile = self.compiler.find_library_file(
-                                sqlite_dirs_to_check + lib_dirs, 'sqlite3')
+                                sqlite_dirs_to_check, 'sqlite3')
             if sqlite_libfile:
                 sqlite_libdir = 
[os.path.abspath(os.path.dirname(sqlite_libfile))]
 
@@ -1174,7 +1127,7 @@
                         if self.compiler.find_library_file(lib_dirs,
                                                                'gdbm_compat'):
                             gdbm_libs.append('gdbm_compat')
-                        if find_file("gdbm/ndbm.h", inc_dirs, []) is not None:
+                        if find_file("ndbm.h", inc_dirs, []) is not None:
                             print "building dbm using gdbm"
                             dbmext = Extension(
                                 'dbm', ['dbmmodule.c'],
@@ -1252,6 +1205,7 @@
                 panel_library = 'panelw'
             curses_libs = [curses_library]
             exts.append( Extension('_curses', ['_cursesmodule.c'],
+                                   include_dirs=["@PREFIX@/include/ncursesw"],
                                    libraries = curses_libs) )
         elif curses_library == 'curses' and platform != 'darwin':
                 # OSX has an old Berkeley curses, not good enough for
@@ -1272,6 +1226,7 @@
         if (module_enabled(exts, '_curses') and
             self.compiler.find_library_file(lib_dirs, panel_library)):
             exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+                                   include_dirs=["@PREFIX@/include/ncursesw"],
                                    libraries = [panel_library] + curses_libs) )
         else:
             missing.append('_curses_panel')
@@ -1702,16 +1657,12 @@
         # AquaTk is a separate method. Only one Tkinter will be built on
         # Darwin - either AquaTk, if it is found, or X11 based Tk.
         platform = self.get_platform()
-        if (platform == 'darwin' and
-            self.detect_tkinter_darwin(inc_dirs, lib_dirs)):
-            return
 
         # Assume we haven't found any of the libraries or include files
         # The versions with dots are used on Unix, and the versions without
         # dots on Windows, for detection by cygwin.
         tcllib = tklib = tcl_includes = tk_includes = None
-        for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
-                        '8.2', '82', '8.1', '81', '8.0', '80']:
+        for version in ['8.4']:
             tklib = self.compiler.find_library_file(lib_dirs,
                                                         'tk' + version)
             tcllib = self.compiler.find_library_file(lib_dirs,
@@ -1932,7 +1883,8 @@
                         sources=sources,
                         depends=depends)
         ext_test = Extension('_ctypes_test',
-                             sources=['_ctypes/_ctypes_test.c'])
+                             sources=['_ctypes/_ctypes_test.c'],
+                             extra_compile_args=['-O0'])
         self.extensions.extend([ext, ext_test])
 
         if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
diff --git a/Modules/_math.c b/Modules/_math.c
--- a/Modules/_math.c
+++ b/Modules/_math.c
@@ -189,6 +189,27 @@ double
    significant loss of precision that arises from direct evaluation when x is
    small. */
 
+#ifdef HAVE_LOG1P
+
+double
+_Py_log1p(double x)
+{
+    /* Some platforms supply a log1p function but don't respect the sign of
+       zero:  log1p(-0.0) gives 0.0 instead of the correct result of -0.0.
+
+       To save fiddling with configure tests and platform checks, we handle the
+       special case of zero input directly on all platforms.
+    */
+    if (x == 0.0) {
+        return x;
+    }
+    else {
+        return log1p(x);
+    }
+}
+
+#else
+
 double
 _Py_log1p(double x)
 {
@@ -230,3 +251,5 @@ double
         return log(1.+x);
     }
 }
+
+#endif /* ifdef HAVE_LOG1P */
diff --git a/Modules/_math.h b/Modules/_math.h
--- a/Modules/_math.h
+++ b/Modules/_math.h
@@ -36,10 +36,6 @@ double _Py_log1p(double x);
 #define m_expm1 _Py_expm1
 #endif
 
-#ifdef HAVE_LOG1P
-#define m_log1p log1p
-#else
-/* if the system doesn't have log1p, use the substitute
-   function defined in Modules/_math.c. */
+/* Use the substitute from _math.c on all platforms:
+   it includes workarounds for buggy handling of zeros. */
 #define m_log1p _Py_log1p
-#endif

Info2: <<
Package: python%type_pkg[python]
Version: 2.7.3
Revision: 2
Epoch: 1
Type: python 2.7
Maintainer: Daniel Johnson <dan...@daniel-johnson.org>
Depends: <<
        %N-shlibs (= %e:%v-%r),
        blt-shlibs,
        bzip2-shlibs,
        db51-aes-shlibs | db51-shlibs,
        gdbm3-shlibs,
        libgettext8-shlibs,
        libncursesw5-shlibs,
        openssl100-shlibs (>= 1.0.1-1),
        readline5-shlibs,
        sqlite3-shlibs  (>= 3.7.2-2),
        tcltk (>= 8.4.1-1),
        x11
<<
BuildConflicts: libquicktime0
BuildDepends: <<
        blt-dev (>= 2.4z-15),
        bzip2-dev,
        db51-aes | db51,
        fink (>= 0.32), 
        gdbm3,
        gettext-bin,
        gettext-tools,
        libgettext8-dev,
        libncursesw5,
        readline5,
        sqlite3-dev (>= 3.7.2-2),
        openssl100-dev (>= 1.0.1-1),
        tcltk-dev (>= 8.4.1-1),
        x11-dev
<<
Provides: argparse-py%type_pkg[python]
Source: http://python.org/ftp/python/%v/Python-%v.tar.xz
Source-MD5: 62c4c1699170078c469f79ddfed21bc0
Source2: http://www.python.org/ftp/python/doc/%v/python-%v-docs-html.tar.bz2
Source2-MD5: 101c13d39f76fd6706aac3a9196b2f01
PatchFile: %n.patch
PatchFile-MD5: fa848f2e65a867a3eda68c5fc308fe8e
PatchScript: <<
        sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
<<

UseMaxBuildJobs: true
ConfigureParams: --enable-shared --with-dbmliborder=gdbm
CompileScript: <<
#!/bin/sh -ex
        darwin_vers=`uname -r | cut -d. -f1`
        if [ "$darwin_vers" -ge 11 ]; then
                perl -pi -e 's/ -lSystemStubs//' ./configure
                perl -pi -e 's/-O3/-fwrapv -O3/' ./configure
        fi
        if [ "%m" = "x86_64" ]; then
                perl -pi -e 's|num_missing != 5:|num_missing != 7:|g; s|have 5 
missing|have 7 missing|' ./setup.py
                # Architecture:x86_64 has tcltk-8.5.x, other arch have 8.4.x
                perl -pi -e "s/8.4\'/8.5\'/" ./setup.py
                # Architecture:x86_64 can't build with toolbox-glue
                ./configure %c --disable-toolbox-glue
        else
                ./configure %c
        fi
        make
<<

InfoTest: TestScript: LANG=en_US.UTF-8 make -k test EXTRATESTOPTS='-w -x 
test_distutils test_argparse test_httpservers' || exit 2

InstallScript: <<
#!/bin/sh -ex
        make install DESTDIR=%d

        # fix all main things to be python-versioned filenames with
        # unversioned symlinks to them
        pushd %i/bin
                for f in 2to3 idle pydoc smtpd.py; do
                        mv ${f} ${f}%type_raw[python]
                        ln -s ${f}%type_raw[python] %i/bin/${f}
                done
        popd
        ln -s python%type_raw[python].1 %i/share/man/man1/python.1
        ln -s python%type_raw[python].1 
%i/share/man/man1/python%type_pkg[python].1

        # install some docs and other useful tidbits
        rm -rf Misc/RPM
        /bin/cp -R Misc Tools %i/lib/python%type_raw[python]
        mkdir -p %i/share/doc/%n
        /bin/cp -R Demo Doc %i/share/doc/%n
        mkdir -p %i/share/doc/%n/html
        /bin/cp -R ../python-%v-docs-html/ %i/share/doc/%n/html
<<
SplitOff: <<
 Package: %N-shlibs
 Files: lib/python%type_raw[python]/config/libpython%type_raw[python].dylib
 Shlibs: %p/lib/python2.7/config/libpython2.7.dylib 2.7.0 %n (>= 1:2.7-1)
 DocFiles: README LICENSE 
<<
SplitOff2: <<
 Package: python
 Depends: %N (>= %e:%v-%r)
 Conflicts: python-nox
 Replaces: python-nox, python25 (<< 1:2.5.1-3)
 Files: <<
                bin/2to3
                bin/idle
                bin/pydoc
                bin/python
                bin/python2
                bin/python-config
                bin/python2-config
                bin/smtpd.py
                lib/pkgconfig/python.pc
                lib/pkgconfig/python2.pc
                share/man/man1/python.1
        <<
 DocFiles: README LICENSE
 Description: Generic "python" command that invokes python%type_pkg[python]
<<
DocFiles: README LICENSE 
Description: Interpreted, object-oriented language
DescDetail: <<
 Python is often compared to Tcl, Perl, Scheme or Java. 
 This package installs unix python - not the OSX Framework version.
 Builds a two-level namespace dynamic libpython (needed for koffice).

 The interpretter is installed as "python%type_raw[python]", and all associated
 commands are similarly named with the python-version in them. To get
 the simple "python" command, install the fink package "python" (note:
 the "python" command there is not guaranteed to be python%type_raw[python]!).
<<
DescUsage: <<
        python%type_raw[python] changes the compiler options used to compile
        third-party python modules. Please do not add %type_raw[python] variants
        to them without actually testing that they build cleanly.
<<

DescPackaging: <<
        Patch a lot of things to impliment shared-lib support for
        non-Framework build on Darwin.

        Static libpython is installed in lib/pythonX.X/config/ but
        shared goes in %p/lib by default. Fink's packaging has always
        placed manually-built shared lib in config/ along side static,
        This gives consistency regardless of -search_paths_first.
        Continue this practice so that -pyXX varianted packages don't
        need special-casing for certain variants.

        Make sure all compiled modules link against libpython%type_raw[python] 
(and
        propagate this to third-party compiled modules) to ensure that
        all symbols resolved at compile-time to avoid packager
        mistakes and user runtime surprises.

        Play lots of games to make sure we get expected support
        libraries. Also make sure -L/sw/lib/system-openssl is passed
        before -L/sw (build system seems to confuse standard meanings
        and uses of CFLAGS vs CPPFLAGS vs LDFLAGS) but avoid
        propagating into modules that compile using distutils.

        Adjust "python" unversioned link to be a symlink not a hard link.

        Must remain Epoch'ed so that this "python" pkg to be newer
        than the one from lower %v pkgs.

        Shared lib is buried next to static one instead of being in
        %p/lib because that's where it's always been in the fink
        package series. Why would they be in different places? Patch
        -config script to continue this tradition (bug in previous
        versions accidentally did the Right Thing here).
<<
DescPort: <<
        Patch setup.py to find ncursesw headers and drop libncurses5 dep.

        platform.mac_ver now works on 64 bit, but leave our posix.uname
        fallback in just in case.
        Fink's gdbm3 installs %p/include/ndbm.h but python expects
        %p/include/gdbm/ndbm.h so python ends up using /usr/include/ndbm.h
        but the lib from gdbm3 which is, shall we say, bad. Force it to find
        %p/include/ndbm.h instead.
        
        test_ctypes fails with clang unless _ctypes/_ctypes_test.c is built
        with -O0 so force that in setup.py.
        
        Patch ctypes to look in %p/lib for libraries.
<<
License: OSI-Approved
Homepage: http://www.python.org
<<
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to