Browse Source

python: upgrade to version 2.7.8

Alexandru Ardelean 10 years ago
parent
commit
02ad9c1915

+ 14
- 27
lang/python/Makefile View File

@@ -12,11 +12,11 @@ include ./files/python-package.mk
12 12
 
13 13
 PKG_NAME:=python
14 14
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
15
-PKG_RELEASE:=2
15
+PKG_RELEASE:=3
16 16
 
17 17
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
18 18
 PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)
19
-PKG_MD5SUM:=62c4c1699170078c469f79ddfed21bc0
19
+PKG_MD5SUM:=d235bdfa75b8396942e360a70487ee00
20 20
 
21 21
 PKG_LICENSE:=PSF
22 22
 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:=\
142 142
 	CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \
143 143
 	LDFLAGS="$(TARGET_LDFLAGS)" \
144 144
 	LD="$(TARGET_CC)" \
145
-	HOSTPYTHON=./hostpython \
146
-	HOSTPGEN=./hostpgen
145
+	PGEN=pgen2
147 146
 
148 147
 ENABLE_IPV6:=
149 148
 ifeq ($(CONFIG_IPV6),y)
@@ -153,22 +152,17 @@ endif
153 152
 define Build/Configure
154 153
 	-$(MAKE) -C $(PKG_BUILD_DIR) distclean
155 154
 	(cd $(PKG_BUILD_DIR); autoreconf --force --install || exit 0)
156
-	# The python executable needs to stay in the rootdir since its location will
157
-	# be used to compute the path of the config files.
158
-	$(CP) $(STAGING_DIR_HOST)/bin/pgen $(PKG_BUILD_DIR)/hostpgen
159
-	$(CP) $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION) $(PKG_BUILD_DIR)/hostpython
155
+	$(CP) ./files/config.site $(PKG_BUILD_DIR)
160 156
 	$(call Build/Configure/Default, \
161 157
 		--sysconfdir=/etc \
162 158
 		--disable-shared \
163 159
 		--without-cxx-main \
164 160
 		--with-threads \
165 161
 		--with-system-ffi="$(STAGING_DIR)/usr" \
162
+		--without-ensurepip \
163
+		--without-pymalloc \
166 164
 		$(ENABLE_IPV6) \
167
-		ac_cv_have_chflags=no \
168
-		ac_cv_have_lchflags=no \
169
-		ac_cv_py_format_size_t=no \
170
-		ac_cv_have_long_long_format=yes \
171
-		ac_cv_buggy_getaddrinfo=no \
165
+		CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
172 166
 		OPT="$(TARGET_CFLAGS)" \
173 167
 	)
174 168
 endef
@@ -188,20 +182,10 @@ define Build/InstallDev
188 182
 		$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
189 183
 		$(1)/usr/lib/python$(PYTHON_VERSION)/
190 184
 
191
-	$(CP) \
192
-		$(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION) \
193
-		$(1)/usr/bin/hostpython
194
-	(cd $(2)/bin; \
195
-	$(LN) ../../usr/bin/hostpython python$(PYTHON_VERSION); \
196
-	$(LN) python$(PYTHON_VERSION) python)
197
-
198 185
 	$(CP) \
199 186
 		$(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION)-config \
200 187
 		$(2)/bin/
201 188
 	$(SED) 's,^#!.*,#!/usr/bin/env python$(PYTHON_VERSION),g' $(2)/bin/python$(PYTHON_VERSION)-config
202
-
203
-	(cd $(2)/bin; \
204
-	$(LN) python$(PYTHON_VERSION)-config python-config;)
205 189
 endef
206 190
 
207 191
 define PyPackage/python-full/filespec
@@ -464,7 +448,12 @@ define Host/Configure
464 448
 		rm -rf config.cache; \
465 449
 		CONFIG_SITE= \
466 450
 		OPT="$(HOST_CFLAGS)" \
467
-		./configure --without-cxx-main --with-threads --prefix=$(STAGING_DIR_HOST); \
451
+		./configure \
452
+			--without-cxx-main \
453
+			--without-ensurepip \
454
+			--without-pymalloc \
455
+			--with-threads \
456
+			--prefix=$(STAGING_DIR_HOST); \
468 457
 	)
469 458
 endef
470 459
 
