From 02ad9c19154973f0d8550ae542c63b436645ad91 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 15 Oct 2014 10:13:07 +0300 Subject: [PATCH] python: upgrade to version 2.7.8 --- lang/python/Makefile | 41 +++---- lang/python/files/config.site | 11 ++ lang/python/files/python-package.mk | 4 +- lang/python/patches/000-cross-compile.patch | 112 ------------------ .../020-dont-compile-python-files.patch | 33 ------ .../patches/030-fixup-include-dirs.patch | 50 -------- ...0-dont-import-cross-compiled-modules.patch | 43 ------- .../patches/070-dont-clean-ipkg-install.patch | 23 ---- .../080-distutils-dont_adjust_files.patch | 63 ---------- lang/python/patches/110-enable-zlib.patch | 14 ++- ...0-force-internal-modules-for-hashlib.patch | 25 ---- lang/python/patches/130-readline-setup.patch | 36 ------ .../patches/140-verbose-sharedmods.patch | 11 -- lang/python/patches/150-no-sqlite-rpath.patch | 10 -- 14 files changed, 39 insertions(+), 437 deletions(-) create mode 100644 lang/python/files/config.site delete mode 100644 lang/python/patches/000-cross-compile.patch delete mode 100644 lang/python/patches/020-dont-compile-python-files.patch delete mode 100644 lang/python/patches/030-fixup-include-dirs.patch delete mode 100644 lang/python/patches/040-dont-import-cross-compiled-modules.patch delete mode 100644 lang/python/patches/070-dont-clean-ipkg-install.patch delete mode 100644 lang/python/patches/080-distutils-dont_adjust_files.patch delete mode 100644 lang/python/patches/120-force-internal-modules-for-hashlib.patch delete mode 100644 lang/python/patches/130-readline-setup.patch delete mode 100644 lang/python/patches/140-verbose-sharedmods.patch delete mode 100644 lang/python/patches/150-no-sqlite-rpath.patch diff --git a/lang/python/Makefile b/lang/python/Makefile index eb0210a23a..58b11a1966 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -12,11 +12,11 @@ include ./files/python-package.mk PKG_NAME:=python PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION) -PKG_MD5SUM:=62c4c1699170078c469f79ddfed21bc0 +PKG_MD5SUM:=d235bdfa75b8396942e360a70487ee00 PKG_LICENSE:=PSF PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE @@ -142,8 +142,7 @@ MAKE_FLAGS:=\ CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \ LDFLAGS="$(TARGET_LDFLAGS)" \ LD="$(TARGET_CC)" \ - HOSTPYTHON=./hostpython \ - HOSTPGEN=./hostpgen + PGEN=pgen2 ENABLE_IPV6:= ifeq ($(CONFIG_IPV6),y) @@ -153,22 +152,17 @@ endif define Build/Configure -$(MAKE) -C $(PKG_BUILD_DIR) distclean (cd $(PKG_BUILD_DIR); autoreconf --force --install || exit 0) - # The python executable needs to stay in the rootdir since its location will - # be used to compute the path of the config files. - $(CP) $(STAGING_DIR_HOST)/bin/pgen $(PKG_BUILD_DIR)/hostpgen - $(CP) $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION) $(PKG_BUILD_DIR)/hostpython + $(CP) ./files/config.site $(PKG_BUILD_DIR) $(call Build/Configure/Default, \ --sysconfdir=/etc \ --disable-shared \ --without-cxx-main \ --with-threads \ --with-system-ffi="$(STAGING_DIR)/usr" \ + --without-ensurepip \ + --without-pymalloc \ $(ENABLE_IPV6) \ - ac_cv_have_chflags=no \ - ac_cv_have_lchflags=no \ - ac_cv_py_format_size_t=no \ - ac_cv_have_long_long_format=yes \ - ac_cv_buggy_getaddrinfo=no \ + CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \ OPT="$(TARGET_CFLAGS)" \ ) endef @@ -188,20 +182,10 @@ define Build/InstallDev $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \ $(1)/usr/lib/python$(PYTHON_VERSION)/ - $(CP) \ - $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION) \ - $(1)/usr/bin/hostpython - (cd $(2)/bin; \ - $(LN) ../../usr/bin/hostpython python$(PYTHON_VERSION); \ - $(LN) python$(PYTHON_VERSION) python) - $(CP) \ $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION)-config \ $(2)/bin/ $(SED) 's,^#!.*,#!/usr/bin/env python$(PYTHON_VERSION),g' $(2)/bin/python$(PYTHON_VERSION)-config - - (cd $(2)/bin; \ - $(LN) python$(PYTHON_VERSION)-config python-config;) endef define PyPackage/python-full/filespec @@ -464,7 +448,12 @@ define Host/Configure rm -rf config.cache; \ CONFIG_SITE= \ OPT="$(HOST_CFLAGS)" \ - ./configure --without-cxx-main --with-threads --prefix=$(STAGING_DIR_HOST); \ + ./configure \ + --without-cxx-main \ + --without-ensurepip \ + --without-pymalloc \ + --with-threads \ + --prefix=$(STAGING_DIR_HOST); \ ) endef @@ -472,16 +461,14 @@ define Host/Compile +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ python Parser/pgen +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ - HOSTPYTHON=$(HOST_BUILD_DIR)/python \ sharedmods endef define Host/Install $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ $(MAKE) -C $(HOST_BUILD_DIR) \ - HOSTPYTHON=$(HOST_BUILD_DIR)/python \ install - $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2 endef diff --git a/lang/python/files/config.site b/lang/python/files/config.site new file mode 100644 index 0000000000..8f7a3f9816 --- /dev/null +++ b/lang/python/files/config.site @@ -0,0 +1,11 @@ +#! /bin/sh +# +# Copyright (C) 2007-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +ac_cv_file__dev_ptmx=yes +ac_cv_file__dev_ptc=no + diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index d5b4b8bf65..0196beeb68 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -6,7 +6,7 @@ # PYTHON_VERSION:=2.7 -PYTHON_VERSION_MICRO:=3 +PYTHON_VERSION_MICRO:=8 PYTHON_DIR:=$(STAGING_DIR)/usr PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin @@ -17,7 +17,7 @@ PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages PYTHON:=python$(PYTHON_VERSION) -HOST_PYTHON_BIN:=$(STAGING_DIR)/usr/bin/hostpython +HOST_PYTHON_BIN:=$(STAGING_DIR_HOST)/bin/python2 define HostPython ( export PYTHONPATH="$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR)"; \ diff --git a/lang/python/patches/000-cross-compile.patch b/lang/python/patches/000-cross-compile.patch deleted file mode 100644 index a6f208e872..0000000000 --- a/lang/python/patches/000-cross-compile.patch +++ /dev/null @@ -1,112 +0,0 @@ ---- - Makefile.pre.in | 25 +++++++++++++------------ - 1 file changed, 13 insertions(+), 12 deletions(-) - ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ - - 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 -@@ -214,6 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ - ########################################################################## - # Parser - PGEN= Parser/pgen$(EXE) -+HOSTPGEN= $(PGEN)$(EXE) - - POBJS= \ - Parser/acceler.o \ -@@ -384,7 +386,7 @@ build_all_generate_profile: - $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov" - - run_profile_task: -- ./$(BUILDPYTHON) $(PROFILE_TASK) -+ $(HOSTPYTHON) $(PROFILE_TASK) - - build_all_use_profile: - $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use" -@@ -402,14 +404,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA - $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) - - platform: $(BUILDPYTHON) -- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform -+ $(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform - - - # 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)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ - esac - - # Build static library -@@ -543,7 +545,7 @@ Modules/python.o: $(srcdir)/Modules/pyth - $(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) -@@ -708,7 +710,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho - - TESTOPTS= -l $(EXTRATESTOPTS) - TESTPROG= $(srcdir)/Lib/test/regrtest.py --TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) -+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS) - test: all platform - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f - -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -@@ -1062,7 +1064,7 @@ libainstall: all python-config - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ -+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -@@ -1100,7 +1102,7 @@ frameworkinstallstructure: $(LDLIBRARY) - fi; \ - done - $(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers -- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist -+ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist - $(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current - $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK) - $(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers -@@ -1135,7 +1137,7 @@ frameworkinstallextras: - # This installs a few of the useful scripts in Tools/scripts - scriptsinstall: - SRCDIR=$(srcdir) $(RUNSHARED) \ -- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \ -+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --root=$(DESTDIR)/ -@@ -1157,7 +1159,7 @@ config.status: $(srcdir)/configure - - # Run reindent on the library - reindent: -- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib -+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib - - # Rerun configure with the same options as it was run last time, - # provided the config.status script exists -@@ -1260,7 +1262,7 @@ funny: - - # Perform some verification checks on any modified files. - patchcheck: -- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py -+ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py - - # Dependencies - diff --git a/lang/python/patches/020-dont-compile-python-files.patch b/lang/python/patches/020-dont-compile-python-files.patch deleted file mode 100644 index 57bd51d958..0000000000 --- a/lang/python/patches/020-dont-compile-python-files.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- - Makefile.pre.in | 16 ---------------- - 1 file changed, 16 deletions(-) - ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -940,26 +940,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL - $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ - $(DESTDIR)$(LIBDEST)/distutils/tests ; \ - fi -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -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 \ -- -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 \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- ./$(BUILDPYTHON) -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()" - - # Create the PLATDIR source directory, if one wasn't distributed.. - $(srcdir)/Lib/$(PLATDIR): diff --git a/lang/python/patches/030-fixup-include-dirs.patch b/lang/python/patches/030-fixup-include-dirs.patch deleted file mode 100644 index 6cc6bba74c..0000000000 --- a/lang/python/patches/030-fixup-include-dirs.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- - setup.py | 15 ++------------- - 1 file changed, 2 insertions(+), 13 deletions(-) - ---- a/setup.py -+++ b/setup.py -@@ -368,11 +368,6 @@ class PyBuildExt(build_ext): - os.unlink(tmpfile) - - 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 paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. - # We must get the values from the Makefile and not the environment -@@ -407,17 +402,6 @@ class PyBuildExt(build_ext): - for directory in reversed(options.dirs): - add_dir_to_list(dir_list, directory) - -- if os.path.normpath(sys.prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework -- # (PYTHONFRAMEWORK is set) to avoid # linking problems when -- # building a framework with different architectures than -- # the one that is currently installed (issue #7473) -- add_dir_to_list(self.compiler.library_dirs, -- sysconfig.get_config_var("LIBDIR")) -- add_dir_to_list(self.compiler.include_dirs, -- sysconfig.get_config_var("INCLUDEDIR")) -- - try: - have_unicode = unicode - except NameError: -@@ -426,11 +410,8 @@ class PyBuildExt(build_ext): - # 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/lang/python/patches/040-dont-import-cross-compiled-modules.patch b/lang/python/patches/040-dont-import-cross-compiled-modules.patch deleted file mode 100644 index 1793569f99..0000000000 --- a/lang/python/patches/040-dont-import-cross-compiled-modules.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- - setup.py | 30 ------------------------------ - 1 file changed, 30 deletions(-) - ---- a/setup.py -+++ b/setup.py -@@ -307,36 +307,6 @@ class PyBuildExt(build_ext): - ext_filename = os.path.join( - self.build_lib, - self.get_ext_filename(self.get_ext_fullname(ext.name))) -- try: -- imp.load_dynamic(ext.name, ext_filename) -- except ImportError, why: -- self.failed.append(ext.name) -- self.announce('*** WARNING: renaming "%s" since importing it' -- ' failed: %s' % (ext.name, why), level=3) -- assert not self.inplace -- basename, tail = os.path.splitext(ext_filename) -- newname = basename + "_failed" + tail -- if os.path.exists(newname): -- os.remove(newname) -- os.rename(ext_filename, newname) -- -- # XXX -- This relies on a Vile HACK in -- # distutils.command.build_ext.build_extension(). The -- # _built_objects attribute is stored there strictly for -- # use here. -- # If there is a failure, _built_objects may not be there, -- # so catch the AttributeError and move on. -- try: -- for filename in self._built_objects: -- os.remove(filename) -- except AttributeError: -- self.announce('unable to remove files (ignored)') -- except: -- exc_type, why, tb = sys.exc_info() -- self.announce('*** WARNING: importing extension "%s" ' -- 'failed with %s: %s' % (ext.name, exc_type, why), -- level=3) -- self.failed.append(ext.name) - - def get_platform(self): - # Get value of sys.platform diff --git a/lang/python/patches/070-dont-clean-ipkg-install.patch b/lang/python/patches/070-dont-clean-ipkg-install.patch deleted file mode 100644 index 0796c19d6e..0000000000 --- a/lang/python/patches/070-dont-clean-ipkg-install.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- - Makefile.pre.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1169,12 +1169,12 @@ TAGS:: - # Sanitation targets -- clean leaves libraries, executables and tags - # files, which clobber removes as well - pycremoval: -- find $(srcdir) -name '*.py[co]' -exec rm -f {} ';' -+ find $(srcdir) ! -path './ipkg-install/*' -name '*.py[co]' -exec rm -f {} ';' - - clean: pycremoval -- find . -name '*.[oa]' -exec rm -f {} ';' -- find . -name '*.s[ol]' -exec rm -f {} ';' -- find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' -+ find . ! -path './ipkg-install/*' -name '*.[oa]' -exec rm -f {} ';' -+ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';' -+ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' - find build -name 'fficonfig.h' -exec rm -f {} ';' || true - find build -name 'fficonfig.py' -exec rm -f {} ';' || true - -rm -f Lib/lib2to3/*Grammar*.pickle diff --git a/lang/python/patches/080-distutils-dont_adjust_files.patch b/lang/python/patches/080-distutils-dont_adjust_files.patch deleted file mode 100644 index 97d62fb3af..0000000000 --- a/lang/python/patches/080-distutils-dont_adjust_files.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- - Lib/distutils/command/build_scripts.py | 43 +++------------------------------ - 1 file changed, 4 insertions(+), 39 deletions(-) - ---- a/Lib/distutils/command/build_scripts.py -+++ b/Lib/distutils/command/build_scripts.py -@@ -51,10 +51,7 @@ class build_scripts (Command): - - - def copy_scripts (self): -- """Copy each script listed in 'self.scripts'; if it's marked as a -- Python script in the Unix way (first line matches 'first_line_re', -- ie. starts with "\#!" and contains "python"), then adjust the first -- line to refer to the current Python interpreter as we copy. -+ """Copy each script listed in 'self.scripts' - """ - _sysconfig = __import__('sysconfig') - self.mkpath(self.build_dir) -@@ -78,41 +75,9 @@ class build_scripts (Command): - if not self.dry_run: - raise - f = None -- else: -- first_line = f.readline() -- if not first_line: -- self.warn("%s is an empty file (skipping)" % script) -- continue -- -- match = first_line_re.match(first_line) -- if match: -- adjust = 1 -- post_interp = match.group(1) or '' -- -- if adjust: -- log.info("copying and adjusting %s -> %s", script, -- self.build_dir) -- if not self.dry_run: -- outf = open(outfile, "w") -- if not _sysconfig.is_python_build(): -- outf.write("#!%s%s\n" % -- (self.executable, -- post_interp)) -- else: -- outf.write("#!%s%s\n" % -- (os.path.join( -- _sysconfig.get_config_var("BINDIR"), -- "python%s%s" % (_sysconfig.get_config_var("VERSION"), -- _sysconfig.get_config_var("EXE"))), -- post_interp)) -- outf.writelines(f.readlines()) -- outf.close() -- if f: -- f.close() -- else: -- if f: -- f.close() -- self.copy_file(script, outfile) -+ if f: -+ f.close() -+ self.copy_file(script, outfile) - - if os.name == 'posix': - for file in outfiles: diff --git a/lang/python/patches/110-enable-zlib.patch b/lang/python/patches/110-enable-zlib.patch index cdc70733c7..780831e86c 100644 --- a/lang/python/patches/110-enable-zlib.patch +++ b/lang/python/patches/110-enable-zlib.patch @@ -1,10 +1,17 @@ +From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001 +From: Alexandru Ardelean +Date: Thu, 25 Sep 2014 18:18:29 +0300 +Subject: [PATCH] enable zlib + --- - Modules/Setup.dist | 2 +- + Modules/Setup.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/Modules/Setup.dist b/Modules/Setup.dist +index 01fb85f..01ac492 100644 --- a/Modules/Setup.dist +++ b/Modules/Setup.dist -@@ -460,7 +460,7 @@ GLHACK=-Dclear=__GLclear +@@ -358,7 +358,7 @@ _symtable symtablemodule.c # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.gzip.org/zlib/ @@ -13,3 +20,6 @@ # Interface to the Expat XML parser # +-- +1.8.4.5 + diff --git a/lang/python/patches/120-force-internal-modules-for-hashlib.patch b/lang/python/patches/120-force-internal-modules-for-hashlib.patch deleted file mode 100644 index ad10a44011..0000000000 --- a/lang/python/patches/120-force-internal-modules-for-hashlib.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- - setup.py | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - ---- a/setup.py -+++ b/setup.py -@@ -704,8 +704,7 @@ class PyBuildExt(build_ext): - - min_openssl_ver = 0x00907000 - have_any_openssl = ssl_incs is not None and ssl_libs is not None -- have_usable_openssl = (have_any_openssl and -- openssl_ver >= min_openssl_ver) -+ have_usable_openssl = False - - if have_any_openssl: - if have_usable_openssl: -@@ -730,7 +729,7 @@ class PyBuildExt(build_ext): - depends = ['md5.h']) ) - - min_sha2_openssl_ver = 0x00908000 -- if COMPILED_WITH_PYDEBUG or openssl_ver < min_sha2_openssl_ver: -+ if True: - # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash - exts.append( Extension('_sha256', ['sha256module.c']) ) - exts.append( Extension('_sha512', ['sha512module.c']) ) diff --git a/lang/python/patches/130-readline-setup.patch b/lang/python/patches/130-readline-setup.patch deleted file mode 100644 index c19dbb2795..0000000000 --- a/lang/python/patches/130-readline-setup.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -573,32 +573,7 @@ class PyBuildExt(build_ext): - # readline - do_readline = self.compiler.find_library_file(lib_dirs, 'readline') - readline_termcap_library = "" -- curses_library = "" -- # Determine if readline is already linked against curses or tinfo. -- if do_readline and find_executable('ldd'): -- fp = os.popen("ldd %s" % do_readline) -- ldd_output = fp.readlines() -- ret = fp.close() -- if ret is None or ret >> 8 == 0: -- for ln in ldd_output: -- if 'curses' in ln: -- readline_termcap_library = re.sub( -- r'.*lib(n?cursesw?)\.so.*', r'\1', ln -- ).rstrip() -- break -- if 'tinfo' in ln: # termcap interface split out from ncurses -- readline_termcap_library = 'tinfo' -- break -- # Issue 7384: If readline is already linked against curses, -- # use the same library for the readline and curses modules. -- if 'curses' in readline_termcap_library: -- curses_library = readline_termcap_library -- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): -- curses_library = 'ncursesw' -- elif self.compiler.find_library_file(lib_dirs, 'ncurses'): -- curses_library = 'ncurses' -- elif self.compiler.find_library_file(lib_dirs, 'curses'): -- curses_library = 'curses' -+ curses_library = "ncurses" - - if platform == 'darwin': - os_release = int(os.uname()[2].split('.')[0]) diff --git a/lang/python/patches/140-verbose-sharedmods.patch b/lang/python/patches/140-verbose-sharedmods.patch deleted file mode 100644 index a761c344b0..0000000000 --- a/lang/python/patches/140-verbose-sharedmods.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -410,7 +410,7 @@ platform: $(BUILDPYTHON) - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ - esac - diff --git a/lang/python/patches/150-no-sqlite-rpath.patch b/lang/python/patches/150-no-sqlite-rpath.patch deleted file mode 100644 index 4f0ec41b50..0000000000 --- a/lang/python/patches/150-no-sqlite-rpath.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -1021,7 +1021,6 @@ class PyBuildExt(build_ext): - include_dirs=["Modules/_sqlite", - sqlite_incdir], - library_dirs=sqlite_libdir, -- runtime_library_dirs=sqlite_libdir, - extra_link_args=sqlite_extra_link_args, - libraries=["sqlite3",])) - else: -- 2.30.2