Update to 2.7.12
This commit is contained in:
parent
20f301a645
commit
31c533489b
|
@ -0,0 +1,15 @@
|
|||
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
|
||||
index b2c514d..d92af0c 100644
|
||||
--- a/Lib/ctypes/util.py
|
||||
+++ b/Lib/ctypes/util.py
|
||||
@@ -139,7 +139,9 @@ elif os.name == "posix":
|
||||
finally:
|
||||
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]+)', dump)
|
||||
if not res:
|
||||
return None
|
|
@ -1,6 +1,7 @@
|
|||
diff -up Python-2.7.6/Lib/distutils/command/install.py.lib64 Python-2.7.6/Lib/distutils/command/install.py
|
||||
--- Python-2.7.6/Lib/distutils/command/install.py.lib64 2013-11-10 08:36:40.000000000 +0100
|
||||
+++ Python-2.7.6/Lib/distutils/command/install.py 2014-01-29 13:51:19.779590378 +0100
|
||||
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
|
||||
index b9f1c6c..7b23714 100644
|
||||
--- a/Lib/distutils/command/install.py
|
||||
+++ b/Lib/distutils/command/install.py
|
||||
@@ -42,14 +42,14 @@ else:
|
||||
INSTALL_SCHEMES = {
|
||||
'unix_prefix': {
|
||||
|
@ -18,10 +19,11 @@ diff -up Python-2.7.6/Lib/distutils/command/install.py.lib64 Python-2.7.6/Lib/di
|
|||
'headers': '$base/include/python/$dist_name',
|
||||
'scripts': '$base/bin',
|
||||
'data' : '$base',
|
||||
diff -up Python-2.7.6/Lib/distutils/sysconfig.py.lib64 Python-2.7.6/Lib/distutils/sysconfig.py
|
||||
--- Python-2.7.6/Lib/distutils/sysconfig.py.lib64 2013-11-10 08:36:40.000000000 +0100
|
||||
+++ Python-2.7.6/Lib/distutils/sysconfig.py 2014-01-29 13:51:19.779590378 +0100
|
||||
@@ -119,8 +119,12 @@ def get_python_lib(plat_specific=0, stan
|
||||
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||
index 068d1ba..3e7f077 100644
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -119,8 +119,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
||||
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
||||
|
||||
if os.name == "posix":
|
||||
|
@ -35,9 +37,10 @@ diff -up Python-2.7.6/Lib/distutils/sysconfig.py.lib64 Python-2.7.6/Lib/distutil
|
|||
if standard_lib:
|
||||
return libpython
|
||||
else:
|
||||
diff -up Python-2.7.6/Lib/site.py.lib64 Python-2.7.6/Lib/site.py
|
||||
--- Python-2.7.6/Lib/site.py.lib64 2013-11-10 08:36:40.000000000 +0100
|
||||
+++ Python-2.7.6/Lib/site.py 2014-01-29 13:51:19.779590378 +0100
|
||||
diff --git a/Lib/site.py b/Lib/site.py
|
||||
index e8433b4..e8e6b50 100644
|
||||
--- a/Lib/site.py
|
||||
+++ b/Lib/site.py
|
||||
@@ -288,12 +288,16 @@ def getsitepackages():
|
||||
if sys.platform in ('os2emx', 'riscos'):
|
||||
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
|
||||
|
@ -55,10 +58,11 @@ diff -up Python-2.7.6/Lib/site.py.lib64 Python-2.7.6/Lib/site.py
|
|||
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
||||
if sys.platform == "darwin":
|
||||
# for framework builds *only* we add the standard Apple
|
||||
diff -up Python-2.7.6/Lib/test/test_site.py.lib64 Python-2.7.6/Lib/test/test_site.py
|
||||
--- Python-2.7.6/Lib/test/test_site.py.lib64 2013-11-10 08:36:40.000000000 +0100
|
||||
+++ Python-2.7.6/Lib/test/test_site.py 2014-01-29 13:51:19.780590315 +0100
|
||||
@@ -241,17 +241,20 @@ class HelperFunctionsTests(unittest.Test
|
||||
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
|
||||
index 78c4809..3b9e74d 100644
|
||||
--- a/Lib/test/test_site.py
|
||||
+++ b/Lib/test/test_site.py
|
||||
@@ -246,17 +246,20 @@ class HelperFunctionsTests(unittest.TestCase):
|
||||
self.assertEqual(dirs[2], wanted)
|
||||
elif os.sep == '/':
|
||||
# OS X non-framwework builds, Linux, FreeBSD, etc
|
||||
|
@ -70,7 +74,7 @@ diff -up Python-2.7.6/Lib/test/test_site.py.lib64 Python-2.7.6/Lib/test/test_sit
|
|||
self.assertEqual(dirs[0], wanted)
|
||||
- wanted = os.path.join('xoxo', 'lib', 'site-python')
|
||||
+ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
||||
+ 'site-packages')
|
||||
+ 'site-packages')
|
||||
self.assertEqual(dirs[1], wanted)
|
||||
+ wanted = os.path.join('xoxo', 'lib', 'site-python')
|
||||
+ self.assertEqual(dirs[2], wanted)
|
||||
|
@ -83,10 +87,11 @@ diff -up Python-2.7.6/Lib/test/test_site.py.lib64 Python-2.7.6/Lib/test/test_sit
|
|||
self.assertEqual(dirs[1], wanted)
|
||||
|
||||
class PthFile(object):
|
||||
diff -up Python-2.7.6/Makefile.pre.in.lib64 Python-2.7.6/Makefile.pre.in
|
||||
--- Python-2.7.6/Makefile.pre.in.lib64 2014-01-29 13:51:19.773590757 +0100
|
||||
+++ Python-2.7.6/Makefile.pre.in 2014-01-29 13:51:19.780590315 +0100
|
||||
@@ -106,7 +106,7 @@ LIBDIR= @libdir@
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 5741a4c..0faa5c5 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -111,7 +111,7 @@ LIBDIR= @libdir@
|
||||
MANDIR= @mandir@
|
||||
INCLUDEDIR= @includedir@
|
||||
CONFINCLUDEDIR= $(exec_prefix)/include
|
||||
|
@ -95,9 +100,10 @@ diff -up Python-2.7.6/Makefile.pre.in.lib64 Python-2.7.6/Makefile.pre.in
|
|||
|
||||
# Detailed destination directories
|
||||
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
||||
diff -up Python-2.7.6/Modules/Setup.dist.lib64 Python-2.7.6/Modules/Setup.dist
|
||||
--- Python-2.7.6/Modules/Setup.dist.lib64 2014-01-29 13:51:19.768591073 +0100
|
||||
+++ Python-2.7.6/Modules/Setup.dist 2014-01-29 13:51:19.781590252 +0100
|
||||
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
|
||||
index c70a0d6..051fd41 100644
|
||||
--- a/Modules/Setup.dist
|
||||
+++ b/Modules/Setup.dist
|
||||
@@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm
|
||||
# Edit the variables DB and DBLIBVERto point to the db top directory
|
||||
# and the subdirectory of PORT where you built it.
|
||||
|
@ -116,21 +122,11 @@ diff -up Python-2.7.6/Modules/Setup.dist.lib64 Python-2.7.6/Modules/Setup.dist
|
|||
|
||||
# Interface to the Expat XML parser
|
||||
#
|
||||
diff -up Python-2.7.6/Modules/getpath.c.lib64 Python-2.7.6/Modules/getpath.c
|
||||
--- Python-2.7.6/Modules/getpath.c.lib64 2013-11-10 08:36:41.000000000 +0100
|
||||
+++ Python-2.7.6/Modules/getpath.c 2014-01-29 13:51:19.781590252 +0100
|
||||
@@ -117,8 +117,8 @@
|
||||
#endif
|
||||
|
||||
#ifndef PYTHONPATH
|
||||
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
|
||||
- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
|
||||
+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
|
||||
+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
|
||||
#endif
|
||||
|
||||
#ifndef LANDMARK
|
||||
@@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1];
|
||||
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
||||
index 428684c..9ef6711 100644
|
||||
--- a/Modules/getpath.c
|
||||
+++ b/Modules/getpath.c
|
||||
@@ -108,7 +108,7 @@ static char prefix[MAXPATHLEN+1];
|
||||
static char exec_prefix[MAXPATHLEN+1];
|
||||
static char progpath[MAXPATHLEN+1];
|
||||
static char *module_search_path = NULL;
|
||||
|
@ -139,16 +135,7 @@ diff -up Python-2.7.6/Modules/getpath.c.lib64 Python-2.7.6/Modules/getpath.c
|
|||
|
||||
static void
|
||||
reduce(char *dir)
|
||||
@@ -543,7 +543,7 @@ calculate_path(void)
|
||||
}
|
||||
else
|
||||
strncpy(zip_path, PREFIX, MAXPATHLEN);
|
||||
- joinpath(zip_path, "lib/python00.zip");
|
||||
+ joinpath(zip_path, "lib64/python00.zip");
|
||||
bufsz = strlen(zip_path); /* Replace "00" with version */
|
||||
zip_path[bufsz - 6] = VERSION[0];
|
||||
zip_path[bufsz - 5] = VERSION[2];
|
||||
@@ -553,7 +553,7 @@ calculate_path(void)
|
||||
@@ -550,7 +550,7 @@ calculate_path(void)
|
||||
fprintf(stderr,
|
||||
"Could not find platform dependent libraries <exec_prefix>\n");
|
||||
strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
|
||||
|
@ -157,10 +144,11 @@ diff -up Python-2.7.6/Modules/getpath.c.lib64 Python-2.7.6/Modules/getpath.c
|
|||
}
|
||||
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
||||
|
||||
diff -up Python-2.7.6/setup.py.lib64 Python-2.7.6/setup.py
|
||||
--- Python-2.7.6/setup.py.lib64 2013-11-10 08:36:41.000000000 +0100
|
||||
+++ Python-2.7.6/setup.py 2014-01-29 13:56:02.713716528 +0100
|
||||
@@ -438,7 +438,7 @@ class PyBuildExt(build_ext):
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 55c4f5d..19efe82 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
if not cross_compiling:
|
||||
|
@ -169,7 +157,7 @@ diff -up Python-2.7.6/setup.py.lib64 Python-2.7.6/setup.py
|
|||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
if cross_compiling:
|
||||
self.add_gcc_paths()
|
||||
@@ -758,11 +758,11 @@ class PyBuildExt(build_ext):
|
||||
@@ -782,11 +782,11 @@ class PyBuildExt(build_ext):
|
||||
elif curses_library:
|
||||
readline_libs.append(curses_library)
|
||||
elif self.compiler.find_library_file(lib_dirs +
|
||||
|
@ -183,7 +171,7 @@ diff -up Python-2.7.6/setup.py.lib64 Python-2.7.6/setup.py
|
|||
extra_link_args=readline_extra_link_args,
|
||||
libraries=readline_libs) )
|
||||
else:
|
||||
@@ -797,8 +797,8 @@ class PyBuildExt(build_ext):
|
||||
@@ -821,8 +821,8 @@ class PyBuildExt(build_ext):
|
||||
if krb5_h:
|
||||
ssl_incs += krb5_h
|
||||
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
|
@ -1,19 +1,20 @@
|
|||
diff -up Python-2.7.6/Lib/distutils/command/build_ext.py.debug-build Python-2.7.6/Lib/distutils/command/build_ext.py
|
||||
--- Python-2.7.6/Lib/distutils/command/build_ext.py.debug-build 2013-11-10 08:36:40.000000000 +0100
|
||||
+++ Python-2.7.6/Lib/distutils/command/build_ext.py 2014-01-29 14:13:08.815888533 +0100
|
||||
@@ -674,7 +674,10 @@ class build_ext (Command):
|
||||
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
|
||||
index 3a49454..07fd2ae 100644
|
||||
--- a/Lib/distutils/command/build_ext.py
|
||||
+++ b/Lib/distutils/command/build_ext.py
|
||||
@@ -676,7 +676,10 @@ class build_ext (Command):
|
||||
so_ext = get_config_var('SO')
|
||||
if os.name == 'nt' and self.debug:
|
||||
return os.path.join(*ext_path) + '_d' + so_ext
|
||||
- return os.path.join(*ext_path) + so_ext
|
||||
+
|
||||
+
|
||||
+ # Similarly, extensions in debug mode are named 'module_d.so', to
|
||||
+ # avoid adding the _d to the SO config variable:
|
||||
+ return os.path.join(*ext_path) + (sys.pydebug and "_d" or "") + so_ext
|
||||
|
||||
def get_export_symbols (self, ext):
|
||||
"""Return the list of symbols that a shared extension has to
|
||||
@@ -759,6 +762,8 @@ class build_ext (Command):
|
||||
@@ -761,6 +764,8 @@ class build_ext (Command):
|
||||
template = "python%d.%d"
|
||||
pythonlib = (template %
|
||||
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
|
||||
|
@ -22,20 +23,21 @@ diff -up Python-2.7.6/Lib/distutils/command/build_ext.py.debug-build Python-2.7.
|
|||
return ext.libraries + [pythonlib]
|
||||
else:
|
||||
return ext.libraries
|
||||
diff -up Python-2.7.6/Lib/distutils/sysconfig.py.debug-build Python-2.7.6/Lib/distutils/sysconfig.py
|
||||
--- Python-2.7.6/Lib/distutils/sysconfig.py.debug-build 2014-01-29 14:13:08.770891379 +0100
|
||||
+++ Python-2.7.6/Lib/distutils/sysconfig.py 2014-01-29 14:13:08.815888533 +0100
|
||||
@@ -90,7 +90,8 @@ def get_python_inc(plat_specific=0, pref
|
||||
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||
index 068d1ba..031f809 100644
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -90,7 +90,8 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||
# Include is located in the srcdir
|
||||
inc_dir = os.path.join(srcdir, "Include")
|
||||
return inc_dir
|
||||
- return os.path.join(prefix, "include", "python" + get_python_version())
|
||||
+ return os.path.join(prefix, "include",
|
||||
+ "python" + get_python_version() + (sys.pydebug and '-debug' or ''))
|
||||
+ "python" + get_python_version() + (sys.pydebug and '-debug' or ''))
|
||||
elif os.name == "nt":
|
||||
return os.path.join(prefix, "include")
|
||||
elif os.name == "os2":
|
||||
@@ -247,7 +248,7 @@ def get_makefile_filename():
|
||||
@@ -244,7 +245,7 @@ def get_makefile_filename():
|
||||
if python_build:
|
||||
return os.path.join(project_base, "Makefile")
|
||||
lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
|
||||
|
@ -44,9 +46,10 @@ diff -up Python-2.7.6/Lib/distutils/sysconfig.py.debug-build Python-2.7.6/Lib/di
|
|||
|
||||
|
||||
def parse_config_h(fp, g=None):
|
||||
diff -up Python-2.7.6/Lib/distutils/tests/test_install.py.debug-build Python-2.7.6/Lib/distutils/tests/test_install.py
|
||||
--- Python-2.7.6/Lib/distutils/tests/test_install.py.debug-build 2014-01-29 14:13:08.779890810 +0100
|
||||
+++ Python-2.7.6/Lib/distutils/tests/test_install.py 2014-01-29 14:13:08.815888533 +0100
|
||||
diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
|
||||
index 78fac46..d1d0931 100644
|
||||
--- a/Lib/distutils/tests/test_install.py
|
||||
+++ b/Lib/distutils/tests/test_install.py
|
||||
@@ -20,8 +20,9 @@ from distutils.tests import support
|
||||
|
||||
|
||||
|
@ -54,14 +57,15 @@ diff -up Python-2.7.6/Lib/distutils/tests/test_install.py.debug-build Python-2.7
|
|||
- if os.name == 'nt' and sys.executable.endswith('_d.exe'):
|
||||
+ if sys.pydebug:
|
||||
modname += '_d'
|
||||
+
|
||||
+
|
||||
return modname + sysconfig.get_config_var('SO')
|
||||
|
||||
|
||||
diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
||||
--- Python-2.7.6/Makefile.pre.in.debug-build 2014-01-29 14:13:08.800889482 +0100
|
||||
+++ Python-2.7.6/Makefile.pre.in 2014-01-29 14:17:30.929316462 +0100
|
||||
@@ -111,8 +111,8 @@ SCRIPTDIR= $(prefix)/lib64
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 5741a4c..d13ba40 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -116,8 +116,8 @@ SCRIPTDIR= $(prefix)/lib
|
||||
# Detailed destination directories
|
||||
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
||||
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
|
||||
|
@ -72,7 +76,7 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
LIBP= $(LIBDIR)/python$(VERSION)
|
||||
|
||||
# Symbols used for using shared libraries
|
||||
@@ -126,6 +126,12 @@ DESTSHARED= $(BINLIBDEST)/lib-dynload
|
||||
@@ -131,6 +131,12 @@ DESTSHARED= $(BINLIBDEST)/lib-dynload
|
||||
EXE= @EXEEXT@
|
||||
BUILDEXE= @BUILDEXEEXT@
|
||||
|
||||
|
@ -85,7 +89,7 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
# Short name and location for Mac OS X Python framework
|
||||
UNIVERSALSDK=@UNIVERSALSDK@
|
||||
PYTHONFRAMEWORK= @PYTHONFRAMEWORK@
|
||||
@@ -189,8 +195,8 @@ LIBOBJDIR= Python/
|
||||
@@ -197,8 +203,8 @@ LIBOBJDIR= Python/
|
||||
LIBOBJS= @LIBOBJS@
|
||||
UNICODE_OBJS= @UNICODE_OBJS@
|
||||
|
||||
|
@ -94,9 +98,9 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
+PYTHON= python$(DEBUG_SUFFIX)$(EXE)
|
||||
+BUILDPYTHON= python$(DEBUG_SUFFIX)$(BUILDEXE)
|
||||
|
||||
cross_compiling=@cross_compiling@
|
||||
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
|
||||
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
|
||||
@@ -464,7 +470,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.tx
|
||||
@@ -549,7 +555,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
|
||||
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
|
||||
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
|
||||
|
||||
|
@ -105,7 +109,7 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
||||
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
||||
$(LN) -f $(INSTSONAME) $@; \
|
||||
@@ -856,18 +862,18 @@ bininstall: altbininstall
|
||||
@@ -979,18 +985,18 @@ bininstall: altbininstall
|
||||
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
|
||||
else true; \
|
||||
fi
|
||||
|
@ -135,7 +139,7 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
|
||||
# Install the interpreter with $(VERSION) affixed
|
||||
# This goes into $(exec_prefix)
|
||||
@@ -880,7 +886,7 @@ altbininstall: $(BUILDPYTHON)
|
||||
@@ -1003,7 +1009,7 @@ altbininstall: $(BUILDPYTHON)
|
||||
else true; \
|
||||
fi; \
|
||||
done
|
||||
|
@ -144,7 +148,7 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
if test -f $(LDLIBRARY); then \
|
||||
if test -n "$(DLLLIBRARY)" ; then \
|
||||
$(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
|
||||
@@ -1046,10 +1052,11 @@ $(srcdir)/Lib/$(PLATDIR):
|
||||
@@ -1173,10 +1179,11 @@ $(srcdir)/Lib/$(PLATDIR):
|
||||
fi; \
|
||||
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
|
||||
|
||||
|
@ -154,11 +158,11 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
# is not available in configure
|
||||
- sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
|
||||
+ sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(DEBUG_SUFFIX)$(EXE)," < $(srcdir)/Misc/python-config.in >python$(DEBUG_SUFFIX)-config
|
||||
+
|
||||
+
|
||||
|
||||
# Install the include files
|
||||
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
|
||||
@@ -1070,13 +1077,13 @@ inclinstall:
|
||||
@@ -1197,13 +1204,13 @@ inclinstall:
|
||||
$(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
|
||||
|
||||
# Install the library and miscellaneous stuff needed for extending/embedding
|
||||
|
@ -175,7 +179,7 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
|
||||
do \
|
||||
if test ! -d $(DESTDIR)$$i; then \
|
||||
@@ -1092,11 +1099,10 @@ libainstall: all python-config
|
||||
@@ -1219,11 +1226,10 @@ libainstall: all python-config
|
||||
$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
|
||||
$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
|
||||
$(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
|
||||
|
@ -189,10 +193,11 @@ diff -up Python-2.7.6/Makefile.pre.in.debug-build Python-2.7.6/Makefile.pre.in
|
|||
@if [ -s Modules/python.exp -a \
|
||||
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
|
||||
echo; echo "Installing support files for building shared extension modules on AIX:"; \
|
||||
diff -up Python-2.7.6/Misc/python-config.in.debug-build Python-2.7.6/Misc/python-config.in
|
||||
--- Python-2.7.6/Misc/python-config.in.debug-build 2013-11-10 08:36:41.000000000 +0100
|
||||
+++ Python-2.7.6/Misc/python-config.in 2014-01-29 14:13:08.816888470 +0100
|
||||
@@ -45,7 +45,7 @@ for opt in opt_flags:
|
||||
diff --git a/Misc/python-config.in b/Misc/python-config.in
|
||||
index a09e07c..c1691ef 100644
|
||||
--- a/Misc/python-config.in
|
||||
+++ b/Misc/python-config.in
|
||||
@@ -44,7 +44,7 @@ for opt in opt_flags:
|
||||
print ' '.join(flags)
|
||||
|
||||
elif opt in ('--libs', '--ldflags'):
|
||||
|
@ -201,9 +206,10 @@ diff -up Python-2.7.6/Misc/python-config.in.debug-build Python-2.7.6/Misc/python
|
|||
libs += getvar('LIBS').split()
|
||||
libs += getvar('SYSLIBS').split()
|
||||
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
|
||||
diff -up Python-2.7.6/Modules/makesetup.debug-build Python-2.7.6/Modules/makesetup
|
||||
--- Python-2.7.6/Modules/makesetup.debug-build 2013-11-10 08:36:41.000000000 +0100
|
||||
+++ Python-2.7.6/Modules/makesetup 2014-01-29 14:13:08.817888407 +0100
|
||||
diff --git a/Modules/makesetup b/Modules/makesetup
|
||||
index 8862c36..0d4ae4e 100755
|
||||
--- a/Modules/makesetup
|
||||
+++ b/Modules/makesetup
|
||||
@@ -233,7 +233,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
||||
*$mod.o*) base=$mod;;
|
||||
*) base=${mod}module;;
|
||||
|
@ -213,10 +219,11 @@ diff -up Python-2.7.6/Modules/makesetup.debug-build Python-2.7.6/Modules/makeset
|
|||
case $doconfig in
|
||||
no) SHAREDMODS="$SHAREDMODS $file";;
|
||||
esac
|
||||
diff -up Python-2.7.6/Python/dynload_shlib.c.debug-build Python-2.7.6/Python/dynload_shlib.c
|
||||
--- Python-2.7.6/Python/dynload_shlib.c.debug-build 2013-11-10 08:36:41.000000000 +0100
|
||||
+++ Python-2.7.6/Python/dynload_shlib.c 2014-01-29 14:13:08.817888407 +0100
|
||||
@@ -46,11 +46,16 @@ const struct filedescr _PyImport_DynLoad
|
||||
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
|
||||
index 17ebab1..02a94aa 100644
|
||||
--- a/Python/dynload_shlib.c
|
||||
+++ b/Python/dynload_shlib.c
|
||||
@@ -46,11 +46,16 @@ const struct filedescr _PyImport_DynLoadFiletab[] = {
|
||||
{"module.exe", "rb", C_EXTENSION},
|
||||
{"MODULE.EXE", "rb", C_EXTENSION},
|
||||
#else
|
||||
|
@ -236,26 +243,28 @@ diff -up Python-2.7.6/Python/dynload_shlib.c.debug-build Python-2.7.6/Python/dyn
|
|||
{0, 0}
|
||||
};
|
||||
|
||||
diff -up Python-2.7.6/Python/sysmodule.c.debug-build Python-2.7.6/Python/sysmodule.c
|
||||
--- Python-2.7.6/Python/sysmodule.c.debug-build 2013-11-10 08:36:41.000000000 +0100
|
||||
+++ Python-2.7.6/Python/sysmodule.c 2014-01-29 14:13:08.817888407 +0100
|
||||
@@ -1506,6 +1506,12 @@ _PySys_Init(void)
|
||||
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
|
||||
index 609578b..6ee9639 100644
|
||||
--- a/Python/sysmodule.c
|
||||
+++ b/Python/sysmodule.c
|
||||
@@ -1577,6 +1577,12 @@ _PySys_Init(void)
|
||||
PyString_FromString("legacy"));
|
||||
#endif
|
||||
|
||||
+#ifdef Py_DEBUG
|
||||
+ PyDict_SetItemString(sysdict, "pydebug", Py_True);
|
||||
+ PyDict_SetItemString(sysdict, "pydebug", Py_True);
|
||||
+#else
|
||||
+ PyDict_SetItemString(sysdict, "pydebug", Py_False);
|
||||
+ PyDict_SetItemString(sysdict, "pydebug", Py_False);
|
||||
+#endif
|
||||
+
|
||||
#undef SET_SYS_FROM_STRING
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
diff -up Python-2.7.6/configure.ac.debug-build Python-2.7.6/configure.ac
|
||||
--- Python-2.7.6/configure.ac.debug-build 2014-01-29 14:13:08.796889735 +0100
|
||||
+++ Python-2.7.6/configure.ac 2014-01-29 14:13:08.814888597 +0100
|
||||
@@ -738,7 +738,7 @@ AC_SUBST(LIBRARY)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cce1be7..acb496b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -761,7 +761,7 @@ AC_SUBST(LIBRARY)
|
||||
AC_MSG_CHECKING(LIBRARY)
|
||||
if test -z "$LIBRARY"
|
||||
then
|
||||
|
@ -264,7 +273,7 @@ diff -up Python-2.7.6/configure.ac.debug-build Python-2.7.6/configure.ac
|
|||
fi
|
||||
AC_MSG_RESULT($LIBRARY)
|
||||
|
||||
@@ -884,8 +884,8 @@ if test $enable_shared = "yes"; then
|
||||
@@ -907,8 +907,8 @@ if test $enable_shared = "yes"; then
|
||||
INSTSONAME="$LDLIBRARY".$SOVERSION
|
||||
;;
|
||||
Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
|
||||
|
@ -275,7 +284,7 @@ diff -up Python-2.7.6/configure.ac.debug-build Python-2.7.6/configure.ac
|
|||
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
||||
case $ac_sys_system in
|
||||
FreeBSD*)
|
||||
@@ -1028,6 +1028,14 @@ else AC_MSG_RESULT(no); Py_DEBUG='false'
|
||||
@@ -1051,6 +1051,14 @@ else AC_MSG_RESULT(no); Py_DEBUG='false'
|
||||
fi],
|
||||
[AC_MSG_RESULT(no)])
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
--- Python-2.7.2/Lib/test/test_sys.py.mark-tests-that-fail-in-rpmbuild 2011-09-08 18:02:31.627362039 -0400
|
||||
+++ Python-2.7.2/Lib/test/test_sys.py 2011-09-08 18:15:29.450308851 -0400
|
||||
@@ -734,6 +734,11 @@ class SizeofTest(unittest.TestCase):
|
||||
# (PyTypeObject + PyNumberMethods + PyMappingMethods +
|
||||
# PySequenceMethods + PyBufferProcs)
|
||||
s = vsize('P2P15Pl4PP9PP11PI') + struct.calcsize('41P 10P 3P 6P')
|
||||
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
|
||||
index 0dd4258..d9b3267 100644
|
||||
--- a/Lib/test/test_sys.py
|
||||
+++ b/Lib/test/test_sys.py
|
||||
@@ -769,6 +769,11 @@ class SizeofTest(unittest.TestCase):
|
||||
'10P' # PySequenceMethods
|
||||
'6P' # PyBufferProcs
|
||||
'2P')
|
||||
+
|
||||
+ # COUNT_ALLOCS adds further fields to the end of a PyTypeObject:
|
||||
+ if hasattr(sys, 'getcounts'):
|
||||
|
|
|
@ -1,23 +1,5 @@
|
|||
--- Lib/test/test_gdb.py.old 2012-04-11 21:04:01.367073855 -0400
|
||||
+++ Lib/test/test_gdb.py 2012-04-12 08:52:58.320288761 -0400
|
||||
@@ -96,6 +96,15 @@ class DebuggerTests(unittest.TestCase):
|
||||
# Generate a list of commands in gdb's language:
|
||||
commands = ['set breakpoint pending yes',
|
||||
'break %s' % breakpoint,
|
||||
+
|
||||
+ # GDB as of Fedora 17 onwards can distinguish between the
|
||||
+ # value of a variable at entry vs current value:
|
||||
+ # http://sourceware.org/gdb/onlinedocs/gdb/Variables.html
|
||||
+ # which leads to the selftests failing with errors like this:
|
||||
+ # AssertionError: 'v@entry=()' != '()'
|
||||
+ # Disable this:
|
||||
+ 'set print entry-values no',
|
||||
+
|
||||
|
||||
# The tests assume that the first frame of printed
|
||||
# backtrace will not contain program counter,
|
||||
--- Lib/test/test_gdb.py.old 2012-04-11 21:04:01.367073855 -0400
|
||||
+++ Lib/test/test_gdb.py 2012-04-12 08:52:58.320288761 -0400
|
||||
@@ -144,6 +153,10 @@
|
||||
'Missing separate debuginfo for ',
|
||||
'Try: zypper install -C ',
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
diff -up Python-2.7rc1/Lib/ctypes/util.py.binutils-no-dep Python-2.7rc1/Lib/ctypes/util.py
|
||||
--- Python-2.7rc1/Lib/ctypes/util.py.binutils-no-dep 2010-03-15 09:42:23.000000000 -0400
|
||||
+++ Python-2.7rc1/Lib/ctypes/util.py 2010-06-06 05:03:02.155975210 -0400
|
||||
@@ -140,7 +140,9 @@ elif os.name == "posix":
|
||||
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).
|
||||
f = os.popen(cmd)
|
||||
try:
|
||||
data = f.read()
|
32
python.spec
32
python.spec
|
@ -107,8 +107,8 @@
|
|||
Summary: An interpreted, interactive, object-oriented programming language
|
||||
Name: %{python}
|
||||
# Remember to also rebase python-docs when changing this:
|
||||
Version: 2.7.11
|
||||
Release: 8%{?dist}
|
||||
Version: 2.7.12
|
||||
Release: 1%{?dist}
|
||||
License: Python
|
||||
Group: Development/Languages
|
||||
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
|
||||
|
@ -316,7 +316,7 @@ Patch7: python-2.5.1-sqlite-encoding.patch
|
|||
# SONAME from a library; we avoid this, apparently to minimize space
|
||||
# requirements on the live CD:
|
||||
# (rhbz:307221)
|
||||
Patch10: python-2.7rc1-binutils-no-dep.patch
|
||||
Patch10: 00010-2.7.12-binutils-no-dep.patch
|
||||
|
||||
# Upstream as of Python 2.7.3:
|
||||
# Patch11: python-2.7rc1-codec-ascii-tolower.patch
|
||||
|
@ -352,7 +352,7 @@ Patch55: 00055-systemtap.patch
|
|||
# and add the /usr/lib64/pythonMAJOR.MINOR/site-packages to sitedirs, in front of
|
||||
# /usr/lib/pythonMAJOR.MINOR/site-packages
|
||||
# Not upstream
|
||||
Patch102: python-2.7.3-lib64.patch
|
||||
Patch102: 00102-2.7.12-lib64.patch
|
||||
|
||||
# Python 2.7 split out much of the path-handling from distutils/sysconfig.py to
|
||||
# a new sysconfig.py (in r77704).
|
||||
|
@ -433,7 +433,7 @@ Patch111: 00111-no-static-lib.patch
|
|||
#
|
||||
# See also patch 130 below
|
||||
#
|
||||
Patch112: python-2.7.3-debug-build.patch
|
||||
Patch112: 00112-2.7.12-debug-build.patch
|
||||
|
||||
|
||||
# 00113 #
|
||||
|
@ -712,7 +712,10 @@ Patch165: 00165-crypt-module-salt-backport.patch
|
|||
# a frame can't be read from the inferior process (rhbz#912025)
|
||||
#
|
||||
# Not yet sent upstream
|
||||
Patch166: 00166-fix-fake-repr-in-gdb-hooks.patch
|
||||
# This issue seems to have been fixed most probably by https://bugs.python.org/issue26799
|
||||
# as of Python 2.7.12 and test_gdb seems to fail with the patch applied
|
||||
# so dropping it for now.
|
||||
#Patch166: 00166-fix-fake-repr-in-gdb-hooks.patch
|
||||
|
||||
# 00167 #
|
||||
# Don't run any of the stack navigation tests in test_gdb when Python is
|
||||
|
@ -918,7 +921,7 @@ Patch200: 00200-skip-thread-test.patch
|
|||
# https://hg.python.org/cpython/rev/2edbdb79cd6d
|
||||
# Fix possible integer overflow and heap corruption in zipimporter.get_data()
|
||||
# FIXED UPSTREAM: https://bugs.python.org/issue26171
|
||||
Patch209: 00209-CVE-2016-5636-buffer-overflow-in-zipimport-module-fix.patch
|
||||
#Patch209: 00209-CVE-2016-5636-buffer-overflow-in-zipimport-module-fix.patch
|
||||
|
||||
# 00210 #
|
||||
# CVE-2016-0772 python: smtplib StartTLS stripping attack
|
||||
|
@ -926,12 +929,12 @@ Patch209: 00209-CVE-2016-5636-buffer-overflow-in-zipimport-module-fix.patch
|
|||
# rhbz#1346344: https://bugzilla.redhat.com/show_bug.cgi?id=1346344
|
||||
# FIXED UPSTREAM: https://hg.python.org/cpython/rev/b3ce713fb9be
|
||||
# Raise an error when STARTTLS fails
|
||||
Patch210: 00210-Raise-an-error-when-STARTTLS-fails.patch
|
||||
# Patch210: 00210-Raise-an-error-when-STARTTLS-fails.patch
|
||||
|
||||
# 00211 #
|
||||
# Fix test breakage with version 2.2.0 of Expat
|
||||
# rhbz#1353919: https://bugzilla.redhat.com/show_bug.cgi?id=1353919
|
||||
# NOT YET FIXED UPSTREAM: http://bugs.python.org/issue27369
|
||||
# FIXED UPSTREAM: http://bugs.python.org/issue27369
|
||||
Patch211: 00211-fix-test-pyexpat-failure.patch
|
||||
|
||||
# (New patches go here ^^^)
|
||||
|
@ -1264,7 +1267,7 @@ done
|
|||
# 00164: not for python 2 yet
|
||||
%patch165 -p1
|
||||
mv Modules/cryptmodule.c Modules/_cryptmodule.c
|
||||
%patch166 -p1
|
||||
# 00166: dropped as of Python 2.7.12
|
||||
%patch167 -p1
|
||||
%patch168 -p1
|
||||
%patch169 -p1
|
||||
|
@ -1298,8 +1301,8 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
|
|||
%patch198 -p1
|
||||
%endif
|
||||
%patch200 -p1
|
||||
%patch209 -p1
|
||||
%patch210 -p1
|
||||
# 00209: upstream as of Python 2.7.12
|
||||
# 00210: upstream as of Python 2.7.12
|
||||
%patch211 -p1
|
||||
|
||||
|
||||
|
@ -2152,6 +2155,11 @@ rm -fr %{buildroot}
|
|||
# ======================================================
|
||||
|
||||
%changelog
|
||||
* Fri Jul 15 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.7.12-1
|
||||
- Update to 2.7.12
|
||||
- Refactored patches: 10, 102, 112, 134, 153
|
||||
- Dropped patches: 166, 209, 210
|
||||
|
||||
* Fri Jul 08 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.7.11-8
|
||||
- Refactor patch for properly fixing CVE-2016-5636
|
||||
|
||||
|
|
Loading…
Reference in New Issue