@@ -472,16 +461,14 @@ define Host/Compile
472 461
 	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
473 462
 		python Parser/pgen
474 463
 	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
475
-		HOSTPYTHON=$(HOST_BUILD_DIR)/python \
476 464
 		sharedmods
477 465
 endef
478 466
 
479 467
 define Host/Install
480 468
 	$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
481 469
 	$(MAKE) -C $(HOST_BUILD_DIR) \
482
-		HOSTPYTHON=$(HOST_BUILD_DIR)/python \
483 470
 		install
484
-	$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/
471
+	$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2
485 472
 endef
486 473
 
487 474
 

+ 11
- 0
lang/python/files/config.site View File

@@ -0,0 +1,11 @@
1
+#! /bin/sh
2
+#
3
+# Copyright (C) 2007-2014 OpenWrt.org
4
+#
5
+# This is free software, licensed under the GNU General Public License v2.
6
+# See /LICENSE for more information.
7
+#
8
+
9
+ac_cv_file__dev_ptmx=yes
10
+ac_cv_file__dev_ptc=no
11
+

+ 2
- 2
lang/python/files/python-package.mk View File

@@ -6,7 +6,7 @@
6 6
 #
7 7
 
8 8
 PYTHON_VERSION:=2.7
9
-PYTHON_VERSION_MICRO:=3
9
+PYTHON_VERSION_MICRO:=8
10 10
 
11 11
 PYTHON_DIR:=$(STAGING_DIR)/usr
12 12
 PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
@@ -17,7 +17,7 @@ PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
17 17
 
18 18
 PYTHON:=python$(PYTHON_VERSION)
19 19
 
20
-HOST_PYTHON_BIN:=$(STAGING_DIR)/usr/bin/hostpython
20
+HOST_PYTHON_BIN:=$(STAGING_DIR_HOST)/bin/python2
21 21
 
22 22
 define HostPython
23 23
 	(	export PYTHONPATH="$(PYTHON_LIB_DIR):$(STAGING_DIR)/$(PYTHON_PKG_DIR)"; \

+ 0
- 112
lang/python/patches/000-cross-compile.patch View File

@@ -1,112 +0,0 @@
1
----
2
- Makefile.pre.in |   25 +++++++++++++------------
3
- 1 file changed, 13 insertions(+), 12 deletions(-)
4
-
5
---- a/Makefile.pre.in
6
-+++ b/Makefile.pre.in
7
-@@ -182,6 +182,7 @@ UNICODE_OBJS=   @UNICODE_OBJS@
8
- 
9
- PYTHON=		python$(EXE)
10
- BUILDPYTHON=	python$(BUILDEXE)
11
-+HOSTPYTHON=	$(BUILDPYTHON)
12
- 
13
- # The task to run while instrument when building the profile-opt target
14
- PROFILE_TASK=	$(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
15
-@@ -214,6 +215,7 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
16
- ##########################################################################
17
- # Parser
18
- PGEN=		Parser/pgen$(EXE)
19
-+HOSTPGEN=	$(PGEN)$(EXE)
20
- 
21
- POBJS=		\
22
- 		Parser/acceler.o \
23
-@@ -384,7 +386,7 @@ build_all_generate_profile:
24
- 	$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
25
- 
26
- run_profile_task:
27
--	./$(BUILDPYTHON) $(PROFILE_TASK)
28
-+	$(HOSTPYTHON) $(PROFILE_TASK)
29
- 
30
- build_all_use_profile:
31
- 	$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
32
-@@ -402,14 +404,14 @@ $(BUILDPYTHON):	Modules/python.o $(LIBRA
33
- 			$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
34
- 
35
- platform: $(BUILDPYTHON)
36
--	$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
37
-+	$(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
38
- 
39
- 
40
- # Build the shared modules
41
- sharedmods: $(BUILDPYTHON)
42
- 	@case $$MAKEFLAGS in \
43
--	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
44
--	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
45
-+	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
46
-+	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
47
- 	esac
48
- 
49
- # Build static library
50
-@@ -543,7 +545,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
51
- $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
52
- Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
53
- 		-@$(INSTALL) -d Include
54
--		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
55
-+		$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
56
- 		-touch Parser/pgen.stamp
57
- 
58
- $(PGEN):	$(PGENOBJS)
59
-@@ -708,7 +710,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
60
- 
61
- TESTOPTS=	-l $(EXTRATESTOPTS)
62
- TESTPROG=	$(srcdir)/Lib/test/regrtest.py
63
--TESTPYTHON=	$(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
64
-+TESTPYTHON=	$(RUNSHARED) $(HOSTPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
65
- test:		all platform
66
- 		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
67
- 		-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
68
-@@ -1062,7 +1064,7 @@ libainstall:	all python-config
69
- # Install the dynamically loadable modules
70
- # This goes into $(exec_prefix)
71
- sharedinstall: sharedmods
72
--	$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
73
-+	$(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
74
- 	   	--prefix=$(prefix) \
75
- 		--install-scripts=$(BINDIR) \
76
- 		--install-platlib=$(DESTSHARED) \
77
-@@ -1100,7 +1102,7 @@ frameworkinstallstructure:	$(LDLIBRARY)
78
- 		fi; \
79
- 	done
80
- 	$(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
81
--	sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
82
-+	sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
83
- 	$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
84
- 	$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
85
- 	$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
86
-@@ -1135,7 +1137,7 @@ frameworkinstallextras:
87
- # This installs a few of the useful scripts in Tools/scripts
88
- scriptsinstall:
89
- 	SRCDIR=$(srcdir) $(RUNSHARED) \
90
--	./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
91
-+	$(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \
92
- 	--prefix=$(prefix) \
93
- 	--install-scripts=$(BINDIR) \
94
- 	--root=$(DESTDIR)/
95
-@@ -1157,7 +1159,7 @@ config.status:	$(srcdir)/configure
96
- 
97
- # Run reindent on the library
98
- reindent:
99
--	./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
100
-+	$(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
101
- 
102
- # Rerun configure with the same options as it was run last time,
103
- # provided the config.status script exists
104
-@@ -1260,7 +1262,7 @@ funny:
105
- 
106
- # Perform some verification checks on any modified files.
107
- patchcheck:
108
--	$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
109
-+	$(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
110
- 
111
- # Dependencies
112
- 

+ 0
- 33
lang/python/patches/020-dont-compile-python-files.patch View File

@@ -1,33 +0,0 @@
1
----
2
- Makefile.pre.in |   16 ----------------
3
- 1 file changed, 16 deletions(-)
4
-
5
---- a/Makefile.pre.in
6
-+++ b/Makefile.pre.in
7
-@@ -940,26 +940,6 @@ libinstall:	build_all $(srcdir)/Lib/$(PL
8
- 		$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
9
- 			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
10
- 	fi
11
--	PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
12
--		./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
13
--		-d $(LIBDEST) -f \
14
--		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
15
--		$(DESTDIR)$(LIBDEST)
16
--	PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
17
--		./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
18
--		-d $(LIBDEST) -f \
19
--		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
20
--		$(DESTDIR)$(LIBDEST)
21
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
22
--		./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
23
--		-d $(LIBDEST)/site-packages -f \
24
--		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
25
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
26
--		./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
27
--		-d $(LIBDEST)/site-packages -f \
28
--		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
29
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
30
--		./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
31
- 
32
- # Create the PLATDIR source directory, if one wasn't distributed..
33
- $(srcdir)/Lib/$(PLATDIR):

+ 0
- 50
lang/python/patches/030-fixup-include-dirs.patch View File

@@ -1,50 +0,0 @@
1
----
2
- setup.py |   15 ++-------------
3
- 1 file changed, 2 insertions(+), 13 deletions(-)
4
-
5
---- a/setup.py
6
-+++ b/setup.py
7
-@@ -368,11 +368,6 @@ class PyBuildExt(build_ext):
8
-             os.unlink(tmpfile)
9
- 
10
-     def detect_modules(self):
11
--        # Ensure that /usr/local is always used
12
--        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
13
--        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
14
--        self.add_multiarch_paths()
15
--
16
-         # Add paths specified in the environment variables LDFLAGS and
17
-         # CPPFLAGS for header and library files.
18
-         # We must get the values from the Makefile and not the environment
19
-@@ -407,17 +402,6 @@ class PyBuildExt(build_ext):
20
-                     for directory in reversed(options.dirs):
21
-                         add_dir_to_list(dir_list, directory)
22
- 
23
--        if os.path.normpath(sys.prefix) != '/usr' \
24
--                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
25
--            # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
26
--            # (PYTHONFRAMEWORK is set) to avoid # linking problems when
27
--            # building a framework with different architectures than
28
--            # the one that is currently installed (issue #7473)
29
--            add_dir_to_list(self.compiler.library_dirs,
30
--                            sysconfig.get_config_var("LIBDIR"))
31
--            add_dir_to_list(self.compiler.include_dirs,
32
--                            sysconfig.get_config_var("INCLUDEDIR"))
33
--
34
-         try:
35
-             have_unicode = unicode
36
-         except NameError:
37
-@@ -426,11 +410,8 @@ class PyBuildExt(build_ext):
38
-         # lib_dirs and inc_dirs are used to search for files;
39
-         # if a file is found in one of those directories, it can
40
-         # be assumed that no additional -I,-L directives are needed.
41
--        lib_dirs = self.compiler.library_dirs + [
42
--            '/lib64', '/usr/lib64',
43
--            '/lib', '/usr/lib',
44
--            ]
45
--        inc_dirs = self.compiler.include_dirs + ['/usr/include']
46
-+        lib_dirs = self.compiler.library_dirs
47
-+        inc_dirs = self.compiler.include_dirs
48
-         exts = []
49
-         missing = []
50
- 

+ 0
- 43
lang/python/patches/040-dont-import-cross-compiled-modules.patch View File

@@ -1,43 +0,0 @@
1
----
2
- setup.py |   30 ------------------------------
3
- 1 file changed, 30 deletions(-)
4
-
5
---- a/setup.py
6
-+++ b/setup.py
7
-@@ -307,36 +307,6 @@ class PyBuildExt(build_ext):
8
-         ext_filename = os.path.join(
9
-             self.build_lib,
10
-             self.get_ext_filename(self.get_ext_fullname(ext.name)))
11
--        try:
12
--            imp.load_dynamic(ext.name, ext_filename)
13
--        except ImportError, why:
14
--            self.failed.append(ext.name)
15
--            self.announce('*** WARNING: renaming "%s" since importing it'
16
--                          ' failed: %s' % (ext.name, why), level=3)
17
--            assert not self.inplace
18
--            basename, tail = os.path.splitext(ext_filename)
19
--            newname = basename + "_failed" + tail
20
--            if os.path.exists(newname):
21
--                os.remove(newname)
22
--            os.rename(ext_filename, newname)
23
--
24
--            # XXX -- This relies on a Vile HACK in
25
--            # distutils.command.build_ext.build_extension().  The
26
--            # _built_objects attribute is stored there strictly for
27
--            # use here.
28
--            # If there is a failure, _built_objects may not be there,
29
--            # so catch the AttributeError and move on.
30
--            try:
31
--                for filename in self._built_objects:
32
--                    os.remove(filename)
33
--            except AttributeError:
34
--                self.announce('unable to remove files (ignored)')
35
--        except:
36
--            exc_type, why, tb = sys.exc_info()
37
--            self.announce('*** WARNING: importing extension "%s" '
38
--                          'failed with %s: %s' % (ext.name, exc_type, why),
39
--                          level=3)
40
--            self.failed.append(ext.name)
41
- 
42
-     def get_platform(self):
43
-         # Get value of sys.platform

+ 0
- 23
lang/python/patches/070-dont-clean-ipkg-install.patch View File

@@ -1,23 +0,0 @@
1
----
2
- Makefile.pre.in |    6 +++---
3
- 1 file changed, 3 insertions(+), 3 deletions(-)
4
-
5
---- a/Makefile.pre.in
6
-+++ b/Makefile.pre.in
7
-@@ -1169,12 +1169,12 @@ TAGS::
8
- # Sanitation targets -- clean leaves libraries, executables and tags
9
- # files, which clobber removes as well
10
- pycremoval:
11
--	find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
12
-+	find $(srcdir) ! -path './ipkg-install/*' -name '*.py[co]' -exec rm -f {} ';'
13
- 
14
- clean: pycremoval
15
--	find . -name '*.[oa]' -exec rm -f {} ';'
16
--	find . -name '*.s[ol]' -exec rm -f {} ';'
17
--	find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
18
-+	find . ! -path './ipkg-install/*' -name '*.[oa]' -exec rm -f {} ';'
19
-+	find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';'
20
-+	find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
21
- 	find build -name 'fficonfig.h' -exec rm -f {} ';' || true
22
- 	find build -name 'fficonfig.py' -exec rm -f {} ';' || true
23
- 	-rm -f Lib/lib2to3/*Grammar*.pickle

+ 0
- 63
lang/python/patches/080-distutils-dont_adjust_files.patch View File

@@ -1,63 +0,0 @@
1
----
2
- Lib/distutils/command/build_scripts.py |   43 +++------------------------------
3
- 1 file changed, 4 insertions(+), 39 deletions(-)
4
-
5
---- a/Lib/distutils/command/build_scripts.py
6
-+++ b/Lib/distutils/command/build_scripts.py
7
-@@ -51,10 +51,7 @@ class build_scripts (Command):
8
- 
9
- 
10
-     def copy_scripts (self):
11
--        """Copy each script listed in 'self.scripts'; if it's marked as a
12
--        Python script in the Unix way (first line matches 'first_line_re',
13
--        ie. starts with "\#!" and contains "python"), then adjust the first
14
--        line to refer to the current Python interpreter as we copy.
15
-+        """Copy each script listed in 'self.scripts'
16
-         """
17
-         _sysconfig = __import__('sysconfig')
18
-         self.mkpath(self.build_dir)
19
-@@ -78,41 +75,9 @@ class build_scripts (Command):
20
-                 if not self.dry_run:
21
-                     raise
22
-                 f = None
23
--            else:
24
--                first_line = f.readline()
25
--                if not first_line:
26
--                    self.warn("%s is an empty file (skipping)" % script)
27
--                    continue
28
--
29
--                match = first_line_re.match(first_line)
30
--                if match:
31
--                    adjust = 1
32
--                    post_interp = match.group(1) or ''
33
--
34
--            if adjust:
35
--                log.info("copying and adjusting %s -> %s", script,
36
--                         self.build_dir)
37
--                if not self.dry_run:
38
--                    outf = open(outfile, "w")
39
--                    if not _sysconfig.is_python_build():
40
--                        outf.write("#!%s%s\n" %
41
--                                   (self.executable,
42
--                                    post_interp))
43
--                    else:
44
--                        outf.write("#!%s%s\n" %
45
--                                   (os.path.join(
46
--                            _sysconfig.get_config_var("BINDIR"),
47
--                           "python%s%s" % (_sysconfig.get_config_var("VERSION"),
48
--                                           _sysconfig.get_config_var("EXE"))),
49
--                                    post_interp))
50
--                    outf.writelines(f.readlines())
51
--                    outf.close()
52
--                if f:
53
--                    f.close()
54
--            else:
55
--                if f:
56
--                    f.close()
57
--                self.copy_file(script, outfile)
58
-+            if f:
59
-+                f.close()
60
-+            self.copy_file(script, outfile)
61
- 
62
-         if os.name == 'posix':
63
-             for file in outfiles:

+ 12
- 2
lang/python/patches/110-enable-zlib.patch View File

@@ -1,10 +1,17 @@
1
+From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001
2
+From: Alexandru Ardelean <aa@ocedo.com>
3
+Date: Thu, 25 Sep 2014 18:18:29 +0300
4
+Subject: [PATCH] enable zlib
5
+
1 6
 ---
2
- Modules/Setup.dist |    2 +-
7
+ Modules/Setup.dist | 2 +-
3 8
  1 file changed, 1 insertion(+), 1 deletion(-)
4 9
 
10
+diff --git a/Modules/Setup.dist b/Modules/Setup.dist
11
+index 01fb85f..01ac492 100644
5 12
 --- a/Modules/Setup.dist
6 13
 +++ b/Modules/Setup.dist
7
-@@ -460,7 +460,7 @@ GLHACK=-Dclear=__GLclear
14
+@@ -358,7 +358,7 @@ _symtable symtablemodule.c
8 15
  # Andrew Kuchling's zlib module.
9 16
  # This require zlib 1.1.3 (or later).
10 17
  # See http://www.gzip.org/zlib/
@@ -13,3 +20,6 @@
13 20
  
14 21
  # Interface to the Expat XML parser
15 22
  #
23
+-- 
24
+1.8.4.5
25
+

+ 0
- 25
lang/python/patches/120-force-internal-modules-for-hashlib.patch View File

@@ -1,25 +0,0 @@
1
----
2
- setup.py |   10 ++++++----
3
- 1 file changed, 6 insertions(+), 4 deletions(-)
4
-
5
---- a/setup.py
6
-+++ b/setup.py
7
-@@ -704,8 +704,7 @@ class PyBuildExt(build_ext):
8
- 
9
-         min_openssl_ver = 0x00907000
10
-         have_any_openssl = ssl_incs is not None and ssl_libs is not None
11
--        have_usable_openssl = (have_any_openssl and
12
--                               openssl_ver >= min_openssl_ver)
13
-+        have_usable_openssl = False
14
- 
15
-         if have_any_openssl:
16
-             if have_usable_openssl:
17
-@@ -730,7 +729,7 @@ class PyBuildExt(build_ext):
18
-                             depends = ['md5.h']) )
19
- 
20
-         min_sha2_openssl_ver = 0x00908000
21
--        if COMPILED_WITH_PYDEBUG or openssl_ver < min_sha2_openssl_ver:
22
-+        if True:
23
-             # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
24
-             exts.append( Extension('_sha256', ['sha256module.c']) )
25
-             exts.append( Extension('_sha512', ['sha512module.c']) )

+ 0
- 36
lang/python/patches/130-readline-setup.patch View File

@@ -1,36 +0,0 @@
1
---- a/setup.py
2
-+++ b/setup.py
3
-@@ -573,32 +573,7 @@ class PyBuildExt(build_ext):
4
-         # readline
5
-         do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
6
-         readline_termcap_library = ""
7
--        curses_library = ""
8
--        # Determine if readline is already linked against curses or tinfo.
9
--        if do_readline and find_executable('ldd'):
10
--            fp = os.popen("ldd %s" % do_readline)
11
--            ldd_output = fp.readlines()
12
--            ret = fp.close()
13
--            if ret is None or ret >> 8 == 0:
14
--                for ln in ldd_output:
15
--                    if 'curses' in ln:
16
--                        readline_termcap_library = re.sub(
17
--                            r'.*lib(n?cursesw?)\.so.*', r'\1', ln
18
--                        ).rstrip()
19
--                        break
20
--                    if 'tinfo' in ln: # termcap interface split out from ncurses
21
--                        readline_termcap_library = 'tinfo'
22
--                        break
23
--        # Issue 7384: If readline is already linked against curses,
24
--        # use the same library for the readline and curses modules.
25
--        if 'curses' in readline_termcap_library:
26
--            curses_library = readline_termcap_library
27
--        elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
28
--            curses_library = 'ncursesw'
29
--        elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
30
--            curses_library = 'ncurses'
31
--        elif self.compiler.find_library_file(lib_dirs, 'curses'):
32
--            curses_library = 'curses'
33
-+        curses_library = "ncurses"
34
- 
35
-         if platform == 'darwin':
36
-             os_release = int(os.uname()[2].split('.')[0])

+ 0
- 11
lang/python/patches/140-verbose-sharedmods.patch View File

@@ -1,11 +0,0 @@
1
---- a/Makefile.pre.in
2
-+++ b/Makefile.pre.in
3
-@@ -410,7 +410,7 @@ platform: $(BUILDPYTHON)
4
- # Build the shared modules
5
- sharedmods: $(BUILDPYTHON)
6
- 	@case $$MAKEFLAGS in \
7
--	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
8
-+	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
9
- 	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
10
- 	esac
11
- 

+ 0
- 10
lang/python/patches/150-no-sqlite-rpath.patch View File

@@ -1,10 +0,0 @@
1
---- a/setup.py
2
-+++ b/setup.py
3
-@@ -1021,7 +1021,6 @@ class PyBuildExt(build_ext):
4
-                                   include_dirs=["Modules/_sqlite",
5
-                                                 sqlite_incdir],
6
-                                   library_dirs=sqlite_libdir,
7
--                                  runtime_library_dirs=sqlite_libdir,
8
-                                   extra_link_args=sqlite_extra_link_args,
9
-                                   libraries=["sqlite3",]))
10
-         else: