- Update to 2.6.2

This commit is contained in:
James Antill 2009-07-30 21:03:26 +00:00
parent d62d1afef6
commit 59ba18a89d
7 changed files with 64 additions and 205 deletions

View File

@ -1 +1 @@
Python-2.6.tar.bz2
Python-2.6.2.tar.bz2

View File

@ -1,20 +0,0 @@
diff -ru Python-2.5.2-orig/Lib/ctypes/util.py Python-2.5.2/Lib/ctypes/util.py
--- Python-2.5.2-orig/Lib/ctypes/util.py 2007-09-14 16:05:26.000000000 -0400
+++ Python-2.5.2/Lib/ctypes/util.py 2008-09-24 17:30:06.000000000 -0400
@@ -83,9 +83,14 @@
if not f:
return None
cmd = "objdump -p -j .dynamic 2>/dev/null " + f
- res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
+ try:
+ res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
+ except:
+ res = None
if not res:
- return None
+ return os.path.basename(f) # This is good for GLibc, I think,
+ # and a dep on binutils is big (for
+ # live CDs).
return res.group(1)
if (sys.platform.startswith("freebsd")

View File

@ -1,123 +0,0 @@
diff -up Python-2.6/configure.in.canonicalize Python-2.6/configure.in
--- Python-2.6/configure.in.canonicalize 2008-09-07 15:18:16.000000000 -0400
+++ Python-2.6/configure.in 2008-11-24 02:09:29.000000000 -0500
@@ -2445,7 +2445,8 @@ fi
AC_MSG_RESULT(MACHDEP_OBJS)
# checks for library functions
-AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset chown \
+AC_CHECK_FUNCS(alarm setitimer getitimer bind_textdomain_codeset \
+ canonicalize_file_name chown \
clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getpwent getspnam getspent getsid getwd \
diff -up Python-2.6/pyconfig.h.in.canonicalize Python-2.6/pyconfig.h.in
--- Python-2.6/pyconfig.h.in.canonicalize 2008-09-07 01:15:18.000000000 -0400
+++ Python-2.6/pyconfig.h.in 2008-11-24 02:07:11.000000000 -0500
@@ -79,6 +79,9 @@
/* Define to 1 if you have the `chflags' function. */
#undef HAVE_CHFLAGS
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
/* Define to 1 if you have the `chown' function. */
#undef HAVE_CHOWN
diff -up Python-2.6/Python/sysmodule.c.canonicalize Python-2.6/Python/sysmodule.c
--- Python-2.6/Python/sysmodule.c.canonicalize 2008-07-10 13:13:55.000000000 -0400
+++ Python-2.6/Python/sysmodule.c 2008-11-24 02:07:11.000000000 -0500
@@ -1524,11 +1524,13 @@ makeargvobject(int argc, char **argv)
void
PySys_SetArgv(int argc, char **argv)
{
+#ifndef HAVE_CANONICALIZE_FILE_NAME
#if defined(HAVE_REALPATH)
char fullpath[MAXPATHLEN];
#elif defined(MS_WINDOWS)
char fullpath[MAX_PATH];
#endif
+#endif
PyObject *av = makeargvobject(argc, argv);
PyObject *path = PySys_GetObject("path");
if (av == NULL)
@@ -1540,6 +1542,64 @@ PySys_SetArgv(int argc, char **argv)
char *p = NULL;
Py_ssize_t n = 0;
PyObject *a;
+#ifdef HAVE_CANONICALIZE_FILE_NAME
+ char *link = NULL, *argv0copy = NULL;
+
+ if (argc > 0 && argv0 != NULL) {
+
+ link = canonicalize_file_name(argv0);
+ if (link == NULL) {
+ link = strdup(argv0);
+ if (!link)
+ Py_FatalError("no mem for sys.argv");
+ }
+ }
+ if (link) {
+ if (link[0] == SEP) /* Link to absolute path */
+ argv0 = link;
+ else if (strchr(link, SEP) == NULL) {
+ /* Link without path */
+ /* strdup argv0 so we can free it
+ unconditionally */
+ argv0 = strdup(argv0);
+ if (!argv0)
+ Py_FatalError("no mem for sys.argv");
+ free(link);
+ } else {
+ /* Must join(dirname(argv0), link) */
+ char *q = strrchr(argv0, SEP);
+ if (q == NULL) /* argv0 without path */
+ argv0 = link;
+ else {
+ /* Must make a copy */
+ argv0copy = calloc(
+ strlen(link) + strlen(q) +1,
+ sizeof (char));
+ if (!argv0copy)
+ Py_FatalError("no mem for sys.argv");
+ strcpy(argv0copy, argv0);
+ q = strrchr(argv0copy, SEP);
+ strcpy(argv0copy+1, link);
+ argv0 = argv0copy;
+ p = NULL;
+ free(link);
+ }
+ }
+ }
+ if (argc > 0 && argv0 != NULL) {
+ char *q;
+ p = strrchr(argv0, SEP);
+ /* Test for alternate separator */
+ q = strrchr(p ? p : argv0, '/');
+ if (q != NULL)
+ p = q;
+ if (p != NULL) {
+ n = p + 1 - argv0;
+ if (n > 1 && p[-1] != ':')
+ n--; /* Drop trailing separator */
+ }
+ }
+#else /* ! HAVE_CANONICALIZE_FILE_NAME */
#ifdef HAVE_READLINK
char link[MAXPATHLEN+1];
char argv0copy[2*MAXPATHLEN+1];
@@ -1612,9 +1672,14 @@ PySys_SetArgv(int argc, char **argv)
#endif /* Unix */
}
#endif /* All others */
+#endif /* ! HAVE_CANONICALIZE_FILE_NAME */
a = PyString_FromStringAndSize(argv0, n);
if (a == NULL)
Py_FatalError("no mem for sys.path insertion");
+#ifdef HAVE_CANONICALIZE_FILE_NAME
+ if (argc > 0 && argv0 != NULL)
+ free(argv0);
+#endif /* HAVE_CANONICALIZE_FILE_NAME */
if (PyList_Insert(path, 0, a) < 0)
Py_FatalError("sys.path.insert(0) failed");
Py_DECREF(a);

View File

@ -0,0 +1,15 @@
diff -ru Python-2.6.2-orig/Lib/ctypes/util.py Python-2.6.2/Lib/ctypes/util.py
--- Python-2.6.2-orig/Lib/ctypes/util.py 2009-01-10 12:11:11.000000000 -0500
+++ Python-2.6.2/Lib/ctypes/util.py 2009-07-30 15:17:39.000000000 -0400
@@ -133,7 +133,9 @@
dump = f.read()
rv = f.close()
if rv == 10:
- raise OSError, 'objdump command not found'
+ return os.path.basename(f) # This is good for GLibc, I think,
+ # and a dep on binutils is big (for
+ # live CDs).
res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
if not res:
return None
Only in Python-2.6.2/Lib/ctypes: util.py~

View File

@ -1,30 +1,7 @@
diff -up Python-2.6/Include/pyexpat.h.rhconfig Python-2.6/Include/pyexpat.h
--- Python-2.6/Include/pyexpat.h.rhconfig 2006-06-19 19:21:25.000000000 -0400
+++ Python-2.6/Include/pyexpat.h 2008-11-24 02:00:47.000000000 -0500
@@ -5,6 +5,19 @@
#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0"
+#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
+#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
+typedef __int64 XML_Index;
+typedef unsigned __int64 XML_Size;
+#else
+typedef long long XML_Index;
+typedef unsigned long long XML_Size;
+#endif
+#else
+typedef long XML_Index;
+typedef unsigned long XML_Size;
+#endif /* XML_LARGE_SIZE */
+
struct PyExpat_CAPI
{
char* magic; /* set to PyExpat_CAPI_MAGIC */
diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
--- Python-2.6/Modules/Setup.dist.rhconfig 2008-09-21 03:31:52.000000000 -0400
+++ Python-2.6/Modules/Setup.dist 2008-11-24 02:03:41.000000000 -0500
@@ -152,7 +152,7 @@ GLHACK=-Dclear=__GLclear
diff -ru Python-2.6-orig Python-2.6
--- Python-2.6.2-orig/Modules/Setup.dist 2008-11-27 05:15:12.000000000 -0500
+++ Python-2.6.2/Modules/Setup.dist 2009-07-30 15:06:59.000000000 -0400
@@ -152,7 +152,7 @@
# modules are to be built as shared libraries (see above for more
# detail; also note that *static* reverses this effect):
@ -33,7 +10,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# GNU readline. Unlike previous Python incarnations, GNU readline is
# now incorporated in an optional module, configured in the Setup file
@@ -162,69 +162,69 @@ GLHACK=-Dclear=__GLclear
@@ -162,74 +162,74 @@
# it, depending on your system -- see the GNU readline instructions.
# It's okay for this to be a shared library, too.
@ -55,6 +32,11 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
-#_collections _collectionsmodule.c # Container types
-#itertools itertoolsmodule.c # Functions creating iterators for efficient looping
-#strop stropmodule.c # String manipulations
-#_functools _functoolsmodule.c # Tools for working with functions and callable objects
-#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
-#_pickle _pickle.c # pickle accelerator
-#datetime datetimemodule.c # date/time type
-#_bisect _bisectmodule.c # Bisection algorithms
+array arraymodule.c # array objects
+cmath cmathmodule.c # -lm # complex math library functions
+math mathmodule.c # -lm # math library functions, e.g. sin()
@ -67,6 +49,11 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
+_collections _collectionsmodule.c # Container types
+itertools itertoolsmodule.c # Functions creating iterators for efficient looping
+strop stropmodule.c # String manipulations
+_functools _functoolsmodule.c # Tools for working with functions and callable objects
+_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
+#_pickle _pickle.c # pickle accelerator
+#datetime datetimemodule.c # date/time type
+_bisect _bisectmodule.c # Bisection algorithms
-#unicodedata unicodedata.c # static Unicode character database
+unicodedata unicodedata.c # static Unicode character database
@ -132,7 +119,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# Multimedia modules -- off by default.
@@ -232,8 +232,8 @@ GLHACK=-Dclear=__GLclear
@@ -237,8 +237,8 @@
# #993173 says audioop works on 64-bit platforms, though.
# These represent audio samples or images as strings:
@ -143,7 +130,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# Note that the _md5 and _sha modules are normally only built if the
@@ -243,14 +243,14 @@ GLHACK=-Dclear=__GLclear
@@ -248,14 +248,14 @@
# Message-Digest Algorithm, described in RFC 1321. The necessary files
# md5.c and md5.h are included here.
@ -162,7 +149,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# SGI IRIX specific modules -- off by default.
@@ -297,12 +297,12 @@ GLHACK=-Dclear=__GLclear
@@ -302,12 +302,12 @@
# A Linux specific module -- off by default; this may also work on
# some *BSDs.
@ -177,7 +164,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# The _tkinter module.
@@ -317,7 +317,7 @@ GLHACK=-Dclear=__GLclear
@@ -322,7 +322,7 @@
# every system.
# *** Always uncomment this (leave the leading underscore in!):
@ -186,7 +173,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# *** 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:
@@ -327,7 +327,7 @@ GLHACK=-Dclear=__GLclear
@@ -332,7 +332,7 @@
# *** Or uncomment this for Solaris:
# -I/usr/openwin/include \
# *** Uncomment and edit for Tix extension only:
@ -195,7 +182,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# *** 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:
@@ -336,7 +336,7 @@ GLHACK=-Dclear=__GLclear
@@ -341,7 +341,7 @@
# *** Uncomment and edit for TOGL extension only:
# -DWITH_TOGL togl.c \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
@ -204,7 +191,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# *** Uncomment and edit to reflect where your X11 libraries are:
# -L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
@@ -346,7 +346,7 @@ GLHACK=-Dclear=__GLclear
@@ -351,7 +351,7 @@
# *** Uncomment for AIX:
# -lld \
# *** Always uncomment this; X11 libraries to link with:
@ -213,19 +200,19 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# Lance Ellinghaus's syslog module
#syslog syslogmodule.c # syslog daemon interface
@@ -358,9 +358,9 @@ GLHACK=-Dclear=__GLclear
@@ -363,9 +363,9 @@
#
# First, look at Setup.config; configure may have set this for you.
-#_curses _cursesmodule.c -lcurses -ltermcap
+_curses _cursesmodule.c -lncursesw
+_curses _cursesmodule.c -lcurses -ltermcap
# Wrapper for the panel library that's part of ncurses and SYSV curses.
-#_curses_panel _curses_panel.c -lpanel -lncurses
+_curses_panel _curses_panel.c -lpanel -lncursesw
+_curses_panel _curses_panel.c -lpanel -lncurses
# Generic (SunOS / SVR4) dynamic loading module.
@@ -368,7 +368,7 @@ GLHACK=-Dclear=__GLclear
@@ -373,7 +373,7 @@
# it is a highly experimental and dangerous device for calling
# *arbitrary* C functions in *arbitrary* shared libraries:
@ -234,17 +221,16 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# Modules that provide persistent dictionary-like semantics. You will
@@ -391,7 +391,7 @@ GLHACK=-Dclear=__GLclear
@@ -396,7 +396,7 @@
#
# 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 -I/usr/local/include -L/usr/local/lib -lgdbm
+gdbm gdbmmodule.c -lgdbm
# Sleepycat Berkeley DB interface.
@@ -406,11 +406,10 @@ GLHACK=-Dclear=__GLclear
#
@@ -412,10 +412,9 @@
# Edit the variables DB and DBLIBVERto point to the db top directory
# and the subdirectory of PORT where you built it.
-#DB=/usr/local/BerkeleyDB.4.0
@ -259,7 +245,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# Historical Berkeley DB 1.85
#
@@ -425,14 +424,14 @@ GLHACK=-Dclear=__GLclear
@@ -430,14 +429,14 @@
# Helper module for various ascii-encoders
@ -278,7 +264,7 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# Lee Busby's SIGFPE modules.
@@ -455,7 +454,7 @@ GLHACK=-Dclear=__GLclear
@@ -460,7 +459,7 @@
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.gzip.org/zlib/
@ -287,12 +273,12 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# Interface to the Expat XML parser
#
@@ -469,20 +468,20 @@ GLHACK=-Dclear=__GLclear
@@ -473,20 +472,20 @@
#
# More information on Expat can be found at www.libexpat.org.
#
#EXPAT_DIR=/usr/local/src/expat-1.95.2
-#pyexpat pyexpat.c -DHAVE_EXPAT_H -I$(EXPAT_DIR)/lib -L$(EXPAT_DIR) -lexpat
+pyexpat pyexpat.c -DHAVE_EXPAT_H -lexpat
-#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI
+pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI
# Hye-Shik Chang's CJKCodecs
@ -316,10 +302,9 @@ diff -up Python-2.6/Modules/Setup.dist.rhconfig Python-2.6/Modules/Setup.dist
# Example -- included for reference only:
# xx xxmodule.c
diff -up Python-2.6/setup.py.rhconfig Python-2.6/setup.py
--- Python-2.6/setup.py.rhconfig 2008-09-29 20:15:45.000000000 -0400
+++ Python-2.6/setup.py 2008-11-24 02:00:47.000000000 -0500
@@ -1189,7 +1189,6 @@ class PyBuildExt(build_ext):
--- Python-2.6.2-orig/setup.py 2009-07-30 14:56:58.000000000 -0400
+++ Python-2.6.2/setup.py 2009-07-30 15:07:39.000000000 -0400
@@ -1203,7 +1203,6 @@
exts.append(Extension('pyexpat',
define_macros = define_macros,
@ -327,7 +312,7 @@ diff -up Python-2.6/setup.py.rhconfig Python-2.6/setup.py
sources = ['pyexpat.c',
'expat/xmlparse.c',
'expat/xmlrole.c',
@@ -1204,7 +1203,6 @@ class PyBuildExt(build_ext):
@@ -1218,7 +1217,6 @@
define_macros.append(('USE_PYEXPAT_CAPI', None))
exts.append(Extension('_elementtree',
define_macros = define_macros,
@ -335,3 +320,4 @@ diff -up Python-2.6/setup.py.rhconfig Python-2.6/setup.py
sources = ['_elementtree.c'],
))
else:
Only in Python-2.6.2: setup.py~

View File

@ -21,25 +21,24 @@
Summary: An interpreted, interactive, object-oriented programming language
Name: %{python}
Version: 2.6
Release: 11%{?dist}
Version: 2.6.2
Release: 1%{?dist}
License: Python
Group: Development/Languages
Provides: python-abi = %{pybasever}
Provides: python(abi) = %{pybasever}
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
Patch0: python-2.6-config.patch
Patch0: python-2.6.2-config.patch
Patch1: Python-2.2.1-pydocnogui.patch
#Patch2: python-2.3.4-pydocnodoc.patch
Patch3: python-2.6-canonicalize.patch
Patch4: python-2.5-cflags.patch
#Patch5: python-2.5.1-ctypes-exec-stack.patch
Patch6: python-2.5.1-plural-fix.patch
Patch7: python-2.5.1-sqlite-encoding.patch
#Patch8: python-2.5-xmlrpclib-marshal-objects.patch
#Patch9: python-2.5-tkinter.patch
Patch10: python-2.5.2-binutils-no-dep.patch
Patch10: python-2.6.2-binutils-no-dep.patch
Patch11: python-2.5.1-codec-ascii-tolower.patch
#Patch12: python-2.5.1-pysqlite.patch
Patch13: python-2.5.1-socketmodule-constants.patch
@ -204,7 +203,6 @@ code that uses more than just unittest and/or test_support.py.
%patch0 -p1 -b .rhconfig
%patch1 -p1 -b .no_gui
#%%patch2 -p1 -b .no-doc
%patch3 -p1 -b .canonicalize
%patch4 -p1 -b .cflags
#%%patch5 -p1 -b .ctypesexec
%patch6 -p1 -b .plural
@ -540,6 +538,9 @@ rm -fr $RPM_BUILD_ROOT
%{_libdir}/python%{pybasever}/lib-dynload/_testcapimodule.so
%changelog
* Mon Jul 27 2009 James Antill <james.antill@redhat.com> - 2.6.2-1
- Update to 2.6.2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

View File

@ -1 +1 @@
837476958702cb386c657b5dba61cdc5 Python-2.6.tar.bz2
245db9f1e0f09ab7e0faaa0cf7301011 Python-2.6.2.tar.bz2