]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/commitdiff
python: Fix configuration.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 8 Jan 2012 18:07:15 +0000 (19:07 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 8 Jan 2012 18:07:15 +0000 (19:07 +0100)
python/patches/python-2.7.1-config.patch
python/patches/python-2.7rc2-r79310.patch0R [new file with mode: 0644]
python/patches/python-force-sys-platform-to-be-linux2.patch [new file with mode: 0644]
python/patches/python-lib64-fix-for-test_install.patch [new file with mode: 0644]
python/python.nm

index 0bb790e68166081cea7058ae74fc5da70fdda4c1..c1939a186eae047e2e09f7da1618367f7a2fef45 100644 (file)
@@ -159,42 +159,6 @@ diff -up Python-2.7.1/Modules/Setup.dist.rhconfig Python-2.7.1/Modules/Setup.dis
  
  
  # The _tkinter module.
-@@ -322,7 +322,7 @@ GLHACK=-Dclear=__GLclear
- # every system.
- # *** Always uncomment this (leave the leading underscore in!):
--# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
-+_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
- # *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
- #     -L/usr/local/lib \
- # *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-@@ -332,7 +332,7 @@ GLHACK=-Dclear=__GLclear
- # *** Or uncomment this for Solaris:
- #     -I/usr/openwin/include \
- # *** Uncomment and edit for Tix extension only:
--#     -DWITH_TIX -ltix8.1.8.2 \
-+      -DWITH_TIX -ltix \
- # *** Uncomment and edit for BLT extension only:
- #     -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
- # *** Uncomment and edit for PIL (TkImaging) extension only:
-@@ -341,7 +341,7 @@ GLHACK=-Dclear=__GLclear
- # *** Uncomment and edit for TOGL extension only:
- #     -DWITH_TOGL togl.c \
- # *** Uncomment and edit to reflect your Tcl/Tk versions:
--#     -ltk8.2 -ltcl8.2 \
-+      -ltk -ltcl \
- # *** Uncomment and edit to reflect where your X11 libraries are:
- #     -L/usr/X11R6/lib \
- # *** Or uncomment this for Solaris:
-@@ -351,7 +351,7 @@ GLHACK=-Dclear=__GLclear
- # *** Uncomment for AIX:
- #     -lld \
- # *** Always uncomment this; X11 libraries to link with:
--#     -lX11
-+      -lX11
- # Lance Ellinghaus's syslog module
- #syslog syslogmodule.c                # syslog daemon interface
 @@ -373,7 +373,7 @@ GLHACK=-Dclear=__GLclear
  # it is a highly experimental and dangerous device for calling
  # *arbitrary* C functions in *arbitrary* shared libraries:
@@ -204,15 +168,6 @@ diff -up Python-2.7.1/Modules/Setup.dist.rhconfig Python-2.7.1/Modules/Setup.dis
  
  
  # Modules that provide persistent dictionary-like semantics.  You will
-@@ -396,7 +396,7 @@ GLHACK=-Dclear=__GLclear
- #
- # First, look at Setup.config; configure may have set this for you.
--#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
-+gdbm gdbmmodule.c -lgdbm
- # Sleepycat Berkeley DB interface.
 @@ -411,11 +411,10 @@ GLHACK=-Dclear=__GLclear
  #
  # Edit the variables DB and DBLIBVERto point to the db top directory
diff --git a/python/patches/python-2.7rc2-r79310.patch0R b/python/patches/python-2.7rc2-r79310.patch0R
new file mode 100644 (file)
index 0000000..ee92932
--- /dev/null
@@ -0,0 +1,27 @@
+Index: Misc/NEWS
+===================================================================
+--- Misc/NEWS  (revision 79309)
++++ Misc/NEWS  (revision 79310)
+@@ -29,6 +29,9 @@
+ Library
+ -------
++- Issue #8205: Remove the "Modules" directory from sys.path when Python is
++  running from the build directory (POSIX only).
++
+ - Issue #7667: Fix doctest failures with non-ASCII paths.
+ - Issue #7512: shutil.copystat() could raise an OSError when the filesystem
+Index: Lib/site.py
+===================================================================
+--- Lib/site.py        (revision 79309)
++++ Lib/site.py        (revision 79310)
+@@ -118,7 +118,7 @@
+     s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
+     if hasattr(sys, 'gettotalrefcount'):
+         s += '-pydebug'
+-    s = os.path.join(os.path.dirname(sys.path[-1]), s)
++    s = os.path.join(os.path.dirname(sys.path.pop()), s)
+     sys.path.append(s)
diff --git a/python/patches/python-force-sys-platform-to-be-linux2.patch b/python/patches/python-force-sys-platform-to-be-linux2.patch
new file mode 100644 (file)
index 0000000..efa3bcd
--- /dev/null
@@ -0,0 +1,23 @@
+diff -up Python-2.7.2/configure.in.linux2 Python-2.7.2/configure.in
+--- Python-2.7.2/configure.in.linux2   2011-09-13 23:18:19.237252000 -0400
++++ Python-2.7.2/configure.in  2011-09-13 23:18:19.494252001 -0400
+@@ -293,6 +293,7 @@ then
+       MACHDEP="$ac_md_system$ac_md_release"
+       case $MACHDEP in
++      linux*) MACHDEP="linux2";;
+       cygwin*) MACHDEP="cygwin";;
+       darwin*) MACHDEP="darwin";;
+       atheos*) MACHDEP="atheos";;
+diff -up Python-2.7.2/configure.linux2 Python-2.7.2/configure
+--- Python-2.7.2/configure.linux2      2011-06-11 11:46:28.000000000 -0400
++++ Python-2.7.2/configure     2011-09-13 23:18:19.489252001 -0400
+@@ -3003,6 +3003,7 @@ then
+       MACHDEP="$ac_md_system$ac_md_release"
+       case $MACHDEP in
++      linux*) MACHDEP="linux2";;
+       cygwin*) MACHDEP="cygwin";;
+       darwin*) MACHDEP="darwin";;
+       atheos*) MACHDEP="atheos";;
+diff -up Python-2.7.2/Misc/NEWS.linux2 Python-2.7.2/Misc/NEWS
diff --git a/python/patches/python-lib64-fix-for-test_install.patch b/python/patches/python-lib64-fix-for-test_install.patch
new file mode 100644 (file)
index 0000000..7852bf6
--- /dev/null
@@ -0,0 +1,13 @@
+--- Python-2.7.2/Lib/distutils/tests/test_install.py.lib64     2011-09-08 17:51:57.851405376 -0400
++++ Python-2.7.2/Lib/distutils/tests/test_install.py   2011-09-08 18:40:46.754205096 -0400
+@@ -41,8 +41,9 @@ class InstallTestCase(support.TempdirMan
+             self.assertEqual(got, expected)
+         libdir = os.path.join(destination, "lib", "python")
++        platlibdir = os.path.join(destination, "lib64", "python")
+         check_path(cmd.install_lib, libdir)
+-        check_path(cmd.install_platlib, libdir)
++        check_path(cmd.install_platlib, platlibdir)
+         check_path(cmd.install_purelib, libdir)
+         check_path(cmd.install_headers,
+                    os.path.join(destination, "include", "python", "foopkg"))
index 2fe2004a685d92ddefe80b35cda7be5df018defe..e6824d1f0f7ba72e5c631587f271c9cb975bfee2 100644 (file)
@@ -6,7 +6,7 @@
 name       = python
 major_ver  = 2.7
 version    = %{major_ver}.2
-release    = 4
+release    = 5
 thisapp    = Python-%{version}
 
 groups     = Development/Languages
@@ -32,7 +32,6 @@ build
                bzip2-devel
                db4-devel
                expat-devel
-               gdbm-devel
                libffi-devel
                libselinux-devel
                ncurses-devel
@@ -53,8 +52,6 @@ build
                        patch -Np1 -i %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
                fi
 
-               sed -e "s/#*shared*/*shared*/g" -i Modules/Setup.dist
-
                # Remove embedded copies of expat, zlib and libffi
                rm -rf Modules/{expat,zlib}
                rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx}