diff --git a/packages/lang/Python/package.mk b/packages/lang/Python/package.mk index 8fa6e9ad9f..2013e93d44 100644 --- a/packages/lang/Python/package.mk +++ b/packages/lang/Python/package.mk @@ -17,14 +17,14 @@ ################################################################################ PKG_NAME="Python" -PKG_VERSION="2.7.8" +PKG_VERSION="2.7.3" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.python.org/" PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS_HOST="zlib:host" -PKG_DEPENDS_TARGET="toolchain Python:host sqlite expat zlib bzip2 libressl libffi Python:host" +PKG_DEPENDS_TARGET="toolchain Python:host sqlite expat zlib bzip2 libressl libffi" PKG_PRIORITY="optional" PKG_SECTION="lang" PKG_SHORTDESC="python: The Python programming language" @@ -48,9 +48,6 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_file_dev_ptc=no \ ac_cv_buggy_getaddrinfo=no \ ac_cv_header_bluetooth_bluetooth_h=no \ ac_cv_header_bluetooth_h=no \ - ac_cv_file__dev_ptmx=no \ - ac_cv_file__dev_ptc=no \ - ac_cv_have_long_long_format=yes \ --with-threads \ --enable-unicode=ucs4 \ --enable-ipv6 \ @@ -75,6 +72,19 @@ make_host() { PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" } +make_target() { + make -j1 CC="$TARGET_CC" \ + HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \ + HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \ + BLDSHARED="$CC -shared" \ + RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/lib:$LD_LIBRARY_PATH" \ + PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ + CROSS_COMPILE="$TARGET_NAME" \ + CROSS_COMPILE_TARGET="yes" \ + PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \ + PYTHON_MODULES_LIB="$TARGET_LIBDIR" +} + makeinstall_host() { make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \ PYTHON_MODULES_LIB="$HOST_LIBDIR" \ @@ -82,42 +92,44 @@ makeinstall_host() { install cp Parser/pgen $ROOT/$TOOLCHAIN/bin -} -make_target() { - make -j1 CC="$TARGET_CC" \ - PYTHON_FOR_BUILD=$ROOT/$TOOLCHAIN/bin/python \ - HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \ - BLDSHARED="$CC -shared" \ - RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/lib:$LD_LIBRARY_PATH" \ - PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ - PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \ - PYTHON_MODULES_LIB="$TARGET_LIBDIR" +# replace python-config to make sure python uses $SYSROOT_PREFIX + mkdir -p $ROOT/$TOOLCHAIN/bin + rm -rf $ROOT/$TOOLCHAIN/bin/python*-config + + sed -e "s:%PREFIX%:$SYSROOT_PREFIX/usr:g" -e "s:%CFLAGS%:$TARGET_CFLAGS:g" \ + $PKG_DIR/scripts/python-config > $ROOT/$TOOLCHAIN/bin/python2.7-config + chmod +x $ROOT/$TOOLCHAIN/bin/python2.7-config + ln -s python2.7-config $ROOT/$TOOLCHAIN/bin/python-config } makeinstall_target() { make -j1 CC="$TARGET_CC" \ DESTDIR=$SYSROOT_PREFIX \ - PYTHON_FOR_BUILD=$ROOT/$TOOLCHAIN/bin/python \ + HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \ HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \ BLDSHARED="$CC -shared" \ RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/lib:$LD_LIBRARY_PATH" \ PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ + CROSS_COMPILE="$TARGET_NAME" \ + CROSS_COMPILE_TARGET="yes" \ PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \ PYTHON_MODULES_LIB="$TARGET_LIBDIR" \ install - # python distutils per default adds -L$LIBDIR when linking binary extensions +# python distutils per default adds -L$LIBDIR when linking binary extensions sed -e "s|^LIBDIR=.*|LIBDIR= $SYSROOT_PREFIX/usr/lib|" \ -i $SYSROOT_PREFIX/usr/lib/python*/config/Makefile make -j1 CC="$TARGET_CC" \ DESTDIR=$INSTALL \ - PYTHON_FOR_BUILD=$ROOT/$TOOLCHAIN/bin/python \ + HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \ HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \ BLDSHARED="$CC -shared" \ RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/lib:$LD_LIBRARY_PATH" \ PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ + CROSS_COMPILE="$TARGET_NAME" \ + CROSS_COMPILE_TARGET="yes" \ PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \ PYTHON_MODULES_LIB="$TARGET_LIBDIR" \ install @@ -138,7 +150,6 @@ post_makeinstall_target() { rm -rf $INSTALL/usr/lib/python*/config/makesetup rm -rf $INSTALL/usr/lib/python*/config/python.o - # TODO remove ? if [ ! -f $INSTALL/usr/lib/python*/lib-dynload/_socket.so ]; then echo "sometimes Python dont build '_socket.so' for some reasons and continues without failing," echo "let it fail here, to be sure '_socket.so' will be installed. A rebuild of Python fixes" diff --git a/packages/lang/Python/patches/Python-2.7.3-001_xcompile.patch b/packages/lang/Python/patches/Python-2.7.3-001_xcompile.patch new file mode 100644 index 0000000000..b443eeac5c --- /dev/null +++ b/packages/lang/Python/patches/Python-2.7.3-001_xcompile.patch @@ -0,0 +1,135 @@ +diff -Naur Python-2.7.3/configure Python-2.7.3.patch/configure +--- Python-2.7.3/configure 2012-04-10 01:07:36.000000000 +0200 ++++ Python-2.7.3.patch/configure 2012-04-16 14:27:58.161470960 +0200 +@@ -13697,7 +13697,7 @@ + $as_echo_n "(cached) " >&6 + else + if test "$cross_compiling" = yes; then : +- ac_cv_have_long_long_format=no ++ ac_cv_have_long_long_format="cross -- assuming yes" + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -13749,7 +13749,7 @@ + $as_echo "$ac_cv_have_long_long_format" >&6; } + fi + +-if test "$ac_cv_have_long_long_format" = yes ++if test "$ac_cv_have_long_long_format" != no + then + + $as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h +diff -Naur Python-2.7.3/Makefile.pre.in Python-2.7.3.patch/Makefile.pre.in +--- Python-2.7.3/Makefile.pre.in 2012-04-10 01:07:33.000000000 +0200 ++++ Python-2.7.3.patch/Makefile.pre.in 2012-04-16 14:30:27.753099115 +0200 +@@ -182,6 +182,7 @@ + + PYTHON= python$(EXE) + BUILDPYTHON= python$(BUILDEXE) ++HOSTPYTHON= ./$(BUILDPYTHON) + + # The task to run while instrument when building the profile-opt target + PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck +@@ -215,6 +216,8 @@ + # Parser + PGEN= Parser/pgen$(EXE) + ++HOSTPGEN= $(PGEN) ++ + POBJS= \ + Parser/acceler.o \ + Parser/grammar1.o \ +@@ -408,8 +411,8 @@ + # Build the shared modules + sharedmods: $(BUILDPYTHON) + @case $$MAKEFLAGS in \ +- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ +- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ ++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ ++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ + esac + + # Build static library +@@ -543,7 +546,7 @@ + $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp + Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT) + -@$(INSTALL) -d Include +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + -touch Parser/pgen.stamp + + $(PGEN): $(PGENOBJS) +@@ -938,26 +941,26 @@ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi +- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) +- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ ++ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ ++ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" ++ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" + + # Create the PLATDIR source directory, if one wasn't distributed.. + $(srcdir)/Lib/$(PLATDIR): +@@ -1062,7 +1065,9 @@ + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods +- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ ++ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ ++ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ ++ --skip-build \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +diff -Naur Python-2.7.3/setup.py Python-2.7.3.patch/setup.py +--- Python-2.7.3/setup.py 2012-04-10 01:07:36.000000000 +0200 ++++ Python-2.7.3.patch/setup.py 2012-04-16 14:27:58.164471010 +0200 +@@ -23,6 +23,10 @@ + # This global variable is used to hold the list of modules to be disabled. + disabled_module_list = [] + ++# _ctypes fails to cross-compile due to the libffi configure script. ++#if os.environ.has_key('PYTHONXCPREFIX'): ++# disabled_module_list.append('_ctypes') ++ + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (at the front) if + 1) 'dir' is not already in 'dirlist' +@@ -278,6 +282,14 @@ + (ext.name, sys.exc_info()[1])) + self.failed.append(ext.name) + return ++ ++ # Inport check will not work when cross-compiling. ++ if os.environ.has_key('PYTHONXCPREFIX'): ++ self.announce( ++ 'WARNING: skipping inport check for cross-compiled: "%s"' % ++ ext.name) ++ return ++ + # Workaround for Mac OS X: The Carbon-based modules cannot be + # reliably imported into a command-line Python + if 'Carbon' in ext.extra_link_args: diff --git a/packages/lang/Python/patches/Python-2.7.8-002_xcompile_path.patch b/packages/lang/Python/patches/Python-2.7.3-002_xcompile_path-0.1.patch similarity index 64% rename from packages/lang/Python/patches/Python-2.7.8-002_xcompile_path.patch rename to packages/lang/Python/patches/Python-2.7.3-002_xcompile_path-0.1.patch index ec45bb80a4..dfcd9b621a 100644 --- a/packages/lang/Python/patches/Python-2.7.8-002_xcompile_path.patch +++ b/packages/lang/Python/patches/Python-2.7.3-002_xcompile_path-0.1.patch @@ -1,17 +1,13 @@ -diff --git a/setup.py b/setup.py -index d6ef5be..7a0d8f2 100644 ---- a/setup.py -+++ b/setup.py -@@ -439,13 +439,19 @@ class PyBuildExt(build_ext): +diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py +--- Python-2.7.2/setup.py 2011-10-25 14:07:59.520264628 +0200 ++++ Python-2.7.2.patch/setup.py 2011-10-25 14:16:32.218793079 +0200 +@@ -380,10 +380,19 @@ os.unlink(tmpfile) def detect_modules(self): - # Ensure that /usr/local is always used -- if not cross_compiling: -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -- if cross_compiling: -- self.add_gcc_paths() +- 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() + try: + modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split() @@ -29,7 +25,7 @@ index d6ef5be..7a0d8f2 100644 # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. -@@ -481,17 +487,6 @@ class PyBuildExt(build_ext): +@@ -419,17 +428,6 @@ for directory in reversed(options.dirs): add_dir_to_list(dir_list, directory) @@ -47,3 +43,17 @@ index d6ef5be..7a0d8f2 100644 try: have_unicode = unicode except NameError: +@@ -438,11 +436,8 @@ + # lib_dirs and inc_dirs are used to search for files; + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. +- lib_dirs = self.compiler.library_dirs + [ +- '/lib64', '/usr/lib64', +- '/lib', '/usr/lib', +- ] +- inc_dirs = self.compiler.include_dirs + ['/usr/include'] ++ lib_dirs = self.compiler.library_dirs ++ inc_dirs = self.compiler.include_dirs + exts = [] + missing = [] + diff --git a/packages/lang/Python/patches/Python-2.7.3-003_xcompile_disable_modules_and_ssl-0.1.patch b/packages/lang/Python/patches/Python-2.7.3-003_xcompile_disable_modules_and_ssl-0.1.patch new file mode 100644 index 0000000000..89df2beedb --- /dev/null +++ b/packages/lang/Python/patches/Python-2.7.3-003_xcompile_disable_modules_and_ssl-0.1.patch @@ -0,0 +1,38 @@ +diff -Naur Python-2.6.6/setup.py Python-2.6.6.patch/setup.py +--- Python-2.6.6/setup.py 2010-11-03 00:17:10.403608974 +0100 ++++ Python-2.6.6.patch/setup.py 2010-11-03 00:23:31.624025348 +0100 +@@ -18,7 +18,14 @@ + from distutils.spawn import find_executable + + # This global variable is used to hold the list of modules to be disabled. +-disabled_module_list = [] ++try: ++ disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split() ++except KeyError: ++ disabled_module_list = [] ++try: ++ disable_ssl = os.environ["PYTHON_DISABLE_SSL"] ++except KeyError: ++ disable_ssl = 0 + + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (at the front) if +@@ -361,6 +368,8 @@ + return sys.platform + + def detect_modules(self): ++ global disable_ssl ++ + try: + modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split() + except KeyError: +@@ -714,7 +723,8 @@ + ] ) + + if (ssl_incs is not None and +- ssl_libs is not None): ++ ssl_libs is not None and ++ not disable_ssl): + exts.append( Extension('_ssl', ['_ssl.c'], + include_dirs = ssl_incs, + library_dirs = ssl_libs, diff --git a/packages/lang/Python/patches/Python-2.7.8-004_xcompile_fix_libffi_configure.patch b/packages/lang/Python/patches/Python-2.7.3-004_xcompile_fix_libffi_configure-0.1.patch similarity index 67% rename from packages/lang/Python/patches/Python-2.7.8-004_xcompile_fix_libffi_configure.patch rename to packages/lang/Python/patches/Python-2.7.3-004_xcompile_fix_libffi_configure-0.1.patch index ff9f3fa03d..670cb900fa 100644 --- a/packages/lang/Python/patches/Python-2.7.8-004_xcompile_fix_libffi_configure.patch +++ b/packages/lang/Python/patches/Python-2.7.3-004_xcompile_fix_libffi_configure-0.1.patch @@ -1,11 +1,11 @@ -diff --git a/setup.py b/setup.py -index 07af0b6..6426b22 100644 ---- a/setup.py -+++ b/setup.py -@@ -2030,10 +2030,18 @@ class PyBuildExt(build_ext): - if not self.verbose: - config_args.append("-q") - +diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py +--- Python-2.7.2/setup.py 2011-10-26 01:53:16.014387508 +0200 ++++ Python-2.7.2.patch/setup.py 2011-10-26 02:20:08.236706196 +0200 +@@ -1877,12 +1877,18 @@ + ffi_configfile): + from distutils.dir_util import mkpath + mkpath(ffi_builddir) +- config_args = [] + + #NOTE: best solution is to add to configure script + # as config subdirectory and to exclude darwin @@ -13,7 +13,7 @@ index 07af0b6..6426b22 100644 + #FIXME: lets for now pass all top configure arguments + #and do not modify configure script. + config_args = sysconfig.get_config_var("CONFIG_ARGS") -+ + # Pass empty CFLAGS because we'll just append the resulting # CFLAGS to Python's; -g or -O2 is to be avoided. cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ diff --git a/packages/lang/Python/patches/Python-2.7.3-005_dont_generate_pyo_and_pyc_files-0.1.patch b/packages/lang/Python/patches/Python-2.7.3-005_dont_generate_pyo_and_pyc_files-0.1.patch new file mode 100644 index 0000000000..00b2fb1eb6 --- /dev/null +++ b/packages/lang/Python/patches/Python-2.7.3-005_dont_generate_pyo_and_pyc_files-0.1.patch @@ -0,0 +1,28 @@ +diff -Naur Python-2.7.3/Makefile.pre.in Python-2.7.3.patch/Makefile.pre.in +--- Python-2.7.3/Makefile.pre.in 2012-04-16 14:49:16.353716188 +0200 ++++ Python-2.7.3.patch/Makefile.pre.in 2012-04-16 14:50:03.740554039 +0200 +@@ -941,24 +941,6 @@ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ +- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ +- $(DESTDIR)$(LIBDEST) +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST) -f \ +- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ +- $(DESTDIR)$(LIBDEST) +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ +- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ +- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" + diff --git a/packages/lang/Python/patches/Python-2.7.3-008-reread-environment.patch b/packages/lang/Python/patches/Python-2.7.3-008-reread-environment.patch new file mode 100644 index 0000000000..53482a7f1d --- /dev/null +++ b/packages/lang/Python/patches/Python-2.7.3-008-reread-environment.patch @@ -0,0 +1,37 @@ +diff -Naur Python-2.7.2/Makefile.pre.in Python-2.7.2.patch/Makefile.pre.in +--- Python-2.7.2/Makefile.pre.in 2011-10-26 01:53:09.752305358 +0200 ++++ Python-2.7.2.patch/Makefile.pre.in 2011-10-26 01:57:20.158587315 +0200 +@@ -410,8 +410,8 @@ + # Build the shared modules + sharedmods: $(BUILDPYTHON) + @case $$MAKEFLAGS in \ +- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ +- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ ++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' CONFIG_ARGS="$(CONFIG_ARGS)" $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ ++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' CONFIG_ARGS="$(CONFIG_ARGS)" $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ + esac + + # Build static library +@@ -1053,7 +1053,7 @@ + # This goes into $(exec_prefix) + sharedinstall: sharedmods + CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ +- $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ ++ $(RUNSHARED) CONFIG_ARGS="$(CONFIG_ARGS)" $(HOSTPYTHON) -E $(srcdir)/setup.py install \ + --skip-build \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ +diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py +--- Python-2.7.2/setup.py 2011-10-26 01:53:16.014387508 +0200 ++++ Python-2.7.2.patch/setup.py 2011-10-26 01:53:46.158782904 +0200 +@@ -20,6 +20,9 @@ + # Were we compiled --with-pydebug or with #define Py_DEBUG? + COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') + ++sysconfig.get_config_vars() ++sysconfig._CONFIG_VARS.update(os.environ) ++ + # This global variable is used to hold the list of modules to be disabled. + try: + disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split() +diff -Naur Python-2.7.2/setup.py.orig Python-2.7.2.patch/setup.py.orig diff --git a/packages/lang/Python/patches/Python-2.7.8-009-distutils-rpath.patch b/packages/lang/Python/patches/Python-2.7.3-009-distutils-rpath.patch similarity index 69% rename from packages/lang/Python/patches/Python-2.7.8-009-distutils-rpath.patch rename to packages/lang/Python/patches/Python-2.7.3-009-distutils-rpath.patch index 2da6af4f07..f1565076c5 100644 --- a/packages/lang/Python/patches/Python-2.7.8-009-distutils-rpath.patch +++ b/packages/lang/Python/patches/Python-2.7.3-009-distutils-rpath.patch @@ -1,8 +1,7 @@ -diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py -index 2aa1cb1..529e2d4 100644 ---- a/Lib/distutils/unixccompiler.py -+++ b/Lib/distutils/unixccompiler.py -@@ -83,6 +83,16 @@ class UnixCCompiler(CCompiler): +diff -up Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath Python-2.6.4/Lib/distutils/unixccompiler.py +--- Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath 2009-09-09 04:34:06.000000000 -0400 ++++ Python-2.6.4/Lib/distutils/unixccompiler.py 2010-03-15 21:33:25.000000000 -0400 +@@ -142,6 +142,16 @@ class UnixCCompiler(CCompiler): if sys.platform == "cygwin": exe_extension = ".exe" diff --git a/packages/lang/Python/patches/Python-2.7.8-010-change-pyconfig-h-location.patch b/packages/lang/Python/patches/Python-2.7.3-010-change-pyconfig-h-location.patch similarity index 100% rename from packages/lang/Python/patches/Python-2.7.8-010-change-pyconfig-h-location.patch rename to packages/lang/Python/patches/Python-2.7.3-010-change-pyconfig-h-location.patch diff --git a/packages/lang/Python/patches/Python-2.7.8-015_no_static_lib.patch b/packages/lang/Python/patches/Python-2.7.3-015_no_static_lib.patch similarity index 74% rename from packages/lang/Python/patches/Python-2.7.8-015_no_static_lib.patch rename to packages/lang/Python/patches/Python-2.7.3-015_no_static_lib.patch index 2a381d54f5..30fa25be21 100644 --- a/packages/lang/Python/patches/Python-2.7.8-015_no_static_lib.patch +++ b/packages/lang/Python/patches/Python-2.7.3-015_no_static_lib.patch @@ -1,8 +1,7 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 918f210..eb9ee6b 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -438,7 +438,7 @@ coverage: +diff -Naur Python-2.7.2/Makefile.pre.in Python-2.7.2.patch/Makefile.pre.in +--- Python-2.7.2/Makefile.pre.in 2011-10-25 16:20:40.178698198 +0200 ++++ Python-2.7.2.patch/Makefile.pre.in 2011-10-25 16:22:33.429160448 +0200 +@@ -398,7 +398,7 @@ # Build the interpreter @@ -11,9 +10,9 @@ index 918f210..eb9ee6b 100644 $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ Modules/python.o \ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -@@ -465,18 +465,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build +@@ -414,18 +414,6 @@ + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ + esac -# Build static library -# avoid long command lines, same as LIBRARY_OBJS @@ -30,7 +29,7 @@ index 918f210..eb9ee6b 100644 libpython$(VERSION).so: $(LIBRARY_OBJS) if test $(INSTSONAME) != $(LDLIBRARY); then \ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ -@@ -1090,18 +1078,6 @@ libainstall: all python-config +@@ -997,18 +985,6 @@ else true; \ fi; \ done @@ -49,3 +48,4 @@ index 918f210..eb9ee6b 100644 $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in +diff -Naur Python-2.7.2/Makefile.pre.in.orig Python-2.7.2.patch/Makefile.pre.in.orig diff --git a/packages/lang/Python/patches/Python-2.7.3-016-default-is-optimized.patch b/packages/lang/Python/patches/Python-2.7.3-016-default-is-optimized.patch new file mode 100644 index 0000000000..5131e0ba69 --- /dev/null +++ b/packages/lang/Python/patches/Python-2.7.3-016-default-is-optimized.patch @@ -0,0 +1,18 @@ +# When compiling for an embedded system, we need every bit of +# performance we can get. default to optimized with the option +# of opt-out. +# Signed-Off: Michael 'Mickey' Lauer + +Index: Python-2.6.1/Python/compile.c +=================================================================== +--- Python-2.6.1.orig/Python/compile.c ++++ Python-2.6.1/Python/compile.c +@@ -32,7 +32,7 @@ + #include "symtable.h" + #include "opcode.h" + +-int Py_OptimizeFlag = 0; ++int Py_OptimizeFlag = 1; + + #define DEFAULT_BLOCK_SIZE 16 + #define DEFAULT_BLOCKS 8 diff --git a/packages/lang/Python/patches/Python-2.7.3-020-use_our_opts.patch b/packages/lang/Python/patches/Python-2.7.3-020-use_our_opts.patch new file mode 100644 index 0000000000..7e69e83841 --- /dev/null +++ b/packages/lang/Python/patches/Python-2.7.3-020-use_our_opts.patch @@ -0,0 +1,34 @@ +diff -Naur Python-2.7.3/configure Python-2.7.3.patch/configure +--- Python-2.7.3/configure 2012-04-10 01:07:36.000000000 +0200 ++++ Python-2.7.3.patch/configure 2012-07-28 04:48:41.720322418 +0200 +@@ -5425,11 +5425,11 @@ + # debug builds. + OPT="-g -O0 -Wall $STRICT_PROTO" + else +- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" ++ OPT="-g $WRAP $STRICT_PROTO" + fi + ;; + *) +- OPT="-O3 -Wall $STRICT_PROTO" ++ OPT="$STRICT_PROTO" + ;; + esac + case $ac_sys_system in +diff -Naur Python-2.7.3/configure.in Python-2.7.3.patch/configure.in +--- Python-2.7.3/configure.in 2012-04-10 01:07:36.000000000 +0200 ++++ Python-2.7.3.patch/configure.in 2012-07-28 04:48:22.987067842 +0200 +@@ -946,11 +946,11 @@ + # debug builds. + OPT="-g -O0 -Wall $STRICT_PROTO" + else +- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" ++ OPT="-g $WRAP $STRICT_PROTO" + fi + ;; + *) +- OPT="-O3 -Wall $STRICT_PROTO" ++ OPT="$STRICT_PROTO" + ;; + esac + case $ac_sys_system in diff --git a/packages/lang/Python/patches/Python-2.7.8-001_xcompile.patch b/packages/lang/Python/patches/Python-2.7.8-001_xcompile.patch deleted file mode 100644 index d9b11d3c6a..0000000000 --- a/packages/lang/Python/patches/Python-2.7.8-001_xcompile.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in -index bcd83bf..5e54a0d 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -191,6 +191,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ - - PYTHON= python$(EXE) - BUILDPYTHON= python$(BUILDEXE) -+HOSTPYTHON= ./$(BUILDPYTHON) - - PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ - _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@ -@@ -231,6 +232,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ - ########################################################################## - # Parser - PGEN= Parser/pgen$(EXE) -+HOSTPGEN= $(PGEN) - - PSRCS= \ - Parser/acceler.c \ -@@ -461,6 +463,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt - esac; \ - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ -+ PYTHONXCPREFIX='$(DESTDIR)$(prefix)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - - # Build static library -@@ -598,7 +601,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule - $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) - @$(MKDIR_P) Include - $(MAKE) $(PGEN) -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) - $(MAKE) $(GRAMMAR_H) - touch $(GRAMMAR_C) -@@ -1142,7 +1145,9 @@ libainstall: all python-config - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -+ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ -+ --skip-build \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -diff --git a/setup.py b/setup.py -index a46bf35..528e9df 100644 ---- a/setup.py -+++ b/setup.py -@@ -292,6 +292,14 @@ class PyBuildExt(build_ext): - (ext.name, sys.exc_info()[1])) - self.failed.append(ext.name) - return -+ -+ # Inport check will not work when cross-compiling. -+ if os.environ.has_key('PYTHONXCPREFIX'): -+ self.announce( -+ 'WARNING: skipping inport check for cross-compiled: "%s"' % -+ ext.name) -+ return -+ - # Workaround for Mac OS X: The Carbon-based modules cannot be - # reliably imported into a command-line Python - if 'Carbon' in ext.extra_link_args: diff --git a/packages/lang/Python/patches/Python-2.7.8-003_xcompile_disable_modules.patch b/packages/lang/Python/patches/Python-2.7.8-003_xcompile_disable_modules.patch deleted file mode 100644 index 72ebaf3d85..0000000000 --- a/packages/lang/Python/patches/Python-2.7.8-003_xcompile_disable_modules.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/setup.py b/setup.py -index a46bf35..d6ef5be 100644 ---- a/setup.py -+++ b/setup.py -@@ -33,7 +33,10 @@ host_platform = get_platform() - COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) - - # This global variable is used to hold the list of modules to be disabled. --disabled_module_list = [] -+try: -+ disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split() -+except KeyError: -+ disabled_module_list = [] - - def add_dir_to_list(dirlist, dir): - """Add the directory 'dir' to the list 'dirlist' (at the front) if diff --git a/packages/lang/Python/patches/Python-2.7.8-005_dont_generate_pyo_and_pyc_files.patch b/packages/lang/Python/patches/Python-2.7.8-005_dont_generate_pyo_and_pyc_files.patch deleted file mode 100644 index 862e3dfd47..0000000000 --- a/packages/lang/Python/patches/Python-2.7.8-005_dont_generate_pyo_and_pyc_files.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in -index 918f210..c82366c 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1011,24 +1011,6 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ - $(DESTDIR)$(LIBDEST)/distutils/tests ; \ - fi -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST) -f \ -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -- $(DESTDIR)$(LIBDEST) -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ diff --git a/packages/lang/Python/patches/Python-2.7.8-008-reread-environment.patch b/packages/lang/Python/patches/Python-2.7.8-008-reread-environment.patch deleted file mode 100644 index 0de2346b9a..0000000000 --- a/packages/lang/Python/patches/Python-2.7.8-008-reread-environment.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in -index bf3aed7..7ff5c79 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -464,6 +464,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - PYTHONXCPREFIX='$(DESTDIR)$(prefix)' \ -+ CONFIG_ARGS="$(CONFIG_ARGS)" \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - - libpython$(VERSION).so: $(LIBRARY_OBJS) -@@ -1104,6 +1105,7 @@ libainstall: all python-config - # This goes into $(exec_prefix) - sharedinstall: sharedmods - CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ CONFIG_ARGS="$(CONFIG_ARGS)" \ - $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ - --skip-build \ - --prefix=$(prefix) \ -diff --git a/setup.py b/setup.py -index 6426b22..d2776dd 100644 ---- a/setup.py -+++ b/setup.py -@@ -32,6 +32,9 @@ host_platform = get_platform() - # Were we compiled --with-pydebug or with #define Py_DEBUG? - COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) - -+sysconfig.get_config_vars() -+sysconfig._CONFIG_VARS.update(os.environ) -+ - # This global variable is used to hold the list of modules to be disabled. - try: - disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split() diff --git a/packages/lang/Python/patches/Python-2.7.8-016-default-is-optimized.patch b/packages/lang/Python/patches/Python-2.7.8-016-default-is-optimized.patch deleted file mode 100644 index c15125c03e..0000000000 --- a/packages/lang/Python/patches/Python-2.7.8-016-default-is-optimized.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Python/compile.c b/Python/compile.c -index 1cf53f9..25665b5 100644 ---- a/Python/compile.c -+++ b/Python/compile.c -@@ -32,7 +32,7 @@ - #include "symtable.h" - #include "opcode.h" - --int Py_OptimizeFlag = 0; -+int Py_OptimizeFlag = 1; - - #define DEFAULT_BLOCK_SIZE 16 - #define DEFAULT_BLOCKS 8 diff --git a/packages/lang/Python/patches/Python-2.7.8-020-remove_RAND-egd-support.patch b/packages/lang/Python/patches/Python-remove_RAND-egd-support.patch similarity index 68% rename from packages/lang/Python/patches/Python-2.7.8-020-remove_RAND-egd-support.patch rename to packages/lang/Python/patches/Python-remove_RAND-egd-support.patch index 50f8f85e46..93c7dc8f86 100644 --- a/packages/lang/Python/patches/Python-2.7.8-020-remove_RAND-egd-support.patch +++ b/packages/lang/Python/patches/Python-remove_RAND-egd-support.patch @@ -1,8 +1,7 @@ -diff --git a/Lib/socket.py b/Lib/socket.py -index aac04f6..02aa293 100644 ---- a/Lib/socket.py -+++ b/Lib/socket.py -@@ -67,7 +67,6 @@ else: +diff -Naur Python-2.7.3/Lib/socket.py Python-2.7.3.patch/Lib/socket.py +--- Python-2.7.3/Lib/socket.py 2012-04-10 01:07:31.000000000 +0200 ++++ Python-2.7.3.patch/Lib/socket.py 2014-07-18 04:33:44.132850756 +0200 +@@ -67,7 +67,6 @@ from _ssl import SSLError as sslerror from _ssl import \ RAND_add, \ @@ -10,11 +9,10 @@ index aac04f6..02aa293 100644 RAND_status, \ SSL_ERROR_ZERO_RETURN, \ SSL_ERROR_WANT_READ, \ -diff --git a/Lib/ssl.py b/Lib/ssl.py -index 666cea3..64e196a 100644 ---- a/Lib/ssl.py -+++ b/Lib/ssl.py -@@ -62,7 +62,7 @@ import _ssl # if we can't import it, let the error propagate +diff -Naur Python-2.7.3/Lib/ssl.py Python-2.7.3.patch/Lib/ssl.py +--- Python-2.7.3/Lib/ssl.py 2012-04-10 01:07:31.000000000 +0200 ++++ Python-2.7.3.patch/Lib/ssl.py 2014-07-18 05:06:34.938100455 +0200 +@@ -62,7 +62,7 @@ from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION from _ssl import SSLError from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED @@ -23,11 +21,10 @@ index 666cea3..64e196a 100644 from _ssl import \ SSL_ERROR_ZERO_RETURN, \ SSL_ERROR_WANT_READ, \ -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index 752b033..9541df7 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -1601,32 +1601,6 @@ Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n\ +diff -Naur Python-2.7.3/Modules/_ssl.c Python-2.7.3.patch/Modules/_ssl.c +--- Python-2.7.3/Modules/_ssl.c 2012-04-10 01:07:33.000000000 +0200 ++++ Python-2.7.3.patch/Modules/_ssl.c 2014-07-18 04:37:28.324453450 +0200 +@@ -1531,32 +1531,6 @@ It is necessary to seed the PRNG with RAND_add() on some platforms before\n\ using the ssl() function."); @@ -55,12 +52,12 @@ index 752b033..9541df7 100644 -\n\ -Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\ -Returns number of bytes read. Raises SSLError if connection to EGD\n\ --fails or if it does not provide enough data to seed PRNG."); +-fails or if it does provide enough data to seed PRNG."); - - #endif /* HAVE_OPENSSL_RAND */ + #endif - -@@ -1640,8 +1614,6 @@ static PyMethodDef PySSL_methods[] = { + /* List of functions exported by this module. */ +@@ -1569,8 +1543,6 @@ #ifdef HAVE_OPENSSL_RAND {"RAND_add", PySSL_RAND_add, METH_VARARGS, PySSL_RAND_add_doc},