Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/python:master commit in: dev-lang/python/, dev-lang/python/files/3.2/, dev-lang/python/files/3.3/, ...
Date: Sun, 29 Dec 2019 11:56:58
Message-Id: 1577620592.6d0796d2302019591f3c59f0c5d5d40ae06a636d.mgorny@gentoo
1 commit: 6d0796d2302019591f3c59f0c5d5d40ae06a636d
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 29 11:56:03 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 29 11:56:32 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/python.git/commit/?id=6d0796d2
7
8 dev-lang/python: Drop old
9
10 All the old versions (2.6, 3.2 and 3.3) no longer build with new openssl
11 and glibc. Somebody would have to backport even more patches.
12
13 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
14
15 dev-lang/python/Manifest | 3 -
16 dev-lang/python/files/2.6/.gitattributes | 1 -
17 .../files/2.6/01_all_static_library_location.patch | 68 ----
18 .../files/2.6/02_all_disable_modules_and_ssl.patch | 92 -----
19 .../files/2.6/03_all_add_portage_search_path.patch | 10 -
20 dev-lang/python/files/2.6/04_all_libdir.patch | 119 ------
21 .../05_all_verbose_building_of_extensions.patch | 10 -
22 .../python/files/2.6/06_all_dbm_automagic.patch | 52 ---
23 .../python/files/2.6/07_all_internal_expat.patch | 33 --
24 .../08_all_non-zero_exit_status_on_failure.patch | 31 --
25 .../files/2.6/09_all_use_external_libffi.patch | 51 ---
26 .../files/2.6/10_all_sys.platform_linux2.patch | 13 -
27 ..._all_regenerate_platform-specific_modules.patch | 110 ------
28 .../python/files/2.6/21_all_distutils_c++.patch | 426 ---------------------
29 .../python/files/2.6/22_all_turkish_locale.patch | 128 -------
30 dev-lang/python/files/2.6/23_all_arm_OABI.patch | 185 ---------
31 .../python/files/2.6/24_all_ctypes_mmap_wx.patch | 124 ------
32 dev-lang/python/files/2.6/25_all_gdbm-1.9.patch | 14 -
33 dev-lang/python/files/2.6/26_all_expat-2.1.patch | 15 -
34 .../python/files/2.6/41_all_crosscompile.patch | 113 ------
35 .../python/files/2.6/62_all_xml.use_pyxml.patch | 41 --
36 ...w_readline_function_types__closes__20374_.patch | 28 --
37 ...an__just_remove_typecasts__closes__20374_.patch | 37 --
38 ...ngs_when_compiling_readline_with_libedit_.patch | 37 --
39 dev-lang/python/files/2.6/99_all_tcl86.patch | 11 -
40 .../files/3.2/01_all_static_library_location.patch | 70 ----
41 .../files/3.2/02_all_disable_modules_and_ssl.patch | 89 -----
42 dev-lang/python/files/3.2/03_all_libdir.patch | 174 ---------
43 .../04_all_non-zero_exit_status_on_failure.patch | 31 --
44 ..._all_regenerate_platform-specific_modules.patch | 112 ------
45 .../python/files/3.2/21_all_distutils_c++.patch | 262 -------------
46 .../files/3.2/22_all_tests_environment.patch | 183 ---------
47 .../python/files/3.2/23_all_h2py_encoding.patch | 173 ---------
48 .../python/files/3.2/41_all_crosscompile.patch | 94 -----
49 ...w_readline_function_types__closes__20374_.patch | 28 --
50 ...an__just_remove_typecasts__closes__20374_.patch | 37 --
51 ...ngs_when_compiling_readline_with_libedit_.patch | 37 --
52 dev-lang/python/files/3.3/.gitattributes | 1 -
53 .../files/3.3/01_all_static_library_location.patch | 70 ----
54 .../files/3.3/02_all_disable_modules_and_ssl.patch | 57 ---
55 dev-lang/python/files/3.3/03_all_libdir.patch | 174 ---------
56 .../04_all_non-zero_exit_status_on_failure.patch | 31 --
57 ..._all_regenerate_platform-specific_modules.patch | 123 ------
58 .../python/files/3.3/21_all_distutils_c++.patch | 271 -------------
59 .../files/3.3/22_all_tests_environment.patch | 192 ----------
60 .../python/files/3.3/23_all_h2py_encoding.patch | 173 ---------
61 .../python/files/3.3/24_all_sqlite-3.8.4.patch | 14 -
62 .../python/files/3.3/61_all_process_data.patch | 166 --------
63 .../python/files/python-3.3-CVE-2014-4616.patch | 52 ---
64 dev-lang/python/files/python-3.3-libressl.patch | 127 ------
65 .../files/python-3.3.5-ncurses-pkg-config.patch | 40 --
66 dev-lang/python/files/python-3.4-gcc-5.patch | 37 --
67 .../files/python-3.4.3-ncurses-pkg-config.patch | 13 -
68 dev-lang/python/metadata.xml | 1 -
69 dev-lang/python/python-2.6.9.ebuild | 340 ----------------
70 dev-lang/python/python-3.2.6.ebuild | 340 ----------------
71 dev-lang/python/python-3.3.5.ebuild | 368 ------------------
72 57 files changed, 5632 deletions(-)
73
74 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
75 index 618d9be..e0d52ba 100644
76 --- a/dev-lang/python/Manifest
77 +++ b/dev-lang/python/Manifest
78 @@ -1,6 +1,3 @@
79 -DIST Python-2.6.9.tar.xz 9333664 BLAKE2B 097b670701a3751e764f345725297b317efbc44c1e6bfe177bd012fa2263b3d27d84bff8627bc1d999b71c888fddcc3145a88926bd6f25f2227c289b4b56a4c9 SHA512 bcd9286b6af3bfa2017f0b32c6c0f9b934224ece496d2d897ab3a61a936d306a5f61a580c060ce501034a614da374d17831a9c9be9f947b01d977b56437c023b
80 -DIST Python-3.2.6.tar.xz 9243292 BLAKE2B b657f55521612c89923dc013adb00fd7ee742c13926623e4a268e85a6b43f04163279e77f2239d28d1b3d6d81298c23abb74b1ba1e1509f29522e7fea0661957 SHA512 514b46029dd5b07f2d287a1f00c6716970197186a38e3f2e1ec60c2292cf03a2dc45165ba9c217e5219c7cb6d96a09f790f5b3bdcc8d11db53f927297fe4ddc9
81 -DIST Python-3.3.5.tar.xz 12116308 BLAKE2B fda7d2b2fdaa27d775e337af3df8e4ebe5d0bdf50a68aa15c06fc450dd3478748af79ee7f58a7a5d8d06e2724b4d947ecbab7614d0958b43579409cdecf0da7b SHA512 562ebd85291f29ff18d37f05682763fc45aa9d070688006f4ef5c89392a48022357c3ca9ee1d795e9e863bdef413e6bab77b8d65581d374a76dbe7cacec65550
82 DIST Python-3.4.10.tar.xz 14559088 BLAKE2B ea1e333f04c286fe715c1ce97ade37c6a768e58a2e34da2ec51613a76c87a2e704f67d9ae8fd92a95366ab1814295028d7948e49b071d7e457b388176186c2e8 SHA512 d5d27d68049b61f135e21b12a800dbd4fc521d6935de178de6e2e88a989cda511d3c8fead90d14e38d2db0e528a74b22674e0da01c51ff4fad7d335ec6c3dbbc
83 DIST Python-3.5.9.tar.xz 15388876 BLAKE2B 6086ed2350b6dce3203360f24c2fddf77df65a5815d6da019809796b30c2f43440a9e349c7defd0187cfc3a50a387352dfa63594c2ec513dd6bf585e7c34ec51 SHA512 58127793adef42ed57ae4d56338268866e14c2d084f09f57f26fc6b1c9454e70cc6d3dffc638f8d56f182acc0884021a4dbb578f312dd6fc01995fa85e31377e
84 DIST python-gentoo-patches-3.4.10.tar.xz 21340 BLAKE2B c2ca41fc4bc81ae6be9426d772b1ffc09a4b2e2c021905886a92d85476871e6c3b51ca30c60eeede93ff8cd90628809cd8c6fb00041d16c1595ce1ba8369dac8 SHA512 27ee476c080a0d1c012ef5d3d8325db6e697e1c3d9611f0337668f3660a50e50e6529bd0fd8b3b5b6030c9be8f8a86d95fa59bc27085ce7d18a7e0b50afe9f4b
85
86 diff --git a/dev-lang/python/files/2.6/.gitattributes b/dev-lang/python/files/2.6/.gitattributes
87 deleted file mode 100644
88 index 5e5a56d..0000000
89 --- a/dev-lang/python/files/2.6/.gitattributes
90 +++ /dev/null
91 @@ -1 +0,0 @@
92 -Makefile export-ignore
93
94 diff --git a/dev-lang/python/files/2.6/01_all_static_library_location.patch b/dev-lang/python/files/2.6/01_all_static_library_location.patch
95 deleted file mode 100644
96 index 83231c9..0000000
97 --- a/dev-lang/python/files/2.6/01_all_static_library_location.patch
98 +++ /dev/null
99 @@ -1,68 +0,0 @@
100 -Install libpythonX.Y.a in /usr/lib instead of /usr/lib/pythonX.Y/config.
101 -https://bugs.gentoo.org/show_bug.cgi?id=252372
102 -http://bugs.python.org/issue6103
103 -
104 ---- Makefile.pre.in
105 -+++ Makefile.pre.in
106 -@@ -788,6 +788,19 @@
107 - fi; \
108 - else true; \
109 - fi
110 -+ @if test -f $(LIBRARY) && test $(LIBRARY) != $(LDLIBRARY); then \
111 -+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
112 -+ if test "$(SO)" = .dll; then \
113 -+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR); \
114 -+ else \
115 -+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR); \
116 -+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY); \
117 -+ fi; \
118 -+ else \
119 -+ echo "Skipped install of $(LIBRARY) - use make frameworkinstall"; \
120 -+ fi; \
121 -+ else true; \
122 -+ fi
123 -
124 - # Install the manual page
125 - maninstall:
126 -@@ -946,18 +959,6 @@
127 - else true; \
128 - fi; \
129 - done
130 -- @if test -d $(LIBRARY); then :; else \
131 -- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
132 -- if test "$(SO)" = .dll; then \
133 -- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
134 -- else \
135 -- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
136 -- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
137 -- fi; \
138 -- else \
139 -- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
140 -- fi; \
141 -- fi
142 - $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
143 - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
144 - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
145 ---- Misc/python-config.in
146 -+++ Misc/python-config.in
147 -@@ -45,9 +45,4 @@
148 - elif opt in ('--libs', '--ldflags'):
149 - libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
150 - libs.append('-lpython'+pyver)
151 -- # add the prefix/lib/pythonX.Y/config dir, but only if there is no
152 -- # shared library in prefix/lib/.
153 -- if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
154 -- libs.insert(0, '-L' + getvar('LIBPL'))
155 - print ' '.join(libs)
156 --
157 ---- Modules/makesetup
158 -+++ Modules/makesetup
159 -@@ -89,7 +89,7 @@
160 - then
161 - ExtraLibDir=.
162 - else
163 -- ExtraLibDir='$(LIBPL)'
164 -+ ExtraLibDir='$(LIBDIR)'
165 - fi
166 - ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
167 - esac
168
169 diff --git a/dev-lang/python/files/2.6/02_all_disable_modules_and_ssl.patch b/dev-lang/python/files/2.6/02_all_disable_modules_and_ssl.patch
170 deleted file mode 100644
171 index c5de56d..0000000
172 --- a/dev-lang/python/files/2.6/02_all_disable_modules_and_ssl.patch
173 +++ /dev/null
174 @@ -1,92 +0,0 @@
175 ---- setup.py
176 -+++ setup.py
177 -@@ -18,7 +18,18 @@
178 - from distutils.spawn import find_executable
179 -
180 - # This global variable is used to hold the list of modules to be disabled.
181 --disabled_module_list = []
182 -+pdm_env = "PYTHON_DISABLE_MODULES"
183 -+if pdm_env in os.environ:
184 -+ disabled_module_list = os.environ[pdm_env].split()
185 -+else:
186 -+ disabled_module_list = []
187 -+
188 -+pds_env = "PYTHON_DISABLE_SSL"
189 -+if pds_env in os.environ:
190 -+ disable_ssl = os.environ[pds_env]
191 -+else:
192 -+ disable_ssl = 0
193 -+
194 -
195 - def add_dir_to_list(dirlist, dir):
196 - """Add the directory 'dir' to the list 'dirlist' (at the front) if
197 -@@ -355,6 +366,7 @@
198 - return sys.platform
199 -
200 - def detect_modules(self):
201 -+ global disable_ssl
202 - # Ensure that /usr/local is always used
203 - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
204 - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
205 -@@ -697,7 +709,7 @@
206 - ssl_incs = find_file('openssl/ssl.h', inc_dirs,
207 - search_for_ssl_incs_in
208 - )
209 -- if ssl_incs is not None:
210 -+ if ssl_incs is not None and not disable_ssl:
211 - krb5_h = find_file('krb5.h', inc_dirs,
212 - ['/usr/kerberos/include'])
213 - if krb5_h:
214 -@@ -708,7 +720,8 @@
215 - ] )
216 -
217 - if (ssl_incs is not None and
218 -- ssl_libs is not None):
219 -+ ssl_libs is not None and
220 -+ not disable_ssl):
221 - exts.append( Extension('_ssl', ['_ssl.c'],
222 - include_dirs = ssl_incs,
223 - library_dirs = ssl_libs,
224 -@@ -742,6 +755,7 @@
225 -
226 - if (ssl_incs is not None and
227 - ssl_libs is not None and
228 -+ not disable_ssl and
229 - openssl_ver >= 0x00907000):
230 - # The _hashlib module wraps optimized implementations
231 - # of hash functions from the OpenSSL library.
232 -@@ -752,20 +766,22 @@
233 - # these aren't strictly missing since they are unneeded.
234 - #missing.extend(['_sha', '_md5'])
235 - else:
236 -- # The _sha module implements the SHA1 hash algorithm.
237 -- exts.append( Extension('_sha', ['shamodule.c']) )
238 -- # The _md5 module implements the RSA Data Security, Inc. MD5
239 -- # Message-Digest Algorithm, described in RFC 1321. The
240 -- # necessary files md5.c and md5.h are included here.
241 -- exts.append( Extension('_md5',
242 -- sources = ['md5module.c', 'md5.c'],
243 -- depends = ['md5.h']) )
244 - missing.append('_hashlib')
245 -
246 -- if (openssl_ver < 0x00908000):
247 -- # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
248 -- exts.append( Extension('_sha256', ['sha256module.c']) )
249 -- exts.append( Extension('_sha512', ['sha512module.c']) )
250 -+ ### Build these unconditionally so emerge won't fail
251 -+ ### when openssl is dropped/broken etc.
252 -+ # The _sha module implements the SHA1 hash algorithm.
253 -+ exts.append( Extension('_sha', ['shamodule.c']) )
254 -+ # The _md5 module implements the RSA Data Security, Inc. MD5
255 -+ # Message-Digest Algorithm, described in RFC 1321. The
256 -+ # necessary files md5.c and md5.h are included here.
257 -+ exts.append( Extension('_md5',
258 -+ sources = ['md5module.c', 'md5.c'],
259 -+ depends = ['md5.h']) )
260 -+
261 -+ exts.append( Extension('_sha256', ['sha256module.c']) )
262 -+ exts.append( Extension('_sha512', ['sha512module.c']) )
263 -+ ###
264 -
265 - # Modules that provide persistent dictionary-like semantics. You will
266 - # probably want to arrange for at least one of them to be available on
267
268 diff --git a/dev-lang/python/files/2.6/03_all_add_portage_search_path.patch b/dev-lang/python/files/2.6/03_all_add_portage_search_path.patch
269 deleted file mode 100644
270 index 029284c..0000000
271 --- a/dev-lang/python/files/2.6/03_all_add_portage_search_path.patch
272 +++ /dev/null
273 @@ -1,10 +0,0 @@
274 ---- Lib/site.py
275 -+++ Lib/site.py
276 -@@ -269,6 +269,7 @@
277 - "python" + sys.version[:3],
278 - "site-packages"))
279 - sitedirs.append(os.path.join(prefix, "lib", "site-python"))
280 -+ sitedirs.append(os.path.join(prefix, "lib", "portage", "pym"))
281 - else:
282 - sitedirs.append(prefix)
283 - sitedirs.append(os.path.join(prefix, "lib", "site-packages"))
284
285 diff --git a/dev-lang/python/files/2.6/04_all_libdir.patch b/dev-lang/python/files/2.6/04_all_libdir.patch
286 deleted file mode 100644
287 index af61191..0000000
288 --- a/dev-lang/python/files/2.6/04_all_libdir.patch
289 +++ /dev/null
290 @@ -1,119 +0,0 @@
291 ---- Lib/distutils/command/install.py
292 -+++ Lib/distutils/command/install.py
293 -@@ -41,8 +41,8 @@
294 -
295 - INSTALL_SCHEMES = {
296 - 'unix_prefix': {
297 -- 'purelib': '$base/lib/python$py_version_short/site-packages',
298 -- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
299 -+ 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
300 -+ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
301 - 'headers': '$base/include/python$py_version_short/$dist_name',
302 - 'scripts': '$base/bin',
303 - 'data' : '$base',
304 ---- Lib/distutils/sysconfig.py
305 -+++ Lib/distutils/sysconfig.py
306 -@@ -120,7 +120,8 @@
307 -
308 - if os.name == "posix":
309 - libpython = os.path.join(prefix,
310 -- "lib", "python" + get_python_version())
311 -+ "@@GENTOO_LIBDIR@@",
312 -+ "python" + get_python_version())
313 - if standard_lib:
314 - return libpython
315 - else:
316 ---- Lib/site.py
317 -+++ Lib/site.py
318 -@@ -265,11 +265,11 @@
319 - if sys.platform in ('os2emx', 'riscos'):
320 - sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
321 - elif os.sep == '/':
322 -- sitedirs.append(os.path.join(prefix, "lib",
323 -+ sitedirs.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@",
324 - "python" + sys.version[:3],
325 - "site-packages"))
326 -- sitedirs.append(os.path.join(prefix, "lib", "site-python"))
327 -- sitedirs.append(os.path.join(prefix, "lib", "portage", "pym"))
328 -+ sitedirs.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python"))
329 -+ sitedirs.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "portage", "pym"))
330 - else:
331 - sitedirs.append(prefix)
332 - sitedirs.append(os.path.join(prefix, "lib", "site-packages"))
333 ---- Makefile.pre.in
334 -+++ Makefile.pre.in
335 -@@ -91,7 +91,7 @@
336 - MANDIR= @mandir@
337 - INCLUDEDIR= @includedir@
338 - CONFINCLUDEDIR= $(exec_prefix)/include
339 --SCRIPTDIR= $(prefix)/lib
340 -+SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@
341 -
342 - # Detailed destination directories
343 - BINLIBDEST= $(LIBDIR)/python$(VERSION)
344 ---- Modules/getpath.c
345 -+++ Modules/getpath.c
346 -@@ -129,7 +129,7 @@
347 - static char exec_prefix[MAXPATHLEN+1];
348 - static char progpath[MAXPATHLEN+1];
349 - static char *module_search_path = NULL;
350 --static char lib_python[] = "lib/python" VERSION;
351 -+static char lib_python[] = "@@GENTOO_LIBDIR@@/python" VERSION;
352 -
353 - static void
354 - reduce(char *dir)
355 -@@ -524,7 +524,7 @@
356 - }
357 - else
358 - strncpy(zip_path, PREFIX, MAXPATHLEN);
359 -- joinpath(zip_path, "lib/python00.zip");
360 -+ joinpath(zip_path, "@@GENTOO_LIBDIR@@/python00.zip");
361 - bufsz = strlen(zip_path); /* Replace "00" with version */
362 - zip_path[bufsz - 6] = VERSION[0];
363 - zip_path[bufsz - 5] = VERSION[2];
364 -@@ -534,7 +534,7 @@
365 - fprintf(stderr,
366 - "Could not find platform dependent libraries <exec_prefix>\n");
367 - strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
368 -- joinpath(exec_prefix, "lib/lib-dynload");
369 -+ joinpath(exec_prefix, "@@GENTOO_LIBDIR@@/lib-dynload");
370 - }
371 - /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
372 -
373 ---- Modules/Setup.dist
374 -+++ Modules/Setup.dist
375 -@@ -460,7 +460,7 @@
376 - # Andrew Kuchling's zlib module.
377 - # This require zlib 1.1.3 (or later).
378 - # See http://www.gzip.org/zlib/
379 --#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
380 -+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
381 -
382 - # Interface to the Expat XML parser
383 - #
384 ---- setup.py
385 -+++ setup.py
386 -@@ -420,8 +420,7 @@
387 - # if a file is found in one of those directories, it can
388 - # be assumed that no additional -I,-L directives are needed.
389 - lib_dirs = self.compiler.library_dirs + [
390 -- '/lib64', '/usr/lib64',
391 -- '/lib', '/usr/lib',
392 -+ '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
393 - ]
394 - inc_dirs = self.compiler.include_dirs + ['/usr/include']
395 - exts = []
396 -@@ -674,11 +673,11 @@
397 - elif curses_library:
398 - readline_libs.append(curses_library)
399 - elif self.compiler.find_library_file(lib_dirs +
400 -- ['/usr/lib/termcap'],
401 -+ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
402 - 'termcap'):
403 - readline_libs.append('termcap')
404 - exts.append( Extension('readline', ['readline.c'],
405 -- library_dirs=['/usr/lib/termcap'],
406 -+ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
407 - extra_link_args=readline_extra_link_args,
408 - libraries=readline_libs) )
409 - else:
410
411 diff --git a/dev-lang/python/files/2.6/05_all_verbose_building_of_extensions.patch b/dev-lang/python/files/2.6/05_all_verbose_building_of_extensions.patch
412 deleted file mode 100644
413 index de852be..0000000
414 --- a/dev-lang/python/files/2.6/05_all_verbose_building_of_extensions.patch
415 +++ /dev/null
416 @@ -1,10 +0,0 @@
417 ---- Makefile.pre.in
418 -+++ Makefile.pre.in
419 -@@ -395,7 +395,6 @@
420 - # Build the shared modules
421 - sharedmods: $(BUILDPYTHON)
422 - @case $$MAKEFLAGS in \
423 -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
424 - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
425 - esac
426 -
427
428 diff --git a/dev-lang/python/files/2.6/06_all_dbm_automagic.patch b/dev-lang/python/files/2.6/06_all_dbm_automagic.patch
429 deleted file mode 100644
430 index 9fc1031..0000000
431 --- a/dev-lang/python/files/2.6/06_all_dbm_automagic.patch
432 +++ /dev/null
433 @@ -1,52 +0,0 @@
434 ---- setup.py
435 -+++ setup.py
436 -@@ -1137,16 +1137,11 @@
437 -
438 - # The standard Unix dbm module:
439 - if platform not in ['cygwin']:
440 -- if find_file("ndbm.h", inc_dirs, []) is not None:
441 -- # Some systems have -lndbm, others don't
442 -- if self.compiler.find_library_file(lib_dirs, 'ndbm'):
443 -- ndbm_libs = ['ndbm']
444 -- else:
445 -- ndbm_libs = []
446 -- exts.append( Extension('dbm', ['dbmmodule.c'],
447 -- define_macros=[('HAVE_NDBM_H',None)],
448 -- libraries = ndbm_libs ) )
449 -- elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
450 -+ # To prevent automagic dependencies check for relevant modules in
451 -+ # disabled_module_list.
452 -+ if (self.compiler.find_library_file(lib_dirs, 'gdbm')
453 -+ and find_file("gdbm/ndbm.h", inc_dirs, []) is not None
454 -+ and 'gdbm' not in disabled_module_list):
455 - gdbm_libs = ['gdbm']
456 - if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
457 - gdbm_libs.append('gdbm_compat')
458 -@@ -1162,7 +1157,7 @@
459 - libraries = gdbm_libs ) )
460 - else:
461 - missing.append('dbm')
462 -- elif db_incs is not None:
463 -+ elif db_incs is not None and 'bsddb' not in disabled_module_list:
464 - exts.append( Extension('dbm', ['dbmmodule.c'],
465 - library_dirs=dblib_dir,
466 - runtime_library_dirs=dblib_dir,
467 -@@ -1170,6 +1165,18 @@
468 - define_macros=[('HAVE_BERKDB_H',None),
469 - ('DB_DBM_HSEARCH',None)],
470 - libraries=dblibs))
471 -+ # Check for ndbm.h here after checking berkdb because ndbm.h is
472 -+ # only provided by db-1*
473 -+ elif (find_file("ndbm.h", inc_dirs, []) is not None
474 -+ and 'bsddb' not in disabled_module_list):
475 -+ # Some systems have -lndbm, others don't
476 -+ if self.compiler.find_library_file(lib_dirs, 'ndbm'):
477 -+ ndbm_libs = ['ndbm']
478 -+ else:
479 -+ ndbm_libs = []
480 -+ exts.append( Extension('dbm', ['dbmmodule.c'],
481 -+ define_macros=[('HAVE_NDBM_H',None)],
482 -+ libraries = ndbm_libs ) )
483 - else:
484 - missing.append('dbm')
485 -
486
487 diff --git a/dev-lang/python/files/2.6/07_all_internal_expat.patch b/dev-lang/python/files/2.6/07_all_internal_expat.patch
488 deleted file mode 100644
489 index 3ffdae2..0000000
490 --- a/dev-lang/python/files/2.6/07_all_internal_expat.patch
491 +++ /dev/null
492 @@ -1,33 +0,0 @@
493 ---- setup.py
494 -+++ setup.py
495 -@@ -1326,18 +1326,15 @@
496 - #
497 - # More information on Expat can be found at www.libexpat.org.
498 - #
499 -- expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
500 -- define_macros = [
501 -- ('HAVE_EXPAT_CONFIG_H', '1'),
502 -- ]
503 -+ # Use system expat
504 -+ expatinc = '/usr/include'
505 -+ define_macros = []
506 -
507 - exts.append(Extension('pyexpat',
508 - define_macros = define_macros,
509 - include_dirs = [expatinc],
510 -+ libraries = ['expat'],
511 - sources = ['pyexpat.c',
512 -- 'expat/xmlparse.c',
513 -- 'expat/xmlrole.c',
514 -- 'expat/xmltok.c',
515 - ],
516 - ))
517 -
518 -@@ -1349,6 +1346,7 @@
519 - exts.append(Extension('_elementtree',
520 - define_macros = define_macros,
521 - include_dirs = [expatinc],
522 -+ libraries = ['expat'],
523 - sources = ['_elementtree.c'],
524 - ))
525 - else:
526
527 diff --git a/dev-lang/python/files/2.6/08_all_non-zero_exit_status_on_failure.patch b/dev-lang/python/files/2.6/08_all_non-zero_exit_status_on_failure.patch
528 deleted file mode 100644
529 index 8d0ebe8..0000000
530 --- a/dev-lang/python/files/2.6/08_all_non-zero_exit_status_on_failure.patch
531 +++ /dev/null
532 @@ -1,31 +0,0 @@
533 -https://bugs.gentoo.org/show_bug.cgi?id=281968
534 -http://bugs.python.org/issue6731
535 -
536 ---- setup.py
537 -+++ setup.py
538 -@@ -31,6 +31,8 @@
539 - disable_ssl = 0
540 -
541 -
542 -+exit_status = 0
543 -+
544 - def add_dir_to_list(dirlist, dir):
545 - """Add the directory 'dir' to the list 'dirlist' (at the front) if
546 - 1) 'dir' is not already in 'dirlist'
547 -@@ -279,6 +281,8 @@
548 - print
549 -
550 - if self.failed:
551 -+ global exit_status
552 -+ exit_status = 1
553 - failed = self.failed[:]
554 - print
555 - print "Failed to build these modules:"
556 -@@ -2050,6 +2054,7 @@
557 - 'Tools/scripts/2to3',
558 - 'Lib/smtpd.py']
559 - )
560 -+ sys.exit(exit_status)
561 -
562 - # --install-platlib
563 - if __name__ == '__main__':
564
565 diff --git a/dev-lang/python/files/2.6/09_all_use_external_libffi.patch b/dev-lang/python/files/2.6/09_all_use_external_libffi.patch
566 deleted file mode 100644
567 index 0c54246..0000000
568 --- a/dev-lang/python/files/2.6/09_all_use_external_libffi.patch
569 +++ /dev/null
570 @@ -1,51 +0,0 @@
571 -http://bugs.python.org/issue6943
572 -http://hg.python.org/cpython/rev/f02881332342
573 -http://hg.python.org/cpython/rev/6d9be1a97c17
574 -
575 ---- configure.in
576 -+++ configure.in
577 -@@ -2046,11 +2046,20 @@
578 - ],
579 - [AC_MSG_RESULT(no)])
580 -
581 -+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
582 -+
583 - # Check for use of the system libffi library
584 - AC_MSG_CHECKING(for --with-system-ffi)
585 - AC_ARG_WITH(system_ffi,
586 - AC_HELP_STRING(--with-system-ffi, build _ctypes module using an installed ffi library))
587 -
588 -+if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
589 -+ LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
590 -+else
591 -+ LIBFFI_INCLUDEDIR=""
592 -+fi
593 -+AC_SUBST(LIBFFI_INCLUDEDIR)
594 -+
595 - AC_MSG_RESULT($with_system_ffi)
596 -
597 - # Determine if signalmodule should be used.
598 ---- Makefile.pre.in
599 -+++ Makefile.pre.in
600 -@@ -202,6 +202,8 @@
601 - GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
602 -
603 -
604 -+LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
605 -+
606 - ##########################################################################
607 - # Parser
608 - PGEN= Parser/pgen$(EXE)
609 ---- setup.py
610 -+++ setup.py
611 -@@ -1929,7 +1929,9 @@
612 - # in /usr/include/ffi
613 - inc_dirs.append('/usr/include/ffi')
614 -
615 -- ffi_inc = find_file('ffi.h', [], inc_dirs)
616 -+ ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
617 -+ if not ffi_inc:
618 -+ ffi_inc = find_file('ffi.h', [], inc_dirs)
619 - if ffi_inc is not None:
620 - ffi_h = ffi_inc[0] + '/ffi.h'
621 - fp = open(ffi_h)
622
623 diff --git a/dev-lang/python/files/2.6/10_all_sys.platform_linux2.patch b/dev-lang/python/files/2.6/10_all_sys.platform_linux2.patch
624 deleted file mode 100644
625 index 40e4080..0000000
626 --- a/dev-lang/python/files/2.6/10_all_sys.platform_linux2.patch
627 +++ /dev/null
628 @@ -1,13 +0,0 @@
629 -http://bugs.python.org/issue12326
630 -http://hg.python.org/cpython/rev/c816479f6aaf
631 -
632 ---- configure.in
633 -+++ configure.in
634 -@@ -260,6 +260,7 @@
635 - MACHDEP="$ac_md_system$ac_md_release"
636 -
637 - case $MACHDEP in
638 -+ linux*) MACHDEP="linux2";;
639 - cygwin*) MACHDEP="cygwin";;
640 - darwin*) MACHDEP="darwin";;
641 - atheos*) MACHDEP="atheos";;
642
643 diff --git a/dev-lang/python/files/2.6/11_all_regenerate_platform-specific_modules.patch b/dev-lang/python/files/2.6/11_all_regenerate_platform-specific_modules.patch
644 deleted file mode 100644
645 index 425e149..0000000
646 --- a/dev-lang/python/files/2.6/11_all_regenerate_platform-specific_modules.patch
647 +++ /dev/null
648 @@ -1,110 +0,0 @@
649 -http://bugs.python.org/issue12619
650 -
651 ---- Lib/plat-aix4/regen
652 -+++ Lib/plat-aix4/regen
653 -@@ -5,4 +5,4 @@
654 - exit 1;;
655 - esac
656 - set -v
657 --h2py.py -i '(u_long)' /usr/include/netinet/in.h
658 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
659 ---- Lib/plat-linux2/regen
660 -+++ Lib/plat-linux2/regen
661 -@@ -5,4 +5,4 @@
662 - exit 1;;
663 - esac
664 - set -v
665 --h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
666 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h /usr/include/linux/cdrom.h
667 ---- Lib/plat-sunos5/regen
668 -+++ Lib/plat-sunos5/regen
669 -@@ -5,5 +5,4 @@
670 - exit 1;;
671 - esac
672 - set -v
673 --h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
674 --
675 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
676 ---- Lib/plat-unixware7/regen
677 -+++ Lib/plat-unixware7/regen
678 -@@ -5,5 +5,5 @@
679 - exit 1;;
680 - esac
681 - set -v
682 --h2py -i '(u_long)' /usr/include/netinet/in.h
683 --h2py /usr/include/sys/stropts.h
684 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
685 -+python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h
686 ---- Makefile.pre.in
687 -+++ Makefile.pre.in
688 -@@ -355,7 +355,7 @@
689 -
690 - # Default target
691 - all: build_all
692 --build_all: $(BUILDPYTHON) oldsharedmods sharedmods
693 -+build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods
694 -
695 - # Compile a binary with gcc profile guided optimization.
696 - profile-opt:
697 -@@ -400,6 +400,26 @@
698 - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
699 - esac
700 -
701 -+# Build the platform-specific modules
702 -+platformspecificmods: $(BUILDPYTHON) sharedmods
703 -+ @PLATDIR=$(PLATDIR); \
704 -+ if test ! -f $(srcdir)/Lib/$(PLATDIR)/regen; then \
705 -+ $(INSTALL) -d $(srcdir)/Lib/$(PLATDIR); \
706 -+ if test -f $(srcdir)/Lib/$${PLATDIR%?}/regen; then \
707 -+ cp $(srcdir)/Lib/$${PLATDIR%?}/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
708 -+ else \
709 -+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
710 -+ fi \
711 -+ fi
712 -+ @EXE="$(BUILDEXE)"; export EXE; \
713 -+ PATH="`pwd`:$$PATH"; export PATH; \
714 -+ PYTHONPATH="`pwd`/Lib"; export PYTHONPATH; \
715 -+ cd $(srcdir)/Lib/$(PLATDIR); \
716 -+ $(RUNSHARED) ./regen || exit 1; \
717 -+ for module in *.py; do \
718 -+ $(RUNSHARED) $(BUILDPYTHON) -c "import py_compile; py_compile.compile('$$module', cfile='/dev/null', doraise=True)" || exit 1; \
719 -+ done
720 -+
721 - # Build static library
722 - # avoid long command lines, same as LIBRARY_OBJS
723 - $(LIBRARY): $(LIBRARY_OBJS)
724 -@@ -845,7 +865,7 @@
725 - multiprocessing multiprocessing/dummy \
726 - lib-old \
727 - curses pydoc_data $(MACHDEPS)
728 --libinstall: build_all $(srcdir)/Lib/$(PLATDIR)
729 -+libinstall: build_all
730 - @for i in $(SCRIPTDIR) $(LIBDEST); \
731 - do \
732 - if test ! -d $(DESTDIR)$$i; then \
733 -@@ -920,16 +940,6 @@
734 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
735 - ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
736 -
737 --# Create the PLATDIR source directory, if one wasn't distributed..
738 --$(srcdir)/Lib/$(PLATDIR):
739 -- mkdir $(srcdir)/Lib/$(PLATDIR)
740 -- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
741 -- export PATH; PATH="`pwd`:$$PATH"; \
742 -- export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
743 -- export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
744 -- export EXE; EXE="$(BUILDEXE)"; \
745 -- cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
746 --
747 - # Install the include files
748 - INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
749 - inclinstall:
750 -@@ -1212,7 +1222,7 @@
751 - Python/thread.o: @THREADHEADERS@
752 -
753 - # Declare targets that aren't real files
754 --.PHONY: all build_all sharedmods oldsharedmods test quicktest memtest
755 -+.PHONY: all build_all sharedmods oldsharedmods platformspecificmods test quicktest memtest
756 - .PHONY: install altinstall oldsharedinstall bininstall altbininstall
757 - .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
758 - .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
759
760 diff --git a/dev-lang/python/files/2.6/21_all_distutils_c++.patch b/dev-lang/python/files/2.6/21_all_distutils_c++.patch
761 deleted file mode 100644
762 index 7e1e89a..0000000
763 --- a/dev-lang/python/files/2.6/21_all_distutils_c++.patch
764 +++ /dev/null
765 @@ -1,426 +0,0 @@
766 -http://bugs.python.org/issue1222585
767 -
768 ---- configure.in
769 -+++ configure.in
770 -@@ -1723,6 +1723,7 @@
771 - # Set info about shared libraries.
772 - AC_SUBST(SO)
773 - AC_SUBST(LDSHARED)
774 -+AC_SUBST(LDCXXSHARED)
775 - AC_SUBST(BLDSHARED)
776 - AC_SUBST(CCSHARED)
777 - AC_SUBST(LINKFORSHARED)
778 -@@ -1775,36 +1776,47 @@
779 - IRIX/5*) LDSHARED="ld -shared";;
780 - IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
781 - SunOS/5*)
782 -- if test "$GCC" = "yes"
783 -- then LDSHARED='$(CC) -shared'
784 -- else LDSHARED='$(CC) -G';
785 -+ if test "$GCC" = "yes" ; then
786 -+ LDSHARED='$(CC) -shared'
787 -+ LDCXXSHARED='$(CXX) -shared'
788 -+ else
789 -+ LDSHARED='$(CC) -G'
790 -+ LDCXXSHARED='$(CXX) -G'
791 - fi ;;
792 - hp*|HP*)
793 -- if test "$GCC" = "yes"
794 -- then LDSHARED='$(CC) -shared'
795 -- else LDSHARED='ld -b';
796 -+ if test "$GCC" = "yes" ; then
797 -+ LDSHARED='$(CC) -shared'
798 -+ LDCXXSHARED='$(CXX) -shared'
799 -+ else
800 -+ LDSHARED='ld -b'
801 - fi ;;
802 - OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
803 - Darwin/1.3*)
804 - LDSHARED='$(CC) $(LDFLAGS) -bundle'
805 -+ LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
806 - if test "$enable_framework" ; then
807 - # Link against the framework. All externals should be defined.
808 - BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
809 - LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
810 -+ LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
811 - else
812 - # No framework. Ignore undefined symbols, assuming they come from Python
813 - LDSHARED="$LDSHARED -undefined suppress"
814 -+ LDCXXSHARED="$LDCXXSHARED -undefined suppress"
815 - fi ;;
816 - Darwin/1.4*|Darwin/5.*|Darwin/6.*)
817 - LDSHARED='$(CC) $(LDFLAGS) -bundle'
818 -+ LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
819 - if test "$enable_framework" ; then
820 - # Link against the framework. All externals should be defined.
821 - BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
822 - LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
823 -+ LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
824 - else
825 - # No framework, use the Python app as bundle-loader
826 - BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
827 - LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
828 -+ LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
829 - fi ;;
830 - Darwin/*)
831 - # Use -undefined dynamic_lookup whenever possible (10.3 and later).
832 -@@ -1816,26 +1828,35 @@
833 - LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
834 - fi
835 - LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
836 -+ LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
837 - BLDSHARED="$LDSHARED"
838 - else
839 - LDSHARED='$(CC) $(LDFLAGS) -bundle'
840 -+ LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
841 - if test "$enable_framework" ; then
842 - # Link against the framework. All externals should be defined.
843 - BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
844 - LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
845 -+ LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
846 - else
847 - # No framework, use the Python app as bundle-loader
848 - BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
849 - LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
850 -+ LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
851 - fi
852 - fi
853 - ;;
854 -- Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
855 -- BSD/OS*/4*) LDSHARED="gcc -shared";;
856 -+ Linux*|GNU*|QNX*)
857 -+ LDSHARED='$(CC) -shared'
858 -+ LDCXXSHARED='$(CXX) -shared';;
859 -+ BSD/OS*/4*)
860 -+ LDSHARED="gcc -shared"
861 -+ LDCXXSHARED="g++ -shared";;
862 - FreeBSD*)
863 - if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
864 - then
865 - LDSHARED='$(CC) -shared ${LDFLAGS}'
866 -+ LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
867 - else
868 - LDSHARED="ld -Bshareable ${LDFLAGS}"
869 - fi;;
870 -@@ -1843,6 +1864,7 @@
871 - if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
872 - then
873 - LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
874 -+ LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
875 - else
876 - case `uname -r` in
877 - [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
878 -@@ -1850,23 +1872,36 @@
879 - ;;
880 - *)
881 - LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
882 -+ LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
883 - ;;
884 - esac
885 - fi;;
886 -- NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
887 -+ NetBSD*|DragonFly*)
888 -+ LDSHARED="cc -shared ${LDFLAGS}"
889 -+ LDCXXSHARED="c++ -shared ${LDFLAGS}";;
890 - OpenUNIX*|UnixWare*)
891 -- if test "$GCC" = "yes"
892 -- then LDSHARED='$(CC) -shared'
893 -- else LDSHARED='$(CC) -G'
894 -+ if test "$GCC" = "yes" ; then
895 -+ LDSHARED='$(CC) -shared'
896 -+ LDCXXSHARED='$(CXX) -shared'
897 -+ else
898 -+ LDSHARED='$(CC) -G'
899 -+ LDCXXSHARED='$(CXX) -G'
900 - fi;;
901 -- SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
902 -+ SCO_SV*)
903 -+ LDSHARED='$(CC) -Wl,-G,-Bexport'
904 -+ LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
905 - Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
906 -- CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
907 -- atheos*) LDSHARED="gcc -shared";;
908 -+ CYGWIN*)
909 -+ LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
910 -+ LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
911 -+ atheos*)
912 -+ LDSHARED="gcc -shared"
913 -+ LDCXXSHARED="g++ -shared";;
914 - *) LDSHARED="ld";;
915 - esac
916 - fi
917 - AC_MSG_RESULT($LDSHARED)
918 -+LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
919 - BLDSHARED=${BLDSHARED-$LDSHARED}
920 - # CCSHARED are the C *flags* used to create objects to go into a shared
921 - # library (module) -- this is only needed for a few systems
922 ---- Lib/distutils/cygwinccompiler.py
923 -+++ Lib/distutils/cygwinccompiler.py
924 -@@ -132,9 +132,13 @@
925 - self.set_executables(compiler='gcc -mcygwin -O -Wall',
926 - compiler_so='gcc -mcygwin -mdll -O -Wall',
927 - compiler_cxx='g++ -mcygwin -O -Wall',
928 -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
929 - linker_exe='gcc -mcygwin',
930 - linker_so=('%s -mcygwin %s' %
931 -- (self.linker_dll, shared_option)))
932 -+ (self.linker_dll, shared_option)),
933 -+ linker_exe_cxx='g++ -mcygwin',
934 -+ linker_so_cxx=('%s -mcygwin %s' %
935 -+ (self.linker_dll, shared_option)))
936 -
937 - # cygwin and mingw32 need different sets of libraries
938 - if self.gcc_version == "2.91.57":
939 -@@ -160,8 +164,12 @@
940 - raise CompileError, msg
941 - else: # for other files use the C-compiler
942 - try:
943 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
944 -- extra_postargs)
945 -+ if self.detect_language(src) == 'c++':
946 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
947 -+ extra_postargs)
948 -+ else:
949 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
950 -+ extra_postargs)
951 - except DistutilsExecError, msg:
952 - raise CompileError, msg
953 -
954 -@@ -322,10 +330,15 @@
955 - self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
956 - compiler_so='gcc -mno-cygwin -mdll -O -Wall',
957 - compiler_cxx='g++ -mno-cygwin -O -Wall',
958 -+ compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
959 - linker_exe='gcc -mno-cygwin',
960 - linker_so='%s -mno-cygwin %s %s'
961 - % (self.linker_dll, shared_option,
962 -- entry_point))
963 -+ entry_point),
964 -+ linker_exe_cxx='g++ -mno-cygwin',
965 -+ linker_so_cxx='%s -mno-cygwin %s %s'
966 -+ % (self.linker_dll, shared_option,
967 -+ entry_point))
968 - # Maybe we should also append -mthreads, but then the finished
969 - # dlls need another dll (mingwm10.dll see Mingw32 docs)
970 - # (-mthreads: Support thread-safe exception handling on `Mingw32')
971 ---- Lib/distutils/emxccompiler.py
972 -+++ Lib/distutils/emxccompiler.py
973 -@@ -65,8 +65,12 @@
974 - # XXX optimization, warnings etc. should be customizable.
975 - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
976 - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
977 -+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
978 -+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
979 - linker_exe='gcc -Zomf -Zmt -Zcrtdll',
980 -- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
981 -+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
982 -+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
983 -+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
984 -
985 - # want the gcc library statically linked (so that we don't have
986 - # to distribute a version dependent on the compiler we have)
987 -@@ -83,8 +87,12 @@
988 - raise CompileError, msg
989 - else: # for other files use the C-compiler
990 - try:
991 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
992 -- extra_postargs)
993 -+ if self.detect_language(src) == 'c++':
994 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
995 -+ extra_postargs)
996 -+ else:
997 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
998 -+ extra_postargs)
999 - except DistutilsExecError, msg:
1000 - raise CompileError, msg
1001 -
1002 ---- Lib/distutils/sysconfig.py
1003 -+++ Lib/distutils/sysconfig.py
1004 -@@ -167,9 +167,12 @@
1005 - varies across Unices and is stored in Python's Makefile.
1006 - """
1007 - if compiler.compiler_type == "unix":
1008 -- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \
1009 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
1010 -- 'CCSHARED', 'LDSHARED', 'SO')
1011 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext) = \
1012 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED',
1013 -+ 'LDCXXSHARED', 'SO')
1014 -+
1015 -+ cflags = ''
1016 -+ cxxflags = ''
1017 -
1018 - if 'CC' in os.environ:
1019 - cc = os.environ['CC']
1020 -@@ -177,28 +180,40 @@
1021 - cxx = os.environ['CXX']
1022 - if 'LDSHARED' in os.environ:
1023 - ldshared = os.environ['LDSHARED']
1024 -+ if 'LDCXXSHARED' in os.environ:
1025 -+ ldcxxshared = os.environ['LDCXXSHARED']
1026 - if 'CPP' in os.environ:
1027 - cpp = os.environ['CPP']
1028 - else:
1029 - cpp = cc + " -E" # not always
1030 - if 'LDFLAGS' in os.environ:
1031 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
1032 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
1033 - if 'CFLAGS' in os.environ:
1034 -- cflags = opt + ' ' + os.environ['CFLAGS']
1035 -+ cflags = os.environ['CFLAGS']
1036 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
1037 -+ if 'CXXFLAGS' in os.environ:
1038 -+ cxxflags = os.environ['CXXFLAGS']
1039 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
1040 - if 'CPPFLAGS' in os.environ:
1041 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
1042 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
1043 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
1044 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
1045 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
1046 -
1047 - cc_cmd = cc + ' ' + cflags
1048 -+ cxx_cmd = cxx + ' ' + cxxflags
1049 - compiler.set_executables(
1050 - preprocessor=cpp,
1051 - compiler=cc_cmd,
1052 - compiler_so=cc_cmd + ' ' + ccshared,
1053 -- compiler_cxx=cxx,
1054 -+ compiler_cxx=cxx_cmd,
1055 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
1056 - linker_so=ldshared,
1057 -- linker_exe=cc)
1058 -+ linker_exe=cc,
1059 -+ linker_so_cxx=ldcxxshared,
1060 -+ linker_exe_cxx=cxx)
1061 -
1062 - compiler.shared_lib_extension = so_ext
1063 -
1064 -@@ -546,7 +561,7 @@
1065 - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
1066 - # a number of derived variables. These need to be
1067 - # patched up as well.
1068 -- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
1069 -+ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
1070 - flags = _config_vars[key]
1071 - flags = re.sub('-arch\s+\w+\s', ' ', flags)
1072 - flags = re.sub('-isysroot [^ \t]*', ' ', flags)
1073 -@@ -565,7 +580,7 @@
1074 - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
1075 - # a number of derived variables. These need to be
1076 - # patched up as well.
1077 -- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
1078 -+ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
1079 -
1080 - flags = _config_vars[key]
1081 - flags = re.sub('-arch\s+\w+\s', ' ', flags)
1082 -@@ -589,7 +604,7 @@
1083 - for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
1084 - # a number of derived variables. These need to be
1085 - # patched up as well.
1086 -- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
1087 -+ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
1088 -
1089 - flags = _config_vars[key]
1090 - flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags)
1091 ---- Lib/distutils/unixccompiler.py
1092 -+++ Lib/distutils/unixccompiler.py
1093 -@@ -114,14 +114,17 @@
1094 - # are pretty generic; they will probably have to be set by an outsider
1095 - # (eg. using information discovered by the sysconfig about building
1096 - # Python extensions).
1097 -- executables = {'preprocessor' : None,
1098 -- 'compiler' : ["cc"],
1099 -- 'compiler_so' : ["cc"],
1100 -- 'compiler_cxx' : ["cc"],
1101 -- 'linker_so' : ["cc", "-shared"],
1102 -- 'linker_exe' : ["cc"],
1103 -- 'archiver' : ["ar", "-cr"],
1104 -- 'ranlib' : None,
1105 -+ executables = {'preprocessor' : None,
1106 -+ 'compiler' : ["cc"],
1107 -+ 'compiler_so' : ["cc"],
1108 -+ 'compiler_cxx' : ["c++"],
1109 -+ 'compiler_so_cxx' : ["c++"],
1110 -+ 'linker_so' : ["cc", "-shared"],
1111 -+ 'linker_exe' : ["cc"],
1112 -+ 'linker_so_cxx' : ["c++", "-shared"],
1113 -+ 'linker_exe_cxx' : ["c++"],
1114 -+ 'archiver' : ["ar", "-cr"],
1115 -+ 'ranlib' : None,
1116 - }
1117 -
1118 - if sys.platform[:6] == "darwin":
1119 -@@ -171,11 +174,18 @@
1120 -
1121 - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
1122 - compiler_so = self.compiler_so
1123 -+ compiler_so_cxx = self.compiler_so_cxx
1124 - if sys.platform == 'darwin':
1125 - compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs)
1126 -+ compiler_so_cxx = _darwin_compiler_fixup(compiler_so_cxx, cc_args +
1127 -+ extra_postargs)
1128 - try:
1129 -- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
1130 -- extra_postargs)
1131 -+ if self.detect_language(src) == 'c++':
1132 -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
1133 -+ extra_postargs)
1134 -+ else:
1135 -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
1136 -+ extra_postargs)
1137 - except DistutilsExecError, msg:
1138 - raise CompileError, msg
1139 -
1140 -@@ -232,23 +242,16 @@
1141 - ld_args.extend(extra_postargs)
1142 - self.mkpath(os.path.dirname(output_filename))
1143 - try:
1144 -- if target_desc == CCompiler.EXECUTABLE:
1145 -- linker = self.linker_exe[:]
1146 -+ if target_lang == "c++":
1147 -+ if target_desc == CCompiler.EXECUTABLE:
1148 -+ linker = self.linker_exe_cxx[:]
1149 -+ else:
1150 -+ linker = self.linker_so_cxx[:]
1151 - else:
1152 -- linker = self.linker_so[:]
1153 -- if target_lang == "c++" and self.compiler_cxx:
1154 -- # skip over environment variable settings if /usr/bin/env
1155 -- # is used to set up the linker's environment.
1156 -- # This is needed on OSX. Note: this assumes that the
1157 -- # normal and C++ compiler have the same environment
1158 -- # settings.
1159 -- i = 0
1160 -- if os.path.basename(linker[0]) == "env":
1161 -- i = 1
1162 -- while '=' in linker[i]:
1163 -- i = i + 1
1164 --
1165 -- linker[i] = self.compiler_cxx[i]
1166 -+ if target_desc == CCompiler.EXECUTABLE:
1167 -+ linker = self.linker_exe[:]
1168 -+ else:
1169 -+ linker = self.linker_so[:]
1170 -
1171 - if sys.platform == 'darwin':
1172 - linker = _darwin_compiler_fixup(linker, ld_args)
1173 ---- Makefile.pre.in
1174 -+++ Makefile.pre.in
1175 -@@ -104,6 +104,7 @@
1176 - SO= @SO@
1177 - LDSHARED= @LDSHARED@
1178 - BLDSHARED= @BLDSHARED@
1179 -+LDCXXSHARED= @LDCXXSHARED@
1180 - DESTSHARED= $(BINLIBDEST)/lib-dynload
1181 -
1182 - # Executable suffix (.exe on Windows and Mac OS X)
1183 -@@ -397,7 +398,7 @@
1184 - # Build the shared modules
1185 - sharedmods: $(BUILDPYTHON)
1186 - @case $$MAKEFLAGS in \
1187 -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
1188 -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
1189 - esac
1190 -
1191 - # Build the platform-specific modules
1192
1193 diff --git a/dev-lang/python/files/2.6/22_all_turkish_locale.patch b/dev-lang/python/files/2.6/22_all_turkish_locale.patch
1194 deleted file mode 100644
1195 index 1321c3c..0000000
1196 --- a/dev-lang/python/files/2.6/22_all_turkish_locale.patch
1197 +++ /dev/null
1198 @@ -1,128 +0,0 @@
1199 -https://bugs.gentoo.org/show_bug.cgi?id=250075
1200 -http://bugs.python.org/issue1813
1201 -
1202 ---- Lib/decimal.py
1203 -+++ Lib/decimal.py
1204 -@@ -153,6 +153,13 @@
1205 - ROUND_HALF_DOWN = 'ROUND_HALF_DOWN'
1206 - ROUND_05UP = 'ROUND_05UP'
1207 -
1208 -+import string
1209 -+
1210 -+def ascii_upper(s):
1211 -+ trans_table = string.maketrans(string.ascii_lowercase, string.ascii_uppercase)
1212 -+ return s.translate(trans_table)
1213 -+
1214 -+
1215 - # Errors
1216 -
1217 - class DecimalException(ArithmeticError):
1218 -@@ -3645,7 +3652,7 @@
1219 - if name.startswith('_round_')]
1220 - for name in rounding_functions:
1221 - # name is like _round_half_even, goes to the global ROUND_HALF_EVEN value.
1222 -- globalname = name[1:].upper()
1223 -+ globalname = ascii_upper(name[1:])
1224 - val = globals()[globalname]
1225 - Decimal._pick_rounding_function[val] = name
1226 -
1227 ---- Lib/email/__init__.py
1228 -+++ Lib/email/__init__.py
1229 -@@ -109,15 +109,19 @@
1230 - 'Text',
1231 - ]
1232 -
1233 -+import string
1234 -+lower_map = string.maketrans(string.ascii_uppercase, string.ascii_lowercase)
1235 -+
1236 -+
1237 - for _name in _LOWERNAMES:
1238 -- importer = LazyImporter(_name.lower())
1239 -+ importer = LazyImporter(_name.translate(lower_map))
1240 - sys.modules['email.' + _name] = importer
1241 - setattr(sys.modules['email'], _name, importer)
1242 -
1243 -
1244 - import email.mime
1245 - for _name in _MIMENAMES:
1246 -- importer = LazyImporter('mime.' + _name.lower())
1247 -+ importer = LazyImporter('mime.' + _name.translate(lower_map))
1248 - sys.modules['email.MIME' + _name] = importer
1249 - setattr(sys.modules['email'], 'MIME' + _name, importer)
1250 - setattr(sys.modules['email.mime'], _name, importer)
1251 ---- Lib/locale.py
1252 -+++ Lib/locale.py
1253 -@@ -313,6 +313,14 @@
1254 - # overridden below)
1255 - _setlocale = setlocale
1256 -
1257 -+# Avoid relying on the locale-dependent .lower() method
1258 -+# (see bug #1813).
1259 -+_ascii_lower_map = ''.join(
1260 -+ chr(x + 32 if x >= ord('A') and x <= ord('Z') else x)
1261 -+ for x in range(256)
1262 -+)
1263 -+
1264 -+
1265 - def normalize(localename):
1266 -
1267 - """ Returns a normalized locale code for the given locale
1268 -@@ -330,7 +338,7 @@
1269 -
1270 - """
1271 - # Normalize the locale name and extract the encoding
1272 -- fullname = localename.lower()
1273 -+ fullname = localename.encode('ascii').translate(_ascii_lower_map)
1274 - if ':' in fullname:
1275 - # ':' is sometimes used as encoding delimiter.
1276 - fullname = fullname.replace(':', '.')
1277 ---- Lib/test/test_codecs.py
1278 -+++ Lib/test/test_codecs.py
1279 -@@ -1,5 +1,6 @@
1280 - from test import test_support
1281 - import unittest
1282 -+import locale
1283 - import codecs
1284 - import sys, StringIO, _testcapi
1285 -
1286 -@@ -1133,6 +1134,16 @@
1287 - self.assertRaises(LookupError, codecs.lookup, "__spam__")
1288 - self.assertRaises(LookupError, codecs.lookup, " ")
1289 -
1290 -+ def test_lookup_with_locale(self):
1291 -+ # Bug #1813: when normalizing codec name, lowercasing must be locale
1292 -+ # agnostic, otherwise the looked up codec name might end up wrong.
1293 -+ try:
1294 -+ locale.setlocale(locale.LC_CTYPE, 'tr')
1295 -+ except locale.Error:
1296 -+ # SKIPped test
1297 -+ return
1298 -+ codecs.lookup('ISO8859_1')
1299 -+
1300 - def test_getencoder(self):
1301 - self.assertRaises(TypeError, codecs.getencoder)
1302 - self.assertRaises(LookupError, codecs.getencoder, "__spam__")
1303 ---- Python/codecs.c
1304 -+++ Python/codecs.c
1305 -@@ -45,6 +45,12 @@
1306 - return -1;
1307 - }
1308 -
1309 -+/* isupper() forced into the ASCII locale */
1310 -+#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A))
1311 -+/* tolower() forced into the ASCII locale */
1312 -+#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x))
1313 -+
1314 -+
1315 - /* Convert a string to a normalized Python string: all characters are
1316 - converted to lower case, spaces are replaced with underscores. */
1317 -
1318 -@@ -70,7 +76,7 @@
1319 - if (ch == ' ')
1320 - ch = '-';
1321 - else
1322 -- ch = tolower(Py_CHARMASK(ch));
1323 -+ ch = ascii_tolower(Py_CHARMASK(ch));
1324 - p[i] = ch;
1325 - }
1326 - return v;
1327
1328 diff --git a/dev-lang/python/files/2.6/23_all_arm_OABI.patch b/dev-lang/python/files/2.6/23_all_arm_OABI.patch
1329 deleted file mode 100644
1330 index e373281..0000000
1331 --- a/dev-lang/python/files/2.6/23_all_arm_OABI.patch
1332 +++ /dev/null
1333 @@ -1,185 +0,0 @@
1334 -https://bugs.gentoo.org/show_bug.cgi?id=266703
1335 -http://bugs.python.org/issue1762561
1336 -
1337 ---- Objects/floatobject.c
1338 -+++ Objects/floatobject.c
1339 -@@ -1691,9 +1691,18 @@
1340 - /* this is for the benefit of the pack/unpack routines below */
1341 -
1342 - typedef enum {
1343 -- unknown_format, ieee_big_endian_format, ieee_little_endian_format
1344 -+ unknown_format,
1345 -+ ieee_big_endian_format,
1346 -+ ieee_little_endian_format,
1347 -+ ieee_arm_mixed_endian_format
1348 - } float_format_type;
1349 -
1350 -+/* byte order of a C double for each of the recognised IEEE formats */
1351 -+
1352 -+static const unsigned char BIG_ENDIAN_BYTEORDER[8] = {7,6,5,4,3,2,1,0};
1353 -+static const unsigned char LITTLE_ENDIAN_BYTEORDER[8] = {0,1,2,3,4,5,6,7};
1354 -+static const unsigned char ARM_MIXED_ENDIAN_BYTEORDER[8] = {4,5,6,7,0,1,2,3};
1355 -+
1356 - static float_format_type double_format, float_format;
1357 - static float_format_type detected_double_format, detected_float_format;
1358 -
1359 -@@ -1730,6 +1739,8 @@
1360 - return PyString_FromString("IEEE, little-endian");
1361 - case ieee_big_endian_format:
1362 - return PyString_FromString("IEEE, big-endian");
1363 -+ case ieee_arm_mixed_endian_format:
1364 -+ return PyString_FromString("IEEE, ARM mixed-endian");
1365 - default:
1366 - Py_FatalError("insane float_format or double_format");
1367 - return NULL;
1368 -@@ -1743,8 +1754,9 @@
1369 - "used in Python's test suite.\n"
1370 - "\n"
1371 - "typestr must be 'double' or 'float'. This function returns whichever of\n"
1372 --"'unknown', 'IEEE, big-endian' or 'IEEE, little-endian' best describes the\n"
1373 --"format of floating point numbers used by the C type named by typestr.");
1374 -+"'unknown', 'IEEE, big-endian', 'IEEE, little-endian' or\n"
1375 -+"'IEEE, ARM mixed-endian' best describes the format of floating-point\n"
1376 -+"numbers used by the C type named by typestr.");
1377 -
1378 - static PyObject *
1379 - float_setformat(PyTypeObject *v, PyObject* args)
1380 -@@ -1782,11 +1794,15 @@
1381 - else if (strcmp(format, "IEEE, big-endian") == 0) {
1382 - f = ieee_big_endian_format;
1383 - }
1384 -+ else if (strcmp(format, "IEEE, ARM mixed-endian") == 0 &&
1385 -+ p == &double_format) {
1386 -+ f = ieee_arm_mixed_endian_format;
1387 -+ }
1388 - else {
1389 - PyErr_SetString(PyExc_ValueError,
1390 - "__setformat__() argument 2 must be "
1391 -- "'unknown', 'IEEE, little-endian' or "
1392 -- "'IEEE, big-endian'");
1393 -+ "'unknown', 'IEEE, little-endian', "
1394 -+ "'IEEE, big-endian' or 'IEEE, ARM mixed-endian'");
1395 - return NULL;
1396 -
1397 - }
1398 -@@ -1809,8 +1825,10 @@
1399 - "used in Python's test suite.\n"
1400 - "\n"
1401 - "typestr must be 'double' or 'float'. fmt must be one of 'unknown',\n"
1402 --"'IEEE, big-endian' or 'IEEE, little-endian', and in addition can only be\n"
1403 --"one of the latter two if it appears to match the underlying C reality.\n"
1404 -+"'IEEE, big-endian', 'IEEE, little-endian' or 'IEEE, ARM mixed-endian'\n"
1405 -+"and in addition can only be one of the last three if it appears to\n"
1406 -+"match the underlying C reality. Note that the ARM mixed-endian\n"
1407 -+"format can only be set for the 'double' type, not for 'float'.\n"
1408 - "\n"
1409 - "Overrides the automatic determination of C-level floating point type.\n"
1410 - "This affects how floats are converted to and from binary strings.");
1411 -@@ -2005,7 +2023,11 @@
1412 - Note that if we're on some whacked-out platform which uses
1413 - IEEE formats but isn't strictly little-endian or big-
1414 - endian, we will fall back to the portable shifts & masks
1415 -- method. */
1416 -+ method.
1417 -+
1418 -+ Addendum: We also attempt to detect the mixed-endian IEEE format
1419 -+ used by the ARM old ABI (OABI) and also used by the FPA
1420 -+ floating-point unit on some older ARM processors. */
1421 -
1422 - #if SIZEOF_DOUBLE == 8
1423 - {
1424 -@@ -2014,6 +2036,8 @@
1425 - detected_double_format = ieee_big_endian_format;
1426 - else if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
1427 - detected_double_format = ieee_little_endian_format;
1428 -+ else if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
1429 -+ detected_double_format = ieee_arm_mixed_endian_format;
1430 - else
1431 - detected_double_format = unknown_format;
1432 - }
1433 -@@ -2353,17 +2377,31 @@
1434 - }
1435 - else {
1436 - const char *s = (char*)&x;
1437 -- int i, incr = 1;
1438 -+ int i;
1439 -+ const unsigned char *byteorder;
1440 -
1441 -- if ((double_format == ieee_little_endian_format && !le)
1442 -- || (double_format == ieee_big_endian_format && le)) {
1443 -- p += 7;
1444 -- incr = -1;
1445 -+ switch (double_format) {
1446 -+ case ieee_little_endian_format:
1447 -+ byteorder = LITTLE_ENDIAN_BYTEORDER;
1448 -+ break;
1449 -+ case ieee_big_endian_format:
1450 -+ byteorder = BIG_ENDIAN_BYTEORDER;
1451 -+ break;
1452 -+ case ieee_arm_mixed_endian_format:
1453 -+ byteorder = ARM_MIXED_ENDIAN_BYTEORDER;
1454 -+ break;
1455 -+ default:
1456 -+ Py_FatalError("insane float_format or double_format");
1457 -+ return -1;
1458 - }
1459 -
1460 -- for (i = 0; i < 8; i++) {
1461 -- *p = *s++;
1462 -- p += incr;
1463 -+ if (le) {
1464 -+ for (i = 0; i < 8; i++)
1465 -+ p[byteorder[i]] = *s++;
1466 -+ }
1467 -+ else {
1468 -+ for (i = 0; i < 8; i++)
1469 -+ p[7-byteorder[i]] = *s++;
1470 - }
1471 - return 0;
1472 - }
1473 -@@ -2522,22 +2560,33 @@
1474 - }
1475 - else {
1476 - double x;
1477 -+ char *s = (char*)&x;
1478 -+ const unsigned char *byteorder;
1479 -+ int i;
1480 -+
1481 -+ switch (double_format) {
1482 -+ case ieee_little_endian_format:
1483 -+ byteorder = LITTLE_ENDIAN_BYTEORDER;
1484 -+ break;
1485 -+ case ieee_big_endian_format:
1486 -+ byteorder = BIG_ENDIAN_BYTEORDER;
1487 -+ break;
1488 -+ case ieee_arm_mixed_endian_format:
1489 -+ byteorder = ARM_MIXED_ENDIAN_BYTEORDER;
1490 -+ break;
1491 -+ default:
1492 -+ Py_FatalError("insane float_format or double_format");
1493 -+ return -1.0;
1494 -+ }
1495 -
1496 -- if ((double_format == ieee_little_endian_format && !le)
1497 -- || (double_format == ieee_big_endian_format && le)) {
1498 -- char buf[8];
1499 -- char *d = &buf[7];
1500 -- int i;
1501 --
1502 -- for (i = 0; i < 8; i++) {
1503 -- *d-- = *p++;
1504 -- }
1505 -- memcpy(&x, buf, 8);
1506 -+ if (le) {
1507 -+ for (i=0; i<8; i++)
1508 -+ *s++ = p[byteorder[i]];
1509 - }
1510 - else {
1511 -- memcpy(&x, p, 8);
1512 -+ for (i=0; i<8; i++)
1513 -+ *s++ = p[7-byteorder[i]];
1514 - }
1515 --
1516 - return x;
1517 - }
1518 - }
1519
1520 diff --git a/dev-lang/python/files/2.6/24_all_ctypes_mmap_wx.patch b/dev-lang/python/files/2.6/24_all_ctypes_mmap_wx.patch
1521 deleted file mode 100644
1522 index 918d97c..0000000
1523 --- a/dev-lang/python/files/2.6/24_all_ctypes_mmap_wx.patch
1524 +++ /dev/null
1525 @@ -1,124 +0,0 @@
1526 -https://bugs.gentoo.org/show_bug.cgi?id=329499
1527 -http://bugs.python.org/issue5504
1528 -http://hg.python.org/cpython/rev/e13ea83e2edb
1529 -
1530 ---- Modules/_ctypes/callbacks.c
1531 -+++ Modules/_ctypes/callbacks.c
1532 -@@ -21,8 +21,8 @@
1533 - Py_XDECREF(self->converters);
1534 - Py_XDECREF(self->callable);
1535 - Py_XDECREF(self->restype);
1536 -- if (self->pcl)
1537 -- FreeClosure(self->pcl);
1538 -+ if (self->pcl_write)
1539 -+ ffi_closure_free(self->pcl_write);
1540 - PyObject_GC_Del(self);
1541 - }
1542 -
1543 -@@ -373,7 +373,8 @@
1544 - return NULL;
1545 - }
1546 -
1547 -- p->pcl = NULL;
1548 -+ p->pcl_exec = NULL;
1549 -+ p->pcl_write = NULL;
1550 - memset(&p->cif, 0, sizeof(p->cif));
1551 - p->converters = NULL;
1552 - p->callable = NULL;
1553 -@@ -403,8 +404,9 @@
1554 -
1555 - assert(CThunk_CheckExact(p));
1556 -
1557 -- p->pcl = MallocClosure();
1558 -- if (p->pcl == NULL) {
1559 -+ p->pcl_write = ffi_closure_alloc(sizeof(ffi_closure),
1560 -+ &p->pcl_exec);
1561 -+ if (p->pcl_write == NULL) {
1562 - PyErr_NoMemory();
1563 - goto error;
1564 - }
1565 -@@ -449,7 +451,9 @@
1566 - "ffi_prep_cif failed with %d", result);
1567 - goto error;
1568 - }
1569 -- result = ffi_prep_closure(p->pcl, &p->cif, closure_fcn, p);
1570 -+ result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn,
1571 -+ p,
1572 -+ p->pcl_exec);
1573 - if (result != FFI_OK) {
1574 - PyErr_Format(PyExc_RuntimeError,
1575 - "ffi_prep_closure failed with %d", result);
1576 ---- Modules/_ctypes/_ctypes.c
1577 -+++ Modules/_ctypes/_ctypes.c
1578 -@@ -3443,7 +3443,7 @@
1579 - self->callable = callable;
1580 -
1581 - self->thunk = thunk;
1582 -- *(void **)self->b_ptr = (void *)thunk->pcl;
1583 -+ *(void **)self->b_ptr = (void *)thunk->pcl_exec;
1584 -
1585 - Py_INCREF((PyObject *)thunk); /* for KeepRef */
1586 - if (-1 == KeepRef((CDataObject *)self, 0, (PyObject *)thunk)) {
1587 ---- Modules/_ctypes/ctypes.h
1588 -+++ Modules/_ctypes/ctypes.h
1589 -@@ -95,7 +95,8 @@
1590 -
1591 - typedef struct {
1592 - PyObject_VAR_HEAD
1593 -- ffi_closure *pcl; /* the C callable */
1594 -+ ffi_closure *pcl_write; /* the C callable, writeable */
1595 -+ void *pcl_exec; /* the C callable, executable */
1596 - ffi_cif cif;
1597 - int flags;
1598 - PyObject *converters;
1599 -@@ -427,9 +428,6 @@
1600 -
1601 - #endif
1602 -
1603 --extern void FreeClosure(void *);
1604 --extern void *MallocClosure(void);
1605 --
1606 - extern void _AddTraceback(char *, char *, int);
1607 -
1608 - extern PyObject *CData_FromBaseObj(PyObject *type, PyObject *base, Py_ssize_t index, char *adr);
1609 ---- Modules/_ctypes/malloc_closure.c
1610 -+++ Modules/_ctypes/malloc_closure.c
1611 -@@ -93,7 +93,7 @@
1612 - /******************************************************************/
1613 -
1614 - /* put the item back into the free list */
1615 --void FreeClosure(void *p)
1616 -+void ffi_closure_free(void *p)
1617 - {
1618 - ITEM *item = (ITEM *)p;
1619 - item->next = free_list;
1620 -@@ -101,7 +101,7 @@
1621 - }
1622 -
1623 - /* return one item from the free list, allocating more if needed */
1624 --void *MallocClosure(void)
1625 -+void *ffi_closure_alloc(size_t ignored, void** codeloc)
1626 - {
1627 - ITEM *item;
1628 - if (!free_list)
1629 -@@ -110,5 +110,7 @@
1630 - return NULL;
1631 - item = free_list;
1632 - free_list = item->next;
1633 -- return item;
1634 -+ *codeloc = (void *)item;
1635 -+ return (void *)item;
1636 - }
1637 -+
1638 ---- setup.py
1639 -+++ setup.py
1640 -@@ -1885,8 +1885,7 @@
1641 - '_ctypes/callbacks.c',
1642 - '_ctypes/callproc.c',
1643 - '_ctypes/stgdict.c',
1644 -- '_ctypes/cfield.c',
1645 -- '_ctypes/malloc_closure.c']
1646 -+ '_ctypes/cfield.c']
1647 - depends = ['_ctypes/ctypes.h']
1648 -
1649 - if sys.platform == 'darwin':
1650
1651 diff --git a/dev-lang/python/files/2.6/25_all_gdbm-1.9.patch b/dev-lang/python/files/2.6/25_all_gdbm-1.9.patch
1652 deleted file mode 100644
1653 index 85c991b..0000000
1654 --- a/dev-lang/python/files/2.6/25_all_gdbm-1.9.patch
1655 +++ /dev/null
1656 @@ -1,14 +0,0 @@
1657 -http://bugs.python.org/issue13007
1658 -http://hg.python.org/cpython/rev/14cafb8d1480
1659 -
1660 ---- Lib/whichdb.py
1661 -+++ Lib/whichdb.py
1662 -@@ -91,7 +91,7 @@
1663 - return ""
1664 -
1665 - # Check for GNU dbm
1666 -- if magic == 0x13579ace:
1667 -+ if magic in (0x13579ace, 0x13579acd, 0x13579acf):
1668 - return "gdbm"
1669 -
1670 - # Check for old Berkeley db hash file format v2
1671
1672 diff --git a/dev-lang/python/files/2.6/26_all_expat-2.1.patch b/dev-lang/python/files/2.6/26_all_expat-2.1.patch
1673 deleted file mode 100644
1674 index 9872136..0000000
1675 --- a/dev-lang/python/files/2.6/26_all_expat-2.1.patch
1676 +++ /dev/null
1677 @@ -1,15 +0,0 @@
1678 -http://bugs.python.org/issue9054
1679 -http://hg.python.org/cpython/rev/5b536c90ca36
1680 -
1681 ---- Modules/pyexpat.c
1682 -+++ Modules/pyexpat.c
1683 -@@ -456,6 +456,9 @@
1684 - PyObject *args;
1685 - PyObject *temp;
1686 -
1687 -+ if (!have_handler(self, CharacterData))
1688 -+ return -1;
1689 -+
1690 - args = PyTuple_New(1);
1691 - if (args == NULL)
1692 - return -1;
1693
1694 diff --git a/dev-lang/python/files/2.6/41_all_crosscompile.patch b/dev-lang/python/files/2.6/41_all_crosscompile.patch
1695 deleted file mode 100644
1696 index a398769..0000000
1697 --- a/dev-lang/python/files/2.6/41_all_crosscompile.patch
1698 +++ /dev/null
1699 @@ -1,113 +0,0 @@
1700 ---- configure.in
1701 -+++ configure.in
1702 -@@ -3905,7 +3905,7 @@
1703 - AC_MSG_RESULT(no)
1704 - fi
1705 -
1706 --AC_MSG_CHECKING(for %zd printf() format support)
1707 -+AC_CACHE_CHECK([for %zd printf() format support], [py_cv_has_zd_printf], [dnl
1708 - AC_TRY_RUN([#include <stdio.h>
1709 - #include <stddef.h>
1710 - #include <string.h>
1711 -@@ -3939,10 +3939,13 @@
1712 - return 1;
1713 -
1714 - return 0;
1715 --}],
1716 --[AC_MSG_RESULT(yes)
1717 -- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
1718 -- AC_MSG_RESULT(no))
1719 -+}], [py_cv_has_zd_printf="yes"],
1720 -+ [py_cv_has_zd_printf="no"],
1721 -+ [py_cv_has_zd_printf="cross -- assuming yes"]
1722 -+)])
1723 -+if test "$py_cv_has_zd_printf" != "no" ; then
1724 -+ AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])
1725 -+fi
1726 -
1727 - AC_CHECK_TYPE(socklen_t,,
1728 - AC_DEFINE(socklen_t,int,
1729 ---- Makefile.pre.in
1730 -+++ Makefile.pre.in
1731 -@@ -176,6 +176,7 @@
1732 -
1733 - PYTHON= python$(EXE)
1734 - BUILDPYTHON= python$(BUILDEXE)
1735 -+HOSTPYTHON= $(BUILDPYTHON)
1736 -
1737 - # The task to run while instrument when building the profile-opt target
1738 - PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
1739 -@@ -209,6 +210,7 @@
1740 - # Parser
1741 - PGEN= Parser/pgen$(EXE)
1742 -
1743 -+HOSTPGEN= $(PGEN)$(EXE)
1744 - POBJS= \
1745 - Parser/acceler.o \
1746 - Parser/grammar1.o \
1747 -@@ -398,7 +400,7 @@
1748 - # Build the shared modules
1749 - sharedmods: $(BUILDPYTHON)
1750 - @case $$MAKEFLAGS in \
1751 -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
1752 -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS)' ./$(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
1753 - esac
1754 -
1755 - # Build the platform-specific modules
1756 -@@ -540,7 +542,7 @@
1757 -
1758 - $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
1759 - -@$(INSTALL) -d Include
1760 -- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
1761 -+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
1762 -
1763 - $(PGEN): $(PGENOBJS)
1764 - $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
1765 -@@ -923,23 +925,23 @@
1766 - done
1767 - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
1768 - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1769 -- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
1770 -+ ./$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
1771 - -d $(LIBDEST) -f \
1772 - -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
1773 - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1774 -- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
1775 -+ ./$(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
1776 - -d $(LIBDEST) -f \
1777 - -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
1778 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1779 -- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
1780 -+ ./$(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
1781 - -d $(LIBDEST)/site-packages -f \
1782 - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
1783 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1784 -- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
1785 -+ ./$(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
1786 - -d $(LIBDEST)/site-packages -f \
1787 - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
1788 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
1789 -- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
1790 -+ ./$(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
1791 -
1792 - # Install the include files
1793 - INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
1794 -@@ -1015,7 +1017,7 @@
1795 - # Install the dynamically loadable modules
1796 - # This goes into $(exec_prefix)
1797 - sharedinstall:
1798 -- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
1799 -+ $(RUNSHARED) ./$(HOSTPYTHON) -E $(srcdir)/setup.py install \
1800 - --prefix=$(prefix) \
1801 - --install-scripts=$(BINDIR) \
1802 - --install-platlib=$(DESTSHARED) \
1803 ---- setup.py
1804 -+++ setup.py
1805 -@@ -334,6 +334,7 @@
1806 - try:
1807 - imp.load_dynamic(ext.name, ext_filename)
1808 - except ImportError, why:
1809 -+ return
1810 - self.failed.append(ext.name)
1811 - self.announce('*** WARNING: renaming "%s" since importing it'
1812 - ' failed: %s' % (ext.name, why), level=3)
1813
1814 diff --git a/dev-lang/python/files/2.6/62_all_xml.use_pyxml.patch b/dev-lang/python/files/2.6/62_all_xml.use_pyxml.patch
1815 deleted file mode 100644
1816 index 757299b..0000000
1817 --- a/dev-lang/python/files/2.6/62_all_xml.use_pyxml.patch
1818 +++ /dev/null
1819 @@ -1,41 +0,0 @@
1820 ---- Lib/xml/__init__.py
1821 -+++ Lib/xml/__init__.py
1822 -@@ -28,20 +28,23 @@
1823 - _MINIMUM_XMLPLUS_VERSION = (0, 8, 4)
1824 -
1825 -
1826 --try:
1827 -+def use_pyxml():
1828 - import _xmlplus
1829 --except ImportError:
1830 -- pass
1831 --else:
1832 -- try:
1833 -- v = _xmlplus.version_info
1834 -- except AttributeError:
1835 -- # _xmlplus is too old; ignore it
1836 -- pass
1837 -+ v = _xmlplus.version_info
1838 -+ if v >= _MINIMUM_XMLPLUS_VERSION:
1839 -+ import sys
1840 -+ _xmlplus.__path__.extend(__path__)
1841 -+ sys.modules[__name__] = _xmlplus
1842 -+ cleared_modules = []
1843 -+ redefined_modules = []
1844 -+ for module in sys.modules:
1845 -+ if module.startswith("xml.") and not module.startswith(("xml.marshal", "xml.schema", "xml.utils", "xml.xpath", "xml.xslt")):
1846 -+ cleared_modules.append(module)
1847 -+ if module.startswith(("xml.__init__", "xml.dom", "xml.parsers", "xml.sax")) and sys.modules[module] is not None:
1848 -+ redefined_modules.append(module)
1849 -+ for module in cleared_modules:
1850 -+ del sys.modules[module]
1851 -+ for module in sorted(redefined_modules):
1852 -+ __import__(module)
1853 - else:
1854 -- if v >= _MINIMUM_XMLPLUS_VERSION:
1855 -- import sys
1856 -- _xmlplus.__path__.extend(__path__)
1857 -- sys.modules[__name__] = _xmlplus
1858 -- else:
1859 -- del v
1860 -+ raise ImportError("PyXML too old: %s" % ".".join(str(x) for x in v))
1861
1862 diff --git a/dev-lang/python/files/2.6/81_all_use_new_readline_function_types__closes__20374_.patch b/dev-lang/python/files/2.6/81_all_use_new_readline_function_types__closes__20374_.patch
1863 deleted file mode 100644
1864 index b63f4c7..0000000
1865 --- a/dev-lang/python/files/2.6/81_all_use_new_readline_function_types__closes__20374_.patch
1866 +++ /dev/null
1867 @@ -1,28 +0,0 @@
1868 -# HG changeset patch
1869 -# User Benjamin Peterson <benjamin@××××××.org>
1870 -# Date 1390541532 18000
1871 -# Fri Jan 24 00:32:12 2014 -0500
1872 -# Branch 2.7
1873 -# Node ID 79b82ebc4fd17fda401c32840da1da0577e3c73e
1874 -# Parent f28b60141c5c417111670a22b223f0c411136c7b
1875 -use new readline function types (closes #20374)
1876 -
1877 -diff --git a/Modules/readline.c b/Modules/readline.c
1878 ---- a/Modules/readline.c
1879 -+++ b/Modules/readline.c
1880 -@@ -911,12 +911,12 @@
1881 - rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
1882 - rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
1883 - /* Set our hook functions */
1884 -- rl_startup_hook = (Function *)on_startup_hook;
1885 -+ rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
1886 - #ifdef HAVE_RL_PRE_INPUT_HOOK
1887 -- rl_pre_input_hook = (Function *)on_pre_input_hook;
1888 -+ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
1889 - #endif
1890 - /* Set our completion function */
1891 -- rl_attempted_completion_function = (CPPFunction *)flex_complete;
1892 -+ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
1893 - /* Set Python word break characters */
1894 - completer_word_break_characters =
1895 - rl_completer_word_break_characters =
1896
1897 diff --git a/dev-lang/python/files/2.6/82_all_new_plan__just_remove_typecasts__closes__20374_.patch b/dev-lang/python/files/2.6/82_all_new_plan__just_remove_typecasts__closes__20374_.patch
1898 deleted file mode 100644
1899 index 71ac4b1..0000000
1900 --- a/dev-lang/python/files/2.6/82_all_new_plan__just_remove_typecasts__closes__20374_.patch
1901 +++ /dev/null
1902 @@ -1,37 +0,0 @@
1903 -# HG changeset patch
1904 -# User Benjamin Peterson <benjamin@××××××.org>
1905 -# Date 1390581856 18000
1906 -# Fri Jan 24 11:44:16 2014 -0500
1907 -# Branch 2.7
1908 -# Node ID 5e42e5764ac6277d61c0af231d402f59c223c91a
1909 -# Parent 79b82ebc4fd17fda401c32840da1da0577e3c73e
1910 -new plan: just remove typecasts (closes #20374)
1911 -
1912 -diff --git a/Modules/readline.c b/Modules/readline.c
1913 ---- a/Modules/readline.c
1914 -+++ b/Modules/readline.c
1915 -@@ -852,7 +852,7 @@
1916 - * before calling the normal completer */
1917 -
1918 - static char **
1919 --flex_complete(char *text, int start, int end)
1920 -+flex_complete(const char *text, int start, int end)
1921 - {
1922 - #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
1923 - rl_completion_append_character ='\0';
1924 -@@ -911,12 +911,12 @@
1925 - rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
1926 - rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
1927 - /* Set our hook functions */
1928 -- rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
1929 -+ rl_startup_hook = on_startup_hook;
1930 - #ifdef HAVE_RL_PRE_INPUT_HOOK
1931 -- rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
1932 -+ rl_pre_input_hook = on_pre_input_hook;
1933 - #endif
1934 - /* Set our completion function */
1935 -- rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
1936 -+ rl_attempted_completion_function = flex_complete;
1937 - /* Set Python word break characters */
1938 - completer_word_break_characters =
1939 - rl_completer_word_break_characters =
1940
1941 diff --git a/dev-lang/python/files/2.6/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch b/dev-lang/python/files/2.6/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch
1942 deleted file mode 100644
1943 index 9934b80..0000000
1944 --- a/dev-lang/python/files/2.6/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch
1945 +++ /dev/null
1946 @@ -1,37 +0,0 @@
1947 -# HG changeset patch
1948 -# User Ned Deily <nad@×××.org>
1949 -# Date 1391647946 28800
1950 -# Wed Feb 05 16:52:26 2014 -0800
1951 -# Branch 2.7
1952 -# Node ID 0b5b0bfcc7b1dba77ee70ec6abba9037abf93acb
1953 -# Parent 48c5c18110ae810c09b176f4cedf228cc3487451
1954 -Issue #20374: Avoid compiler warnings when compiling readline with libedit.
1955 -
1956 -diff --git a/Modules/readline.c b/Modules/readline.c
1957 ---- a/Modules/readline.c
1958 -+++ b/Modules/readline.c
1959 -@@ -749,15 +749,24 @@
1960 - return result;
1961 - }
1962 -
1963 -+
1964 - static int
1965 -+#if defined(_RL_FUNCTION_TYPEDEF)
1966 - on_startup_hook(void)
1967 -+#else
1968 -+on_startup_hook()
1969 -+#endif
1970 - {
1971 - return on_hook(startup_hook);
1972 - }
1973 -
1974 - #ifdef HAVE_RL_PRE_INPUT_HOOK
1975 - static int
1976 -+#if defined(_RL_FUNCTION_TYPEDEF)
1977 - on_pre_input_hook(void)
1978 -+#else
1979 -+on_pre_input_hook()
1980 -+#endif
1981 - {
1982 - return on_hook(pre_input_hook);
1983 - }
1984
1985 diff --git a/dev-lang/python/files/2.6/99_all_tcl86.patch b/dev-lang/python/files/2.6/99_all_tcl86.patch
1986 deleted file mode 100644
1987 index 2362e98..0000000
1988 --- a/dev-lang/python/files/2.6/99_all_tcl86.patch
1989 +++ /dev/null
1990 @@ -1,11 +0,0 @@
1991 ---- a/setup.py
1992 -+++ b/setup.py
1993 -@@ -1518,7 +1518,7 @@
1994 - # The versions with dots are used on Unix, and the versions without
1995 - # dots on Windows, for detection by cygwin.
1996 - tcllib = tklib = tcl_includes = tk_includes = None
1997 -- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
1998 -+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83', '8.2',
1999 - '82', '8.1', '81', '8.0', '80']:
2000 - tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
2001 - tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
2002
2003 diff --git a/dev-lang/python/files/3.2/01_all_static_library_location.patch b/dev-lang/python/files/3.2/01_all_static_library_location.patch
2004 deleted file mode 100644
2005 index 82ee2cd..0000000
2006 --- a/dev-lang/python/files/3.2/01_all_static_library_location.patch
2007 +++ /dev/null
2008 @@ -1,70 +0,0 @@
2009 -Install libpythonX.Y.a in /usr/lib instead of /usr/lib/pythonX.Y/config.
2010 -https://bugs.gentoo.org/show_bug.cgi?id=252372
2011 -http://bugs.python.org/issue6103
2012 -
2013 ---- Makefile.pre.in
2014 -+++ Makefile.pre.in
2015 -@@ -901,6 +901,19 @@
2016 - fi; \
2017 - else true; \
2018 - fi
2019 -+ @if test -f $(LIBRARY) && test $(LIBRARY) != $(LDLIBRARY); then \
2020 -+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
2021 -+ if test "$(SHLIB_SUFFIX)" = .dll; then \
2022 -+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR); \
2023 -+ else \
2024 -+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR); \
2025 -+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY); \
2026 -+ fi; \
2027 -+ else \
2028 -+ echo "Skipped install of $(LIBRARY) - use make frameworkinstall"; \
2029 -+ fi; \
2030 -+ else true; \
2031 -+ fi
2032 -
2033 - bininstall: altbininstall
2034 - -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \
2035 -@@ -1103,18 +1116,6 @@
2036 - else true; \
2037 - fi; \
2038 - done
2039 -- @if test -d $(LIBRARY); then :; else \
2040 -- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
2041 -- if test "$(SHLIB_SUFFIX)" = .dll; then \
2042 -- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
2043 -- else \
2044 -- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
2045 -- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
2046 -- fi; \
2047 -- else \
2048 -- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
2049 -- fi; \
2050 -- fi
2051 - $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
2052 - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
2053 - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
2054 ---- Misc/python-config.in
2055 -+++ Misc/python-config.in
2056 -@@ -47,11 +47,7 @@
2057 - elif opt in ('--libs', '--ldflags'):
2058 - libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
2059 - libs.append('-lpython' + pyver + sys.abiflags)
2060 -- # add the prefix/lib/pythonX.Y/config dir, but only if there is no
2061 -- # shared library in prefix/lib/.
2062 - if opt == '--ldflags':
2063 -- if not getvar('Py_ENABLE_SHARED'):
2064 -- libs.insert(0, '-L' + getvar('LIBPL'))
2065 - if not getvar('PYTHONFRAMEWORK'):
2066 - libs.extend(getvar('LINKFORSHARED').split())
2067 - print(' '.join(libs))
2068 ---- Modules/makesetup
2069 -+++ Modules/makesetup
2070 -@@ -89,7 +89,7 @@
2071 - then
2072 - ExtraLibDir=.
2073 - else
2074 -- ExtraLibDir='$(LIBPL)'
2075 -+ ExtraLibDir='$(LIBDIR)'
2076 - fi
2077 - ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
2078 - esac
2079
2080 diff --git a/dev-lang/python/files/3.2/02_all_disable_modules_and_ssl.patch b/dev-lang/python/files/3.2/02_all_disable_modules_and_ssl.patch
2081 deleted file mode 100644
2082 index 51bc0da..0000000
2083 --- a/dev-lang/python/files/3.2/02_all_disable_modules_and_ssl.patch
2084 +++ /dev/null
2085 @@ -1,89 +0,0 @@
2086 ---- setup.py
2087 -+++ setup.py
2088 -@@ -21,7 +21,17 @@
2089 - COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
2090 -
2091 - # This global variable is used to hold the list of modules to be disabled.
2092 --disabled_module_list = []
2093 -+pdm_env = "PYTHON_DISABLE_MODULES"
2094 -+if pdm_env in os.environ:
2095 -+ disabled_module_list = os.environ[pdm_env].split()
2096 -+else:
2097 -+ disabled_module_list = []
2098 -+
2099 -+pds_env = "PYTHON_DISABLE_SSL"
2100 -+if pds_env in os.environ:
2101 -+ disable_ssl = os.environ[pds_env]
2102 -+else:
2103 -+ disable_ssl = 0
2104 -
2105 - # File which contains the directory for shared mods (for sys.path fixup
2106 - # when running from the build dir, see Modules/getpath.c)
2107 -@@ -410,6 +420,7 @@
2108 - os.unlink(tmpfile)
2109 -
2110 - def detect_modules(self):
2111 -+ global disable_ssl
2112 - # Ensure that /usr/local is always used, but the local build
2113 - # directories (i.e. '.' and 'Include') must be first. See issue
2114 - # 10520.
2115 -@@ -699,7 +710,7 @@
2116 - ssl_incs = find_file('openssl/ssl.h', inc_dirs,
2117 - search_for_ssl_incs_in
2118 - )
2119 -- if ssl_incs is not None:
2120 -+ if ssl_incs is not None and not disable_ssl:
2121 - krb5_h = find_file('krb5.h', inc_dirs,
2122 - ['/usr/kerberos/include'])
2123 - if krb5_h:
2124 -@@ -710,7 +721,8 @@
2125 - ] )
2126 -
2127 - if (ssl_incs is not None and
2128 -- ssl_libs is not None):
2129 -+ ssl_libs is not None and
2130 -+ not disable_ssl):
2131 - exts.append( Extension('_ssl', ['_ssl.c'],
2132 - include_dirs = ssl_incs,
2133 - library_dirs = ssl_libs,
2134 -@@ -743,7 +755,7 @@
2135 -
2136 - #print('openssl_ver = 0x%08x' % openssl_ver)
2137 - min_openssl_ver = 0x00907000
2138 -- have_any_openssl = ssl_incs is not None and ssl_libs is not None
2139 -+ have_any_openssl = ssl_incs is not None and ssl_libs is not None and not disable_ssl
2140 - have_usable_openssl = (have_any_openssl and
2141 - openssl_ver >= min_openssl_ver)
2142 -
2143 -@@ -761,20 +773,17 @@
2144 - openssl_ver)
2145 - missing.append('_hashlib')
2146 -
2147 -- min_sha2_openssl_ver = 0x00908000
2148 -- if COMPILED_WITH_PYDEBUG or openssl_ver < min_sha2_openssl_ver:
2149 -- # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
2150 -- exts.append( Extension('_sha256', ['sha256module.c'],
2151 -- depends=['hashlib.h']) )
2152 -- exts.append( Extension('_sha512', ['sha512module.c'],
2153 -- depends=['hashlib.h']) )
2154 --
2155 -- if COMPILED_WITH_PYDEBUG or not have_usable_openssl:
2156 -- # no openssl at all, use our own md5 and sha1
2157 -- exts.append( Extension('_md5', ['md5module.c'],
2158 -- depends=['hashlib.h']) )
2159 -- exts.append( Extension('_sha1', ['sha1module.c'],
2160 -- depends=['hashlib.h']) )
2161 -+ ### Build these unconditionally so emerge won't fail
2162 -+ ### when openssl is dropped/broken etc.
2163 -+ exts.append( Extension('_sha256', ['sha256module.c'],
2164 -+ depends=['hashlib.h']) )
2165 -+ exts.append( Extension('_sha512', ['sha512module.c'],
2166 -+ depends=['hashlib.h']) )
2167 -+
2168 -+ exts.append( Extension('_md5', ['md5module.c'],
2169 -+ depends=['hashlib.h']) )
2170 -+ exts.append( Extension('_sha1', ['sha1module.c'],
2171 -+ depends=['hashlib.h']) )
2172 -
2173 - # Modules that provide persistent dictionary-like semantics. You will
2174 - # probably want to arrange for at least one of them to be available on
2175
2176 diff --git a/dev-lang/python/files/3.2/03_all_libdir.patch b/dev-lang/python/files/3.2/03_all_libdir.patch
2177 deleted file mode 100644
2178 index 613114a..0000000
2179 --- a/dev-lang/python/files/3.2/03_all_libdir.patch
2180 +++ /dev/null
2181 @@ -1,174 +0,0 @@
2182 ---- Lib/distutils/command/install.py
2183 -+++ Lib/distutils/command/install.py
2184 -@@ -44,8 +44,8 @@
2185 -
2186 - INSTALL_SCHEMES = {
2187 - 'unix_prefix': {
2188 -- 'purelib': '$base/lib/python$py_version_short/site-packages',
2189 -- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
2190 -+ 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
2191 -+ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
2192 - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
2193 - 'scripts': '$base/bin',
2194 - 'data' : '$base',
2195 ---- Lib/distutils/sysconfig.py
2196 -+++ Lib/distutils/sysconfig.py
2197 -@@ -123,7 +123,7 @@
2198 -
2199 - if os.name == "posix":
2200 - libpython = os.path.join(prefix,
2201 -- "lib", "python" + get_python_version())
2202 -+ "@@GENTOO_LIBDIR@@", "python" + get_python_version())
2203 - if standard_lib:
2204 - return libpython
2205 - else:
2206 ---- Lib/site.py
2207 -+++ Lib/site.py
2208 -@@ -285,10 +285,10 @@
2209 - if sys.platform in ('os2emx', 'riscos'):
2210 - sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
2211 - elif os.sep == '/':
2212 -- sitepackages.append(os.path.join(prefix, "lib",
2213 -+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@",
2214 - "python" + sys.version[:3],
2215 - "site-packages"))
2216 -- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
2217 -+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python"))
2218 - else:
2219 - sitepackages.append(prefix)
2220 - sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
2221 ---- Lib/sysconfig.py
2222 -+++ Lib/sysconfig.py
2223 -@@ -21,10 +21,10 @@
2224 -
2225 - _INSTALL_SCHEMES = {
2226 - 'posix_prefix': {
2227 -- 'stdlib': '{base}/lib/python{py_version_short}',
2228 -- 'platstdlib': '{platbase}/lib/python{py_version_short}',
2229 -- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
2230 -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
2231 -+ 'stdlib': '{base}/@@GENTOO_LIBDIR@@/python{py_version_short}',
2232 -+ 'platstdlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
2233 -+ 'purelib': '{base}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
2234 -+ 'platlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
2235 - 'include':
2236 - '{base}/include/python{py_version_short}{abiflags}',
2237 - 'platinclude':
2238 -@@ -81,10 +81,10 @@
2239 - 'data' : '{userbase}',
2240 - },
2241 - 'posix_user': {
2242 -- 'stdlib': '{userbase}/lib/python{py_version_short}',
2243 -- 'platstdlib': '{userbase}/lib/python{py_version_short}',
2244 -- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
2245 -- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
2246 -+ 'stdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
2247 -+ 'platstdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
2248 -+ 'purelib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
2249 -+ 'platlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
2250 - 'include': '{userbase}/include/python{py_version_short}',
2251 - 'scripts': '{userbase}/bin',
2252 - 'data' : '{userbase}',
2253 ---- Lib/test/test_site.py
2254 -+++ Lib/test/test_site.py
2255 -@@ -237,10 +237,10 @@
2256 - elif os.sep == '/':
2257 - # OS X non-framwework builds, Linux, FreeBSD, etc
2258 - self.assertEqual(len(dirs), 2)
2259 -- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
2260 -+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'python' + sys.version[:3],
2261 - 'site-packages')
2262 - self.assertEqual(dirs[0], wanted)
2263 -- wanted = os.path.join('xoxo', 'lib', 'site-python')
2264 -+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'site-python')
2265 - self.assertEqual(dirs[1], wanted)
2266 - else:
2267 - # other platforms
2268 ---- Makefile.pre.in
2269 -+++ Makefile.pre.in
2270 -@@ -115,7 +115,7 @@
2271 - MANDIR= @mandir@
2272 - INCLUDEDIR= @includedir@
2273 - CONFINCLUDEDIR= $(exec_prefix)/include
2274 --SCRIPTDIR= $(prefix)/lib
2275 -+SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@
2276 - ABIFLAGS= @ABIFLAGS@
2277 -
2278 - # Detailed destination directories
2279 ---- Modules/getpath.c
2280 -+++ Modules/getpath.c
2281 -@@ -122,8 +122,8 @@
2282 - #endif
2283 -
2284 - #ifndef PYTHONPATH
2285 --#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
2286 -- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
2287 -+#define PYTHONPATH PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION ":" \
2288 -+ EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload"
2289 - #endif
2290 -
2291 - #ifndef LANDMARK
2292 -@@ -135,7 +135,7 @@
2293 - static wchar_t progpath[MAXPATHLEN+1];
2294 - static wchar_t *module_search_path = NULL;
2295 - static int module_search_path_malloced = 0;
2296 --static wchar_t *lib_python = L"lib/python" VERSION;
2297 -+static wchar_t *lib_python = L"@@GENTOO_LIBDIR@@/python" VERSION;
2298 -
2299 - static void
2300 - reduce(wchar_t *dir)
2301 -@@ -583,7 +583,7 @@
2302 - }
2303 - else
2304 - wcsncpy(zip_path, _prefix, MAXPATHLEN);
2305 -- joinpath(zip_path, L"lib/python00.zip");
2306 -+ joinpath(zip_path, L"@@GENTOO_LIBDIR@@/python00.zip");
2307 - bufsz = wcslen(zip_path); /* Replace "00" with version */
2308 - zip_path[bufsz - 6] = VERSION[0];
2309 - zip_path[bufsz - 5] = VERSION[2];
2310 -@@ -593,7 +593,7 @@
2311 - fprintf(stderr,
2312 - "Could not find platform dependent libraries <exec_prefix>\n");
2313 - wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
2314 -- joinpath(exec_prefix, L"lib/lib-dynload");
2315 -+ joinpath(exec_prefix, L"@@GENTOO_LIBDIR@@/lib-dynload");
2316 - }
2317 - /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
2318 -
2319 ---- Modules/Setup.dist
2320 -+++ Modules/Setup.dist
2321 -@@ -352,7 +352,7 @@
2322 - # Andrew Kuchling's zlib module.
2323 - # This require zlib 1.1.3 (or later).
2324 - # See http://www.gzip.org/zlib/
2325 --#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
2326 -+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
2327 -
2328 - # Interface to the Expat XML parser
2329 - #
2330 ---- setup.py
2331 -+++ setup.py
2332 -@@ -477,8 +477,7 @@
2333 - # if a file is found in one of those directories, it can
2334 - # be assumed that no additional -I,-L directives are needed.
2335 - lib_dirs = self.compiler.library_dirs + [
2336 -- '/lib64', '/usr/lib64',
2337 -- '/lib', '/usr/lib',
2338 -+ '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
2339 - ]
2340 - inc_dirs = self.compiler.include_dirs + ['/usr/include']
2341 - exts = []
2342 -@@ -675,11 +674,11 @@
2343 - elif curses_library:
2344 - readline_libs.append(curses_library)
2345 - elif self.compiler.find_library_file(lib_dirs +
2346 -- ['/usr/lib/termcap'],
2347 -+ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
2348 - 'termcap'):
2349 - readline_libs.append('termcap')
2350 - exts.append( Extension('readline', ['readline.c'],
2351 -- library_dirs=['/usr/lib/termcap'],
2352 -+ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
2353 - extra_link_args=readline_extra_link_args,
2354 - libraries=readline_libs) )
2355 - else:
2356
2357 diff --git a/dev-lang/python/files/3.2/04_all_non-zero_exit_status_on_failure.patch b/dev-lang/python/files/3.2/04_all_non-zero_exit_status_on_failure.patch
2358 deleted file mode 100644
2359 index 8b7ccd8..0000000
2360 --- a/dev-lang/python/files/3.2/04_all_non-zero_exit_status_on_failure.patch
2361 +++ /dev/null
2362 @@ -1,31 +0,0 @@
2363 -https://bugs.gentoo.org/show_bug.cgi?id=281968
2364 -http://bugs.python.org/issue6731
2365 -
2366 ---- setup.py
2367 -+++ setup.py
2368 -@@ -37,6 +37,8 @@
2369 - # when running from the build dir, see Modules/getpath.c)
2370 - _BUILDDIR_COOKIE = "pybuilddir.txt"
2371 -
2372 -+exit_status = 0
2373 -+
2374 - def add_dir_to_list(dirlist, dir):
2375 - """Add the directory 'dir' to the list 'dirlist' (after any relative
2376 - directories) if:
2377 -@@ -284,6 +286,8 @@
2378 - print()
2379 -
2380 - if self.failed:
2381 -+ global exit_status
2382 -+ exit_status = 1
2383 - failed = self.failed[:]
2384 - print()
2385 - print("Failed to build these modules:")
2386 -@@ -1946,6 +1950,7 @@
2387 - scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
2388 - "Tools/scripts/2to3"]
2389 - )
2390 -+ sys.exit(exit_status)
2391 -
2392 - # --install-platlib
2393 - if __name__ == '__main__':
2394
2395 diff --git a/dev-lang/python/files/3.2/05_all_regenerate_platform-specific_modules.patch b/dev-lang/python/files/3.2/05_all_regenerate_platform-specific_modules.patch
2396 deleted file mode 100644
2397 index 0bc3fe6..0000000
2398 --- a/dev-lang/python/files/3.2/05_all_regenerate_platform-specific_modules.patch
2399 +++ /dev/null
2400 @@ -1,112 +0,0 @@
2401 -http://bugs.python.org/issue12619
2402 -
2403 ---- Lib/plat-aix4/regen
2404 -+++ Lib/plat-aix4/regen
2405 -@@ -5,4 +5,4 @@
2406 - exit 1;;
2407 - esac
2408 - set -v
2409 --h2py.py -i '(u_long)' /usr/include/netinet/in.h
2410 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
2411 ---- Lib/plat-linux2/regen
2412 -+++ Lib/plat-linux2/regen
2413 -@@ -5,4 +5,4 @@
2414 - exit 1;;
2415 - esac
2416 - set -v
2417 --h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
2418 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h /usr/include/linux/cdrom.h
2419 ---- Lib/plat-sunos5/regen
2420 -+++ Lib/plat-sunos5/regen
2421 -@@ -5,5 +5,4 @@
2422 - exit 1;;
2423 - esac
2424 - set -v
2425 --h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
2426 --
2427 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
2428 ---- Lib/plat-unixware7/regen
2429 -+++ Lib/plat-unixware7/regen
2430 -@@ -5,5 +5,5 @@
2431 - exit 1;;
2432 - esac
2433 - set -v
2434 --h2py -i '(u_long)' /usr/include/netinet/in.h
2435 --h2py /usr/include/sys/stropts.h
2436 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
2437 -+python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h
2438 ---- Makefile.pre.in
2439 -+++ Makefile.pre.in
2440 -@@ -408,7 +408,7 @@
2441 -
2442 - # Default target
2443 - all: build_all
2444 --build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed
2445 -+build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods gdbhooks Modules/_testembed
2446 -
2447 - # Compile a binary with gcc profile guided optimization.
2448 - profile-opt:
2449 -@@ -457,6 +457,27 @@
2450 - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
2451 - ./$(BUILDPYTHON) -E $(srcdir)/setup.py $$quiet build
2452 -
2453 -+# Build the platform-specific modules
2454 -+platformspecificmods: $(BUILDPYTHON) sharedmods
2455 -+ @PLATDIR=$(PLATDIR); \
2456 -+ if test ! -f $(srcdir)/Lib/$(PLATDIR)/regen; then \
2457 -+ $(INSTALL) -d $(srcdir)/Lib/$(PLATDIR); \
2458 -+ if test -f $(srcdir)/Lib/$${PLATDIR%?}/regen; then \
2459 -+ cp $(srcdir)/Lib/$${PLATDIR%?}/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
2460 -+ else \
2461 -+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
2462 -+ fi \
2463 -+ fi
2464 -+ @EXE="$(BUILDEXE)"; export EXE; \
2465 -+ PATH="`pwd`:$$PATH"; export PATH; \
2466 -+ PYTHONPATH="`pwd`/Lib"; export PYTHONPATH; \
2467 -+ if [ -n "$(MULTIARCH)" ]; then MULTIARCH=$(MULTIARCH); export MULTIARCH; fi; \
2468 -+ cd $(srcdir)/Lib/$(PLATDIR); \
2469 -+ $(RUNSHARED) ./regen || exit 1; \
2470 -+ for module in *.py; do \
2471 -+ $(RUNSHARED) $(BUILDPYTHON) -c "with open('$$module', 'rb') as module: compile(module.read(), '$$module', 'exec')" || exit 1; \
2472 -+ done
2473 -+
2474 - # Build static library
2475 - # avoid long command lines, same as LIBRARY_OBJS
2476 - $(LIBRARY): $(LIBRARY_OBJS)
2477 -@@ -983,7 +1004,7 @@
2478 - multiprocessing multiprocessing/dummy \
2479 - unittest unittest/test \
2480 - curses pydoc_data $(MACHDEPS)
2481 --libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
2482 -+libinstall: build_all $(srcdir)/Modules/xxmodule.c
2483 - @for i in $(SCRIPTDIR) $(LIBDEST); \
2484 - do \
2485 - if test ! -d $(DESTDIR)$$i; then \
2486 -@@ -1066,17 +1087,6 @@
2487 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
2488 - ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
2489 -
2490 --# Create the PLATDIR source directory, if one wasn't distributed..
2491 --$(srcdir)/Lib/$(PLATDIR):
2492 -- mkdir $(srcdir)/Lib/$(PLATDIR)
2493 -- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
2494 -- export PATH; PATH="`pwd`:$$PATH"; \
2495 -- export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
2496 -- export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
2497 -- export EXE; EXE="$(BUILDEXE)"; \
2498 -- if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
2499 -- cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
2500 --
2501 - python-config: $(srcdir)/Misc/python-config.in
2502 - # Substitution happens here, as the completely-expanded BINDIR
2503 - # is not available in configure
2504 -@@ -1373,7 +1383,7 @@
2505 - Python/thread.o: @THREADHEADERS@
2506 -
2507 - # Declare targets that aren't real files
2508 --.PHONY: all build_all sharedmods oldsharedmods test quicktest memtest
2509 -+.PHONY: all build_all sharedmods oldsharedmods platformspecificmods test quicktest memtest
2510 - .PHONY: install altinstall oldsharedinstall bininstall altbininstall
2511 - .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
2512 - .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
2513
2514 diff --git a/dev-lang/python/files/3.2/21_all_distutils_c++.patch b/dev-lang/python/files/3.2/21_all_distutils_c++.patch
2515 deleted file mode 100644
2516 index c5aec72..0000000
2517 --- a/dev-lang/python/files/3.2/21_all_distutils_c++.patch
2518 +++ /dev/null
2519 @@ -1,262 +0,0 @@
2520 -http://bugs.python.org/issue1222585
2521 -
2522 ---- Lib/distutils/cygwinccompiler.py
2523 -+++ Lib/distutils/cygwinccompiler.py
2524 -@@ -136,9 +136,13 @@
2525 - self.set_executables(compiler='gcc -mcygwin -O -Wall',
2526 - compiler_so='gcc -mcygwin -mdll -O -Wall',
2527 - compiler_cxx='g++ -mcygwin -O -Wall',
2528 -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
2529 - linker_exe='gcc -mcygwin',
2530 - linker_so=('%s -mcygwin %s' %
2531 -- (self.linker_dll, shared_option)))
2532 -+ (self.linker_dll, shared_option)),
2533 -+ linker_exe_cxx='g++ -mcygwin',
2534 -+ linker_so_cxx=('%s -mcygwin %s' %
2535 -+ (self.linker_dll, shared_option)))
2536 -
2537 - # cygwin and mingw32 need different sets of libraries
2538 - if self.gcc_version == "2.91.57":
2539 -@@ -162,8 +166,12 @@
2540 - raise CompileError(msg)
2541 - else: # for other files use the C-compiler
2542 - try:
2543 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
2544 -- extra_postargs)
2545 -+ if self.detect_language(src) == 'c++':
2546 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
2547 -+ extra_postargs)
2548 -+ else:
2549 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
2550 -+ extra_postargs)
2551 - except DistutilsExecError as msg:
2552 - raise CompileError(msg)
2553 -
2554 -@@ -294,10 +302,15 @@
2555 - self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
2556 - compiler_so='gcc -mno-cygwin -mdll -O -Wall',
2557 - compiler_cxx='g++ -mno-cygwin -O -Wall',
2558 -+ compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
2559 - linker_exe='gcc -mno-cygwin',
2560 - linker_so='%s -mno-cygwin %s %s'
2561 - % (self.linker_dll, shared_option,
2562 -- entry_point))
2563 -+ entry_point),
2564 -+ linker_exe_cxx='g++ -mno-cygwin',
2565 -+ linker_so_cxx='%s -mno-cygwin %s %s'
2566 -+ % (self.linker_dll, shared_option,
2567 -+ entry_point))
2568 - # Maybe we should also append -mthreads, but then the finished
2569 - # dlls need another dll (mingwm10.dll see Mingw32 docs)
2570 - # (-mthreads: Support thread-safe exception handling on `Mingw32')
2571 ---- Lib/distutils/emxccompiler.py
2572 -+++ Lib/distutils/emxccompiler.py
2573 -@@ -63,8 +63,12 @@
2574 - # XXX optimization, warnings etc. should be customizable.
2575 - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
2576 - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
2577 -+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
2578 -+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
2579 - linker_exe='gcc -Zomf -Zmt -Zcrtdll',
2580 -- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
2581 -+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
2582 -+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
2583 -+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
2584 -
2585 - # want the gcc library statically linked (so that we don't have
2586 - # to distribute a version dependent on the compiler we have)
2587 -@@ -81,8 +85,12 @@
2588 - raise CompileError(msg)
2589 - else: # for other files use the C-compiler
2590 - try:
2591 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
2592 -- extra_postargs)
2593 -+ if self.detect_language(src) == 'c++':
2594 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
2595 -+ extra_postargs)
2596 -+ else:
2597 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
2598 -+ extra_postargs)
2599 - except DistutilsExecError as msg:
2600 - raise CompileError(msg)
2601 -
2602 ---- Lib/distutils/sysconfig.py
2603 -+++ Lib/distutils/sysconfig.py
2604 -@@ -170,9 +170,12 @@
2605 - _osx_support.customize_compiler(_config_vars)
2606 - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
2607 -
2608 -- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
2609 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
2610 -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
2611 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
2612 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
2613 -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
2614 -+
2615 -+ cflags = ''
2616 -+ cxxflags = ''
2617 -
2618 - newcc = None
2619 - if 'CC' in os.environ:
2620 -@@ -181,19 +184,27 @@
2621 - cxx = os.environ['CXX']
2622 - if 'LDSHARED' in os.environ:
2623 - ldshared = os.environ['LDSHARED']
2624 -+ if 'LDCXXSHARED' in os.environ:
2625 -+ ldcxxshared = os.environ['LDCXXSHARED']
2626 - if 'CPP' in os.environ:
2627 - cpp = os.environ['CPP']
2628 - else:
2629 - cpp = cc + " -E" # not always
2630 - if 'LDFLAGS' in os.environ:
2631 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
2632 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
2633 - if 'CFLAGS' in os.environ:
2634 -- cflags = opt + ' ' + os.environ['CFLAGS']
2635 -+ cflags = os.environ['CFLAGS']
2636 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
2637 -+ if 'CXXFLAGS' in os.environ:
2638 -+ cxxflags = os.environ['CXXFLAGS']
2639 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
2640 - if 'CPPFLAGS' in os.environ:
2641 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
2642 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
2643 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
2644 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
2645 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
2646 - if 'AR' in os.environ:
2647 - ar = os.environ['AR']
2648 - if 'ARFLAGS' in os.environ:
2649 -@@ -202,13 +213,17 @@
2650 - archiver = ar + ' ' + ar_flags
2651 -
2652 - cc_cmd = cc + ' ' + cflags
2653 -+ cxx_cmd = cxx + ' ' + cxxflags
2654 - compiler.set_executables(
2655 - preprocessor=cpp,
2656 - compiler=cc_cmd,
2657 - compiler_so=cc_cmd + ' ' + ccshared,
2658 -- compiler_cxx=cxx,
2659 -+ compiler_cxx=cxx_cmd,
2660 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
2661 - linker_so=ldshared,
2662 - linker_exe=cc,
2663 -+ linker_so_cxx=ldcxxshared,
2664 -+ linker_exe_cxx=cxx,
2665 - archiver=archiver)
2666 -
2667 - compiler.shared_lib_extension = shlib_suffix
2668 ---- Lib/distutils/unixccompiler.py
2669 -+++ Lib/distutils/unixccompiler.py
2670 -@@ -52,14 +52,17 @@
2671 - # are pretty generic; they will probably have to be set by an outsider
2672 - # (eg. using information discovered by the sysconfig about building
2673 - # Python extensions).
2674 -- executables = {'preprocessor' : None,
2675 -- 'compiler' : ["cc"],
2676 -- 'compiler_so' : ["cc"],
2677 -- 'compiler_cxx' : ["cc"],
2678 -- 'linker_so' : ["cc", "-shared"],
2679 -- 'linker_exe' : ["cc"],
2680 -- 'archiver' : ["ar", "-cr"],
2681 -- 'ranlib' : None,
2682 -+ executables = {'preprocessor' : None,
2683 -+ 'compiler' : ["cc"],
2684 -+ 'compiler_so' : ["cc"],
2685 -+ 'compiler_cxx' : ["c++"],
2686 -+ 'compiler_so_cxx' : ["c++"],
2687 -+ 'linker_so' : ["cc", "-shared"],
2688 -+ 'linker_exe' : ["cc"],
2689 -+ 'linker_so_cxx' : ["c++", "-shared"],
2690 -+ 'linker_exe_cxx' : ["c++"],
2691 -+ 'archiver' : ["ar", "-cr"],
2692 -+ 'ranlib' : None,
2693 - }
2694 -
2695 - if sys.platform[:6] == "darwin":
2696 -@@ -108,12 +111,19 @@
2697 -
2698 - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
2699 - compiler_so = self.compiler_so
2700 -+ compiler_so_cxx = self.compiler_so_cxx
2701 - if sys.platform == 'darwin':
2702 - compiler_so = _osx_support.compiler_fixup(compiler_so,
2703 - cc_args + extra_postargs)
2704 -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
2705 -+ cc_args + extra_postargs)
2706 - try:
2707 -- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
2708 -- extra_postargs)
2709 -+ if self.detect_language(src) == 'c++':
2710 -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
2711 -+ extra_postargs)
2712 -+ else:
2713 -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
2714 -+ extra_postargs)
2715 - except DistutilsExecError as msg:
2716 - raise CompileError(msg)
2717 -
2718 -@@ -171,22 +181,16 @@
2719 - ld_args.extend(extra_postargs)
2720 - self.mkpath(os.path.dirname(output_filename))
2721 - try:
2722 -- if target_desc == CCompiler.EXECUTABLE:
2723 -- linker = self.linker_exe[:]
2724 -+ if target_lang == "c++":
2725 -+ if target_desc == CCompiler.EXECUTABLE:
2726 -+ linker = self.linker_exe_cxx[:]
2727 -+ else:
2728 -+ linker = self.linker_so_cxx[:]
2729 - else:
2730 -- linker = self.linker_so[:]
2731 -- if target_lang == "c++" and self.compiler_cxx:
2732 -- # skip over environment variable settings if /usr/bin/env
2733 -- # is used to set up the linker's environment.
2734 -- # This is needed on OSX. Note: this assumes that the
2735 -- # normal and C++ compiler have the same environment
2736 -- # settings.
2737 -- i = 0
2738 -- if os.path.basename(linker[0]) == "env":
2739 -- i = 1
2740 -- while '=' in linker[i]:
2741 -- i += 1
2742 -- linker[i] = self.compiler_cxx[i]
2743 -+ if target_desc == CCompiler.EXECUTABLE:
2744 -+ linker = self.linker_exe[:]
2745 -+ else:
2746 -+ linker = self.linker_so[:]
2747 -
2748 - if sys.platform == 'darwin':
2749 - linker = _osx_support.compiler_fixup(linker, ld_args)
2750 ---- Lib/_osx_support.py
2751 -+++ Lib/_osx_support.py
2752 -@@ -14,13 +14,13 @@
2753 - # configuration variables that may contain universal build flags,
2754 - # like "-arch" or "-isdkroot", that may need customization for
2755 - # the user environment
2756 --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
2757 -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
2758 -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
2759 -- 'PY_CORE_CFLAGS')
2760 -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
2761 -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
2762 -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
2763 -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
2764 -
2765 - # configuration variables that may contain compiler calls
2766 --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
2767 -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
2768 -
2769 - # prefix added to original configuration variable names
2770 - _INITPRE = '_OSX_SUPPORT_INITIAL_'
2771 ---- Makefile.pre.in
2772 -+++ Makefile.pre.in
2773 -@@ -454,7 +454,7 @@
2774 - *\ -s*|s*) quiet="-q";; \
2775 - *) quiet="";; \
2776 - esac; \
2777 -- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
2778 -+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \
2779 - ./$(BUILDPYTHON) -E $(srcdir)/setup.py $$quiet build
2780 -
2781 - # Build the platform-specific modules
2782
2783 diff --git a/dev-lang/python/files/3.2/22_all_tests_environment.patch b/dev-lang/python/files/3.2/22_all_tests_environment.patch
2784 deleted file mode 100644
2785 index c3b990c..0000000
2786 --- a/dev-lang/python/files/3.2/22_all_tests_environment.patch
2787 +++ /dev/null
2788 @@ -1,183 +0,0 @@
2789 -http://bugs.python.org/issue1674555
2790 -
2791 ---- Lib/site.py
2792 -+++ Lib/site.py
2793 -@@ -514,8 +514,9 @@
2794 - known_paths = removeduppaths()
2795 - if ENABLE_USER_SITE is None:
2796 - ENABLE_USER_SITE = check_enableusersite()
2797 -- known_paths = addusersitepackages(known_paths)
2798 -- known_paths = addsitepackages(known_paths)
2799 -+ if os.environ.get("_PYTHONNOSITEPACKAGES") is None:
2800 -+ known_paths = addusersitepackages(known_paths)
2801 -+ known_paths = addsitepackages(known_paths)
2802 - if sys.platform == 'os2emx':
2803 - setBEGINLIBPATH()
2804 - setquit()
2805 ---- Lib/test/regrtest.py
2806 -+++ Lib/test/regrtest.py
2807 -@@ -174,6 +174,7 @@
2808 - import unittest
2809 - import warnings
2810 - from inspect import isabstract
2811 -+from subprocess import Popen, PIPE
2812 -
2813 - try:
2814 - import threading
2815 -@@ -510,6 +511,57 @@
2816 - support.use_resources = use_resources
2817 - save_modules = sys.modules.keys()
2818 -
2819 -+ opt_args = support.args_from_interpreter_flags()
2820 -+ base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
2821 -+ debug_output_pat = re.compile(r"\[\d+ refs\]$")
2822 -+
2823 -+ def get_args_tuple(test, verbose, quiet, huntrleaks, debug, use_resources,
2824 -+ output_on_failure, failfast, match_tests):
2825 -+ return (
2826 -+ (test, verbose, quiet),
2827 -+ dict(huntrleaks=huntrleaks, debug=debug,
2828 -+ use_resources=use_resources,
2829 -+ output_on_failure=output_on_failure, failfast=failfast,
2830 -+ match_tests=match_tests)
2831 -+ )
2832 -+
2833 -+ def _runtest(test, verbose, quiet, huntrleaks=False, debug=False,
2834 -+ use_resources=None, output_on_failure=False, failfast=False,
2835 -+ match_tests=None):
2836 -+ if test == "test_site":
2837 -+ args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks, debug,
2838 -+ use_resources, output_on_failure,
2839 -+ failfast, match_tests)
2840 -+ env = os.environ.copy()
2841 -+ try:
2842 -+ del env["_PYTHONNOSITEPACKAGES"]
2843 -+ except KeyError:
2844 -+ pass
2845 -+ popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)],
2846 -+ stdout=PIPE, stderr=PIPE,
2847 -+ universal_newlines=True,
2848 -+ close_fds=(os.name != 'nt'),
2849 -+ env=env)
2850 -+ stdout, stderr = popen.communicate()
2851 -+ # Strip last refcount output line if it exists, since it
2852 -+ # comes from the shutdown of the interpreter in the subcommand.
2853 -+ stderr = debug_output_pat.sub("", stderr)
2854 -+ stdout, _, result = stdout.strip().rpartition("\n")
2855 -+ result = json.loads(result)
2856 -+ if stdout:
2857 -+ print(stdout)
2858 -+ if stderr:
2859 -+ print(stderr, file=sys.stderr)
2860 -+ if result[0] == INTERRUPTED:
2861 -+ assert result[1] == 'KeyboardInterrupt'
2862 -+ raise KeyboardInterrupt
2863 -+ return result
2864 -+ else:
2865 -+ return runtest(test, verbose, quiet, huntrleaks=huntrleaks,
2866 -+ debug=debug, use_resources=use_resources,
2867 -+ output_on_failure=output_on_failure,
2868 -+ failfast=failfast, match_tests=match_tests)
2869 -+
2870 - def accumulate_result(test, result):
2871 - ok, test_time = result
2872 - test_times.append((test_time, test))
2873 -@@ -547,12 +599,8 @@
2874 - print("Multiprocess option requires thread support")
2875 - sys.exit(2)
2876 - from queue import Queue
2877 -- from subprocess import Popen, PIPE
2878 -- debug_output_pat = re.compile(r"\[\d+ refs\]$")
2879 - output = Queue()
2880 - pending = MultiprocessTests(tests)
2881 -- opt_args = support.args_from_interpreter_flags()
2882 -- base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
2883 - def work():
2884 - # A worker thread.
2885 - try:
2886 -@@ -562,12 +610,9 @@
2887 - except StopIteration:
2888 - output.put((None, None, None, None))
2889 - return
2890 -- args_tuple = (
2891 -- (test, verbose, quiet),
2892 -- dict(huntrleaks=huntrleaks, use_resources=use_resources,
2893 -- debug=debug, output_on_failure=verbose3,
2894 -- failfast=failfast, match_tests=match_tests)
2895 -- )
2896 -+ args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks,
2897 -+ debug, use_resources, verbose3,
2898 -+ failfast, match_tests)
2899 - # -E is needed by some tests, e.g. test_import
2900 - # Running the child from the same working directory ensures
2901 - # that TEMPDIR for the child is the same when
2902 -@@ -632,13 +677,13 @@
2903 - if trace:
2904 - # If we're tracing code coverage, then we don't exit with status
2905 - # if on a false return value from main.
2906 -- tracer.runctx('runtest(test, verbose, quiet)',
2907 -+ tracer.runctx('_runtest(test, verbose, quiet)',
2908 - globals=globals(), locals=vars())
2909 - else:
2910 - try:
2911 -- result = runtest(test, verbose, quiet, huntrleaks, debug,
2912 -- output_on_failure=verbose3,
2913 -- failfast=failfast, match_tests=match_tests)
2914 -+ result = _runtest(test, verbose, quiet, huntrleaks, debug,
2915 -+ output_on_failure=verbose3,
2916 -+ failfast=failfast, match_tests=match_tests)
2917 - accumulate_result(test, result)
2918 - except KeyboardInterrupt:
2919 - interrupted = True
2920 -@@ -709,7 +754,7 @@
2921 - sys.stdout.flush()
2922 - try:
2923 - verbose = True
2924 -- ok = runtest(test, True, quiet, huntrleaks, debug)
2925 -+ ok = _runtest(test, True, quiet, huntrleaks, debug)
2926 - except KeyboardInterrupt:
2927 - # print a newline separate from the ^C
2928 - print()
2929 -@@ -1077,8 +1122,9 @@
2930 - for name, get, restore in self.resource_info():
2931 - current = get()
2932 - original = saved_values.pop(name)
2933 -- # Check for changes to the resource's value
2934 -- if current != original:
2935 -+ # Check for changes to the resource's value. test_site is always run
2936 -+ # in a subprocess and is allowed to change os.environ and sys.path.
2937 -+ if current != original and self.testname != "test_site":
2938 - self.changed = True
2939 - restore(original)
2940 - if not self.quiet:
2941 ---- Lib/test/test_site.py
2942 -+++ Lib/test/test_site.py
2943 -@@ -8,6 +8,7 @@
2944 - from test.support import run_unittest, TESTFN, EnvironmentVarGuard
2945 - from test.support import captured_stderr
2946 - import builtins
2947 -+import imp
2948 - import os
2949 - import sys
2950 - import re
2951 -@@ -21,6 +22,9 @@
2952 - # already.
2953 - if "site" in sys.modules:
2954 - import site
2955 -+ if "_PYTHONNOSITEPACKAGES" in os.environ:
2956 -+ del os.environ["_PYTHONNOSITEPACKAGES"]
2957 -+ imp.reload(site)
2958 - else:
2959 - raise unittest.SkipTest("importation of site.py suppressed")
2960 -
2961 ---- Makefile.pre.in
2962 -+++ Makefile.pre.in
2963 -@@ -814,7 +814,7 @@
2964 -
2965 - TESTOPTS= -l $(EXTRATESTOPTS)
2966 - TESTPROG= $(srcdir)/Lib/test/regrtest.py
2967 --TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -E -R -bb $(TESTPYTHONOPTS)
2968 -+TESTPYTHON= _PYTHONNOSITEPACKAGES=1 $(RUNSHARED) ./$(BUILDPYTHON) -Wd -E -R -bb $(TESTPYTHONOPTS)
2969 - test: all platform
2970 - -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
2971 - -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
2972
2973 diff --git a/dev-lang/python/files/3.2/23_all_h2py_encoding.patch b/dev-lang/python/files/3.2/23_all_h2py_encoding.patch
2974 deleted file mode 100644
2975 index d594f56..0000000
2976 --- a/dev-lang/python/files/3.2/23_all_h2py_encoding.patch
2977 +++ /dev/null
2978 @@ -1,173 +0,0 @@
2979 -http://bugs.python.org/issue13032
2980 -
2981 ---- Tools/scripts/h2py.py
2982 -+++ Tools/scripts/h2py.py
2983 -@@ -23,36 +23,36 @@
2984 -
2985 - import sys, re, getopt, os
2986 -
2987 --p_define = re.compile('^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
2988 -+p_define = re.compile(b'^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
2989 -
2990 - p_macro = re.compile(
2991 -- '^[\t ]*#[\t ]*define[\t ]+'
2992 -- '([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
2993 -+ b'^[\t ]*#[\t ]*define[\t ]+'
2994 -+ b'([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
2995 -
2996 --p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
2997 -+p_include = re.compile(b'^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
2998 -
2999 --p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
3000 --p_cpp_comment = re.compile('//.*')
3001 -+p_comment = re.compile(br'/\*([^*]+|\*+[^/])*(\*+/)?')
3002 -+p_cpp_comment = re.compile(b'//.*')
3003 -
3004 - ignores = [p_comment, p_cpp_comment]
3005 -
3006 --p_char = re.compile(r"'(\\.[^\\]*|[^\\])'")
3007 -+p_char = re.compile(br"'(\\.[^\\]*|[^\\])'")
3008 -
3009 --p_hex = re.compile(r"0x([0-9a-fA-F]+)L?")
3010 -+p_hex = re.compile(br"0x([0-9a-fA-F]+)L?")
3011 -
3012 - filedict = {}
3013 - importable = {}
3014 -
3015 - try:
3016 -- searchdirs=os.environ['include'].split(';')
3017 -+ searchdirs=os.environb[b'include'].split(b';')
3018 - except KeyError:
3019 - try:
3020 -- searchdirs=os.environ['INCLUDE'].split(';')
3021 -+ searchdirs=os.environb[b'INCLUDE'].split(b';')
3022 - except KeyError:
3023 -- searchdirs=['/usr/include']
3024 -+ searchdirs=[b'/usr/include']
3025 - try:
3026 -- searchdirs.insert(0, os.path.join('/usr/include',
3027 -- os.environ['MULTIARCH']))
3028 -+ searchdirs.insert(0, os.path.join(b'/usr/include',
3029 -+ os.environb[b'MULTIARCH']))
3030 - except KeyError:
3031 - pass
3032 -
3033 -@@ -61,22 +61,23 @@
3034 - opts, args = getopt.getopt(sys.argv[1:], 'i:')
3035 - for o, a in opts:
3036 - if o == '-i':
3037 -- ignores.append(re.compile(a))
3038 -+ ignores.append(re.compile(a.encode()))
3039 - if not args:
3040 - args = ['-']
3041 - for filename in args:
3042 - if filename == '-':
3043 - sys.stdout.write('# Generated by h2py from stdin\n')
3044 -- process(sys.stdin, sys.stdout)
3045 -+ process(sys.stdin.buffer, sys.stdout.buffer)
3046 - else:
3047 -- fp = open(filename, 'r')
3048 -+ filename = filename.encode()
3049 -+ fp = open(filename, 'rb')
3050 - outfile = os.path.basename(filename)
3051 -- i = outfile.rfind('.')
3052 -+ i = outfile.rfind(b'.')
3053 - if i > 0: outfile = outfile[:i]
3054 - modname = outfile.upper()
3055 -- outfile = modname + '.py'
3056 -- outfp = open(outfile, 'w')
3057 -- outfp.write('# Generated by h2py from %s\n' % filename)
3058 -+ outfile = modname + b'.py'
3059 -+ outfp = open(outfile, 'wb')
3060 -+ outfp.write(b'# Generated by h2py from ' + filename + b'\n')
3061 - filedict = {}
3062 - for dir in searchdirs:
3063 - if filename[:len(dir)] == dir:
3064 -@@ -90,9 +91,9 @@
3065 - def pytify(body):
3066 - # replace ignored patterns by spaces
3067 - for p in ignores:
3068 -- body = p.sub(' ', body)
3069 -+ body = p.sub(b' ', body)
3070 - # replace char literals by ord(...)
3071 -- body = p_char.sub("ord('\\1')", body)
3072 -+ body = p_char.sub(b"ord('\\1')", body)
3073 - # Compute negative hexadecimal constants
3074 - start = 0
3075 - UMAX = 2*(sys.maxsize+1)
3076 -@@ -103,7 +104,7 @@
3077 - val = int(body[slice(*m.span(1))], 16)
3078 - if val > sys.maxsize:
3079 - val -= UMAX
3080 -- body = body[:s] + "(" + str(val) + ")" + body[e:]
3081 -+ body = body[:s] + b"(" + str(val).encode() + b")" + body[e:]
3082 - start = s + 1
3083 - return body
3084 -
3085 -@@ -116,7 +117,7 @@
3086 - match = p_define.match(line)
3087 - if match:
3088 - # gobble up continuation lines
3089 -- while line[-2:] == '\\\n':
3090 -+ while line[-2:] == b'\\\n':
3091 - nextline = fp.readline()
3092 - if not nextline: break
3093 - lineno = lineno + 1
3094 -@@ -125,11 +126,11 @@
3095 - body = line[match.end():]
3096 - body = pytify(body)
3097 - ok = 0
3098 -- stmt = '%s = %s\n' % (name, body.strip())
3099 -+ stmt = name + b' = ' + body.strip() + b'\n'
3100 - try:
3101 - exec(stmt, env)
3102 - except:
3103 -- sys.stderr.write('Skipping: %s' % stmt)
3104 -+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
3105 - else:
3106 - outfp.write(stmt)
3107 - match = p_macro.match(line)
3108 -@@ -137,11 +138,11 @@
3109 - macro, arg = match.group(1, 2)
3110 - body = line[match.end():]
3111 - body = pytify(body)
3112 -- stmt = 'def %s(%s): return %s\n' % (macro, arg, body)
3113 -+ stmt = b'def ' + macro + b'(' + arg + b'): return ' + body + b'\n'
3114 - try:
3115 - exec(stmt, env)
3116 - except:
3117 -- sys.stderr.write('Skipping: %s' % stmt)
3118 -+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
3119 - else:
3120 - outfp.write(stmt)
3121 - match = p_include.match(line)
3122 -@@ -150,23 +151,24 @@
3123 - a, b = regs[1]
3124 - filename = line[a:b]
3125 - if filename in importable:
3126 -- outfp.write('from %s import *\n' % importable[filename])
3127 -+ outfp.write(b'from ' + importable[filename] + b' import *\n')
3128 - elif filename not in filedict:
3129 - filedict[filename] = None
3130 - inclfp = None
3131 - for dir in searchdirs:
3132 - try:
3133 -- inclfp = open(dir + '/' + filename)
3134 -+ inclfp = open(dir + b'/' + filename, 'rb')
3135 - break
3136 - except IOError:
3137 - pass
3138 - if inclfp:
3139 - outfp.write(
3140 -- '\n# Included from %s\n' % filename)
3141 -+ b'\n# Included from ' + filename + b'\n')
3142 - process(inclfp, outfp, env)
3143 -+ inclfp.close()
3144 - else:
3145 -- sys.stderr.write('Warning - could not find file %s\n' %
3146 -- filename)
3147 -+ sys.stderr.buffer.write(b'Warning - could not find file ' +
3148 -+ filename + b'\n')
3149 -
3150 - if __name__ == '__main__':
3151 - main()
3152
3153 diff --git a/dev-lang/python/files/3.2/41_all_crosscompile.patch b/dev-lang/python/files/3.2/41_all_crosscompile.patch
3154 deleted file mode 100644
3155 index c35d2ba..0000000
3156 --- a/dev-lang/python/files/3.2/41_all_crosscompile.patch
3157 +++ /dev/null
3158 @@ -1,94 +0,0 @@
3159 -Crosscompile
3160 -
3161 ---- Makefile.pre.in
3162 -+++ Makefile.pre.in
3163 -@@ -202,6 +202,7 @@
3164 -
3165 - PYTHON= python$(EXE)
3166 - BUILDPYTHON= python$(BUILDEXE)
3167 -+HOSTPYTHON= $(BUILDPYTHON)
3168 -
3169 - # The task to run while instrument when building the profile-opt target
3170 - PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
3171 -@@ -244,6 +245,7 @@
3172 - ##########################################################################
3173 - # Parser
3174 - PGEN= Parser/pgen$(EXE)
3175 -+HOSTPGEN= $(PGEN)
3176 -
3177 - POBJS= \
3178 - Parser/acceler.o \
3179 -@@ -455,7 +457,7 @@
3180 - *) quiet="";; \
3181 - esac; \
3182 - $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \
3183 -- ./$(BUILDPYTHON) -E $(srcdir)/setup.py $$quiet build
3184 -+ ./$(HOSTPYTHON) -E $(srcdir)/setup.py $$quiet build
3185 -
3186 - # Build the platform-specific modules
3187 - platformspecificmods: $(BUILDPYTHON) sharedmods
3188 -@@ -635,9 +637,9 @@
3189 -
3190 - # Use a stamp file to prevent make -j invoking pgen twice
3191 - $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
3192 --Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
3193 -+Parser/pgen.stamp: $(HOSTPGEN) $(GRAMMAR_INPUT)
3194 - -@$(INSTALL) -d Include
3195 -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
3196 -+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
3197 - -touch Parser/pgen.stamp
3198 -
3199 - $(PGEN): $(PGENOBJS)
3200 -@@ -1065,27 +1067,27 @@
3201 - $(DESTDIR)$(LIBDEST)/distutils/tests ; \
3202 - fi
3203 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
3204 -- ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
3205 -+ ./$(HOSTPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
3206 - -d $(LIBDEST) -f \
3207 - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
3208 - $(DESTDIR)$(LIBDEST)
3209 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
3210 -- ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
3211 -+ ./$(HOSTPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
3212 - -d $(LIBDEST) -f \
3213 - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
3214 - $(DESTDIR)$(LIBDEST)
3215 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
3216 -- ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
3217 -+ ./$(HOSTPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
3218 - -d $(LIBDEST)/site-packages -f \
3219 - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
3220 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
3221 -- ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
3222 -+ ./$(HOSTPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
3223 - -d $(LIBDEST)/site-packages -f \
3224 - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
3225 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
3226 -- ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
3227 -+ ./$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
3228 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
3229 -- ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
3230 -+ ./$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
3231 -
3232 - python-config: $(srcdir)/Misc/python-config.in
3233 - # Substitution happens here, as the completely-expanded BINDIR
3234 -@@ -1157,7 +1159,7 @@
3235 - # Install the dynamically loadable modules
3236 - # This goes into $(exec_prefix)
3237 - sharedinstall: sharedmods
3238 -- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
3239 -+ $(RUNSHARED) ./$(HOSTPYTHON) -E $(srcdir)/setup.py install \
3240 - --prefix=$(prefix) \
3241 - --install-scripts=$(BINDIR) \
3242 - --install-platlib=$(DESTSHARED) \
3243 ---- setup.py
3244 -+++ setup.py
3245 -@@ -345,6 +345,7 @@
3246 - try:
3247 - imp.load_dynamic(ext.name, ext_filename)
3248 - except ImportError as why:
3249 -+ return
3250 - self.failed.append(ext.name)
3251 - self.announce('*** WARNING: renaming "%s" since importing it'
3252 - ' failed: %s' % (ext.name, why), level=3)
3253
3254 diff --git a/dev-lang/python/files/3.2/81_all_use_new_readline_function_types__closes__20374_.patch b/dev-lang/python/files/3.2/81_all_use_new_readline_function_types__closes__20374_.patch
3255 deleted file mode 100644
3256 index 419f7a0..0000000
3257 --- a/dev-lang/python/files/3.2/81_all_use_new_readline_function_types__closes__20374_.patch
3258 +++ /dev/null
3259 @@ -1,28 +0,0 @@
3260 -# HG changeset patch
3261 -# User Benjamin Peterson <benjamin@××××××.org>
3262 -# Date 1390541532 18000
3263 -# Fri Jan 24 00:32:12 2014 -0500
3264 -# Branch 3.3
3265 -# Node ID fb2259d9f6b4104be0015068e3293b3abb68dce7
3266 -# Parent fed5d501a179138e3b214e463a0bc13943de7ce5
3267 -use new readline function types (closes #20374)
3268 -
3269 -diff --git a/Modules/readline.c b/Modules/readline.c
3270 ---- a/Modules/readline.c
3271 -+++ b/Modules/readline.c
3272 -@@ -936,12 +936,12 @@
3273 - rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
3274 - rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
3275 - /* Set our hook functions */
3276 -- rl_startup_hook = (Function *)on_startup_hook;
3277 -+ rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
3278 - #ifdef HAVE_RL_PRE_INPUT_HOOK
3279 -- rl_pre_input_hook = (Function *)on_pre_input_hook;
3280 -+ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
3281 - #endif
3282 - /* Set our completion function */
3283 -- rl_attempted_completion_function = (CPPFunction *)flex_complete;
3284 -+ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
3285 - /* Set Python word break characters */
3286 - completer_word_break_characters =
3287 - rl_completer_word_break_characters =
3288
3289 diff --git a/dev-lang/python/files/3.2/82_all_new_plan__just_remove_typecasts__closes__20374_.patch b/dev-lang/python/files/3.2/82_all_new_plan__just_remove_typecasts__closes__20374_.patch
3290 deleted file mode 100644
3291 index d0716f9..0000000
3292 --- a/dev-lang/python/files/3.2/82_all_new_plan__just_remove_typecasts__closes__20374_.patch
3293 +++ /dev/null
3294 @@ -1,37 +0,0 @@
3295 -# HG changeset patch
3296 -# User Benjamin Peterson <benjamin@××××××.org>
3297 -# Date 1390581856 18000
3298 -# Fri Jan 24 11:44:16 2014 -0500
3299 -# Branch 3.3
3300 -# Node ID fc62fcd8e990d80b15177716437f20da49b9dccf
3301 -# Parent b3eaeb4bdf84a8f89afaf24c0308bd0d13987844
3302 -new plan: just remove typecasts (closes #20374)
3303 -
3304 -diff --git a/Modules/readline.c b/Modules/readline.c
3305 ---- a/Modules/readline.c
3306 -+++ b/Modules/readline.c
3307 -@@ -877,7 +877,7 @@
3308 - * before calling the normal completer */
3309 -
3310 - static char **
3311 --flex_complete(char *text, int start, int end)
3312 -+flex_complete(const char *text, int start, int end)
3313 - {
3314 - #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
3315 - rl_completion_append_character ='\0';
3316 -@@ -936,12 +936,12 @@
3317 - rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
3318 - rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
3319 - /* Set our hook functions */
3320 -- rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
3321 -+ rl_startup_hook = on_startup_hook;
3322 - #ifdef HAVE_RL_PRE_INPUT_HOOK
3323 -- rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
3324 -+ rl_pre_input_hook = on_pre_input_hook;
3325 - #endif
3326 - /* Set our completion function */
3327 -- rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
3328 -+ rl_attempted_completion_function = flex_complete;
3329 - /* Set Python word break characters */
3330 - completer_word_break_characters =
3331 - rl_completer_word_break_characters =
3332
3333 diff --git a/dev-lang/python/files/3.2/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch b/dev-lang/python/files/3.2/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch
3334 deleted file mode 100644
3335 index 232e666..0000000
3336 --- a/dev-lang/python/files/3.2/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch
3337 +++ /dev/null
3338 @@ -1,37 +0,0 @@
3339 -# HG changeset patch
3340 -# User Ned Deily <nad@×××.org>
3341 -# Date 1391647990 28800
3342 -# Wed Feb 05 16:53:10 2014 -0800
3343 -# Branch 3.3
3344 -# Node ID 9131a9edcac4880b2759c82fb38f13f6f871a73e
3345 -# Parent b5fe07d39e163240aed04f71ae7862c7cf36c1e7
3346 -Issue #20374: Avoid compiler warnings when compiling readline with libedit.
3347 -
3348 -diff --git a/Modules/readline.c b/Modules/readline.c
3349 ---- a/Modules/readline.c
3350 -+++ b/Modules/readline.c
3351 -@@ -773,15 +773,24 @@
3352 - return result;
3353 - }
3354 -
3355 -+
3356 - static int
3357 -+#if defined(_RL_FUNCTION_TYPEDEF)
3358 - on_startup_hook(void)
3359 -+#else
3360 -+on_startup_hook()
3361 -+#endif
3362 - {
3363 - return on_hook(startup_hook);
3364 - }
3365 -
3366 - #ifdef HAVE_RL_PRE_INPUT_HOOK
3367 - static int
3368 -+#if defined(_RL_FUNCTION_TYPEDEF)
3369 - on_pre_input_hook(void)
3370 -+#else
3371 -+on_pre_input_hook()
3372 -+#endif
3373 - {
3374 - return on_hook(pre_input_hook);
3375 - }
3376
3377 diff --git a/dev-lang/python/files/3.3/.gitattributes b/dev-lang/python/files/3.3/.gitattributes
3378 deleted file mode 100644
3379 index 5e5a56d..0000000
3380 --- a/dev-lang/python/files/3.3/.gitattributes
3381 +++ /dev/null
3382 @@ -1 +0,0 @@
3383 -Makefile export-ignore
3384
3385 diff --git a/dev-lang/python/files/3.3/01_all_static_library_location.patch b/dev-lang/python/files/3.3/01_all_static_library_location.patch
3386 deleted file mode 100644
3387 index 36ac67a..0000000
3388 --- a/dev-lang/python/files/3.3/01_all_static_library_location.patch
3389 +++ /dev/null
3390 @@ -1,70 +0,0 @@
3391 -Install libpythonX.Y.a in /usr/lib instead of /usr/lib/pythonX.Y/config.
3392 -https://bugs.gentoo.org/show_bug.cgi?id=252372
3393 -http://bugs.python.org/issue6103
3394 -
3395 ---- Makefile.pre.in
3396 -+++ Makefile.pre.in
3397 -@@ -965,6 +965,19 @@
3398 - fi; \
3399 - else true; \
3400 - fi
3401 -+ @if test -f $(LIBRARY) && test $(LIBRARY) != $(LDLIBRARY); then \
3402 -+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
3403 -+ if test "$(SHLIB_SUFFIX)" = .dll; then \
3404 -+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR); \
3405 -+ else \
3406 -+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR); \
3407 -+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY); \
3408 -+ fi; \
3409 -+ else \
3410 -+ echo "Skipped install of $(LIBRARY) - use make frameworkinstall"; \
3411 -+ fi; \
3412 -+ else true; \
3413 -+ fi
3414 -
3415 - bininstall: altbininstall
3416 - -if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \
3417 -@@ -1200,18 +1213,6 @@
3418 - else true; \
3419 - fi; \
3420 - done
3421 -- @if test -d $(LIBRARY); then :; else \
3422 -- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
3423 -- if test "$(SHLIB_SUFFIX)" = .dll; then \
3424 -- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
3425 -- else \
3426 -- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
3427 -- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
3428 -- fi; \
3429 -- else \
3430 -- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
3431 -- fi; \
3432 -- fi
3433 - $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
3434 - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
3435 - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
3436 ---- Misc/python-config.in
3437 -+++ Misc/python-config.in
3438 -@@ -47,11 +47,7 @@
3439 - elif opt in ('--libs', '--ldflags'):
3440 - libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
3441 - libs.append('-lpython' + pyver + sys.abiflags)
3442 -- # add the prefix/lib/pythonX.Y/config dir, but only if there is no
3443 -- # shared library in prefix/lib/.
3444 - if opt == '--ldflags':
3445 -- if not getvar('Py_ENABLE_SHARED'):
3446 -- libs.insert(0, '-L' + getvar('LIBPL'))
3447 - if not getvar('PYTHONFRAMEWORK'):
3448 - libs.extend(getvar('LINKFORSHARED').split())
3449 - print(' '.join(libs))
3450 ---- Modules/makesetup
3451 -+++ Modules/makesetup
3452 -@@ -89,7 +89,7 @@
3453 - then
3454 - ExtraLibDir=.
3455 - else
3456 -- ExtraLibDir='$(LIBPL)'
3457 -+ ExtraLibDir='$(LIBDIR)'
3458 - fi
3459 - ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
3460 - esac
3461
3462 diff --git a/dev-lang/python/files/3.3/02_all_disable_modules_and_ssl.patch b/dev-lang/python/files/3.3/02_all_disable_modules_and_ssl.patch
3463 deleted file mode 100644
3464 index af735be..0000000
3465 --- a/dev-lang/python/files/3.3/02_all_disable_modules_and_ssl.patch
3466 +++ /dev/null
3467 @@ -1,57 +0,0 @@
3468 ---- setup.py
3469 -+++ setup.py
3470 -@@ -31,7 +31,17 @@
3471 - COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
3472 -
3473 - # This global variable is used to hold the list of modules to be disabled.
3474 --disabled_module_list = []
3475 -+pdm_env = "PYTHON_DISABLE_MODULES"
3476 -+if pdm_env in os.environ:
3477 -+ disabled_module_list = os.environ[pdm_env].split()
3478 -+else:
3479 -+ disabled_module_list = []
3480 -+
3481 -+pds_env = "PYTHON_DISABLE_SSL"
3482 -+if pds_env in os.environ:
3483 -+ disable_ssl = os.environ[pds_env]
3484 -+else:
3485 -+ disable_ssl = 0
3486 -
3487 - def add_dir_to_list(dirlist, dir):
3488 - """Add the directory 'dir' to the list 'dirlist' (after any relative
3489 -@@ -435,6 +445,7 @@
3490 - os.unlink(tmpfile)
3491 -
3492 - def detect_modules(self):
3493 -+ global disable_ssl
3494 - # Ensure that /usr/local is always used, but the local build
3495 - # directories (i.e. '.' and 'Include') must be first. See issue
3496 - # 10520.
3497 -@@ -747,7 +758,7 @@
3498 - ssl_incs = find_file('openssl/ssl.h', inc_dirs,
3499 - search_for_ssl_incs_in
3500 - )
3501 -- if ssl_incs is not None:
3502 -+ if ssl_incs is not None and not disable_ssl:
3503 - krb5_h = find_file('krb5.h', inc_dirs,
3504 - ['/usr/kerberos/include'])
3505 - if krb5_h:
3506 -@@ -758,7 +769,8 @@
3507 - ] )
3508 -
3509 - if (ssl_incs is not None and
3510 -- ssl_libs is not None):
3511 -+ ssl_libs is not None and
3512 -+ not disable_ssl):
3513 - exts.append( Extension('_ssl', ['_ssl.c'],
3514 - include_dirs = ssl_incs,
3515 - library_dirs = ssl_libs,
3516 -@@ -791,7 +803,7 @@
3517 -
3518 - #print('openssl_ver = 0x%08x' % openssl_ver)
3519 - min_openssl_ver = 0x00907000
3520 -- have_any_openssl = ssl_incs is not None and ssl_libs is not None
3521 -+ have_any_openssl = ssl_incs is not None and ssl_libs is not None and not disable_ssl
3522 - have_usable_openssl = (have_any_openssl and
3523 - openssl_ver >= min_openssl_ver)
3524 -
3525
3526 diff --git a/dev-lang/python/files/3.3/03_all_libdir.patch b/dev-lang/python/files/3.3/03_all_libdir.patch
3527 deleted file mode 100644
3528 index 052c51d..0000000
3529 --- a/dev-lang/python/files/3.3/03_all_libdir.patch
3530 +++ /dev/null
3531 @@ -1,174 +0,0 @@
3532 ---- Lib/distutils/command/install.py
3533 -+++ Lib/distutils/command/install.py
3534 -@@ -44,8 +44,8 @@
3535 -
3536 - INSTALL_SCHEMES = {
3537 - 'unix_prefix': {
3538 -- 'purelib': '$base/lib/python$py_version_short/site-packages',
3539 -- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
3540 -+ 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
3541 -+ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
3542 - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
3543 - 'scripts': '$base/bin',
3544 - 'data' : '$base',
3545 ---- Lib/distutils/sysconfig.py
3546 -+++ Lib/distutils/sysconfig.py
3547 -@@ -144,7 +144,7 @@
3548 -
3549 - if os.name == "posix":
3550 - libpython = os.path.join(prefix,
3551 -- "lib", "python" + get_python_version())
3552 -+ "@@GENTOO_LIBDIR@@", "python" + get_python_version())
3553 - if standard_lib:
3554 - return libpython
3555 - else:
3556 ---- Lib/site.py
3557 -+++ Lib/site.py
3558 -@@ -303,10 +303,10 @@
3559 - if sys.platform in ('os2emx', 'riscos'):
3560 - sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
3561 - elif os.sep == '/':
3562 -- sitepackages.append(os.path.join(prefix, "lib",
3563 -+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@",
3564 - "python" + sys.version[:3],
3565 - "site-packages"))
3566 -- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
3567 -+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python"))
3568 - else:
3569 - sitepackages.append(prefix)
3570 - sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
3571 ---- Lib/sysconfig.py
3572 -+++ Lib/sysconfig.py
3573 -@@ -21,10 +21,10 @@
3574 -
3575 - _INSTALL_SCHEMES = {
3576 - 'posix_prefix': {
3577 -- 'stdlib': '{installed_base}/lib/python{py_version_short}',
3578 -- 'platstdlib': '{platbase}/lib/python{py_version_short}',
3579 -- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
3580 -- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
3581 -+ 'stdlib': '{installed_base}/@@GENTOO_LIBDIR@@/python{py_version_short}',
3582 -+ 'platstdlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
3583 -+ 'purelib': '{base}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
3584 -+ 'platlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
3585 - 'include':
3586 - '{installed_base}/include/python{py_version_short}{abiflags}',
3587 - 'platinclude':
3588 -@@ -81,10 +81,10 @@
3589 - 'data': '{userbase}',
3590 - },
3591 - 'posix_user': {
3592 -- 'stdlib': '{userbase}/lib/python{py_version_short}',
3593 -- 'platstdlib': '{userbase}/lib/python{py_version_short}',
3594 -- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
3595 -- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
3596 -+ 'stdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
3597 -+ 'platstdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
3598 -+ 'purelib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
3599 -+ 'platlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
3600 - 'include': '{userbase}/include/python{py_version_short}',
3601 - 'scripts': '{userbase}/bin',
3602 - 'data': '{userbase}',
3603 ---- Lib/test/test_site.py
3604 -+++ Lib/test/test_site.py
3605 -@@ -248,10 +248,10 @@
3606 - elif os.sep == '/':
3607 - # OS X non-framwework builds, Linux, FreeBSD, etc
3608 - self.assertEqual(len(dirs), 2)
3609 -- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
3610 -+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'python' + sys.version[:3],
3611 - 'site-packages')
3612 - self.assertEqual(dirs[0], wanted)
3613 -- wanted = os.path.join('xoxo', 'lib', 'site-python')
3614 -+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'site-python')
3615 - self.assertEqual(dirs[1], wanted)
3616 - else:
3617 - # other platforms
3618 ---- Makefile.pre.in
3619 -+++ Makefile.pre.in
3620 -@@ -115,7 +115,7 @@
3621 - MANDIR= @mandir@
3622 - INCLUDEDIR= @includedir@
3623 - CONFINCLUDEDIR= $(exec_prefix)/include
3624 --SCRIPTDIR= $(prefix)/lib
3625 -+SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@
3626 - ABIFLAGS= @ABIFLAGS@
3627 -
3628 - # Detailed destination directories
3629 ---- Modules/getpath.c
3630 -+++ Modules/getpath.c
3631 -@@ -122,8 +122,8 @@
3632 - #endif
3633 -
3634 - #ifndef PYTHONPATH
3635 --#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
3636 -- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
3637 -+#define PYTHONPATH PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION ":" \
3638 -+ EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload"
3639 - #endif
3640 -
3641 - #ifndef LANDMARK
3642 -@@ -135,7 +135,7 @@
3643 - static wchar_t progpath[MAXPATHLEN+1];
3644 - static wchar_t *module_search_path = NULL;
3645 - static int module_search_path_malloced = 0;
3646 --static wchar_t *lib_python = L"lib/python" VERSION;
3647 -+static wchar_t *lib_python = L"@@GENTOO_LIBDIR@@/python" VERSION;
3648 -
3649 - static void
3650 - reduce(wchar_t *dir)
3651 -@@ -685,7 +685,7 @@
3652 - }
3653 - else
3654 - wcsncpy(zip_path, _prefix, MAXPATHLEN);
3655 -- joinpath(zip_path, L"lib/python00.zip");
3656 -+ joinpath(zip_path, L"@@GENTOO_LIBDIR@@/python00.zip");
3657 - bufsz = wcslen(zip_path); /* Replace "00" with version */
3658 - zip_path[bufsz - 6] = VERSION[0];
3659 - zip_path[bufsz - 5] = VERSION[2];
3660 -@@ -695,7 +695,7 @@
3661 - fprintf(stderr,
3662 - "Could not find platform dependent libraries <exec_prefix>\n");
3663 - wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
3664 -- joinpath(exec_prefix, L"lib/lib-dynload");
3665 -+ joinpath(exec_prefix, L"@@GENTOO_LIBDIR@@/lib-dynload");
3666 - }
3667 - /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
3668 -
3669 ---- Modules/Setup.dist
3670 -+++ Modules/Setup.dist
3671 -@@ -354,7 +354,7 @@
3672 - # Andrew Kuchling's zlib module.
3673 - # This require zlib 1.1.3 (or later).
3674 - # See http://www.gzip.org/zlib/
3675 --#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
3676 -+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
3677 -
3678 - # Interface to the Expat XML parser
3679 - #
3680 ---- setup.py
3681 -+++ setup.py
3682 -@@ -507,8 +507,7 @@
3683 - # be assumed that no additional -I,-L directives are needed.
3684 - if not cross_compiling:
3685 - lib_dirs = self.compiler.library_dirs + [
3686 -- '/lib64', '/usr/lib64',
3687 -- '/lib', '/usr/lib',
3688 -+ '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
3689 - ]
3690 - inc_dirs = self.compiler.include_dirs + ['/usr/include']
3691 - else:
3692 -@@ -723,11 +722,11 @@
3693 - elif curses_library:
3694 - readline_libs.append(curses_library)
3695 - elif self.compiler.find_library_file(lib_dirs +
3696 -- ['/usr/lib/termcap'],
3697 -+ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
3698 - 'termcap'):
3699 - readline_libs.append('termcap')
3700 - exts.append( Extension('readline', ['readline.c'],
3701 -- library_dirs=['/usr/lib/termcap'],
3702 -+ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
3703 - extra_link_args=readline_extra_link_args,
3704 - libraries=readline_libs) )
3705 - else:
3706
3707 diff --git a/dev-lang/python/files/3.3/04_all_non-zero_exit_status_on_failure.patch b/dev-lang/python/files/3.3/04_all_non-zero_exit_status_on_failure.patch
3708 deleted file mode 100644
3709 index 58b839f..0000000
3710 --- a/dev-lang/python/files/3.3/04_all_non-zero_exit_status_on_failure.patch
3711 +++ /dev/null
3712 @@ -1,31 +0,0 @@
3713 -https://bugs.gentoo.org/show_bug.cgi?id=281968
3714 -http://bugs.python.org/issue6731
3715 -
3716 ---- setup.py
3717 -+++ setup.py
3718 -@@ -43,6 +43,8 @@
3719 - else:
3720 - disable_ssl = 0
3721 -
3722 -+exit_status = 0
3723 -+
3724 - def add_dir_to_list(dirlist, dir):
3725 - """Add the directory 'dir' to the list 'dirlist' (after any relative
3726 - directories) if:
3727 -@@ -277,6 +279,8 @@
3728 - print()
3729 -
3730 - if self.failed:
3731 -+ global exit_status
3732 -+ exit_status = 1
3733 - failed = self.failed[:]
3734 - print()
3735 - print("Failed to build these modules:")
3736 -@@ -2213,6 +2217,7 @@
3737 - scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
3738 - "Tools/scripts/2to3", "Tools/scripts/pyvenv"]
3739 - )
3740 -+ sys.exit(exit_status)
3741 -
3742 - # --install-platlib
3743 - if __name__ == '__main__':
3744
3745 diff --git a/dev-lang/python/files/3.3/05_all_regenerate_platform-specific_modules.patch b/dev-lang/python/files/3.3/05_all_regenerate_platform-specific_modules.patch
3746 deleted file mode 100644
3747 index 68f33f7..0000000
3748 --- a/dev-lang/python/files/3.3/05_all_regenerate_platform-specific_modules.patch
3749 +++ /dev/null
3750 @@ -1,123 +0,0 @@
3751 -http://bugs.python.org/issue12619
3752 -
3753 ---- Lib/plat-aix4/regen
3754 -+++ Lib/plat-aix4/regen
3755 -@@ -5,4 +5,4 @@
3756 - exit 1;;
3757 - esac
3758 - set -v
3759 --h2py.py -i '(u_long)' /usr/include/netinet/in.h
3760 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
3761 ---- Lib/plat-linux/regen
3762 -+++ Lib/plat-linux/regen
3763 -@@ -5,4 +5,4 @@
3764 - exit 1;;
3765 - esac
3766 - set -v
3767 --h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
3768 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h /usr/include/linux/cdrom.h
3769 ---- Lib/plat-sunos5/regen
3770 -+++ Lib/plat-sunos5/regen
3771 -@@ -5,5 +5,4 @@
3772 - exit 1;;
3773 - esac
3774 - set -v
3775 --h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
3776 --
3777 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
3778 ---- Lib/plat-unixware7/regen
3779 -+++ Lib/plat-unixware7/regen
3780 -@@ -5,5 +5,5 @@
3781 - exit 1;;
3782 - esac
3783 - set -v
3784 --h2py -i '(u_long)' /usr/include/netinet/in.h
3785 --h2py /usr/include/sys/stropts.h
3786 -+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
3787 -+python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h
3788 ---- Makefile.pre.in
3789 -+++ Makefile.pre.in
3790 -@@ -444,7 +444,7 @@
3791 -
3792 - # Default target
3793 - all: build_all
3794 --build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed
3795 -+build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods gdbhooks Modules/_testembed
3796 -
3797 - # Compile a binary with gcc profile guided optimization.
3798 - profile-opt:
3799 -@@ -500,6 +500,32 @@
3800 - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
3801 - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
3802 -
3803 -+# Build the platform-specific modules
3804 -+platformspecificmods: $(BUILDPYTHON) sharedmods
3805 -+ @PLATDIR=$(PLATDIR); \
3806 -+ if test ! -f $(srcdir)/Lib/$(PLATDIR)/regen; then \
3807 -+ $(INSTALL) -d $(srcdir)/Lib/$(PLATDIR); \
3808 -+ if test -f $(srcdir)/Lib/$${PLATDIR%?}/regen; then \
3809 -+ cp $(srcdir)/Lib/$${PLATDIR%?}/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
3810 -+ else \
3811 -+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
3812 -+ fi \
3813 -+ fi
3814 -+ @EXE="$(BUILDEXE)"; export EXE; \
3815 -+ PATH="`pwd`:$$PATH"; export PATH; \
3816 -+ PYTHONPATH="`pwd`/Lib"; export PYTHONPATH; \
3817 -+ if [ -n "$(MULTIARCH)" ]; then MULTIARCH=$(MULTIARCH); export MULTIARCH; fi; \
3818 -+ if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
3819 -+ PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
3820 -+ else \
3821 -+ PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
3822 -+ fi; export PYTHON_FOR_BUILD; \
3823 -+ cd $(srcdir)/Lib/$(PLATDIR); \
3824 -+ $(RUNSHARED) ./regen || exit 1; \
3825 -+ for module in *.py; do \
3826 -+ $(RUNSHARED) $(BUILDPYTHON) -c "with open('$$module', 'rb') as module: compile(module.read(), '$$module', 'exec')" || exit 1; \
3827 -+ done
3828 -+
3829 - # Build static library
3830 - # avoid long command lines, same as LIBRARY_OBJS
3831 - $(LIBRARY): $(LIBRARY_OBJS)
3832 -@@ -1074,7 +1100,7 @@
3833 - unittest unittest/test unittest/test/testmock \
3834 - venv venv/scripts venv/scripts/posix \
3835 - curses pydoc_data $(MACHDEPS)
3836 --libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
3837 -+libinstall: build_all $(srcdir)/Modules/xxmodule.c
3838 - @for i in $(SCRIPTDIR) $(LIBDEST); \
3839 - do \
3840 - if test ! -d $(DESTDIR)$$i; then \
3841 -@@ -1157,23 +1183,6 @@
3842 - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
3843 - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
3844 -
3845 --# Create the PLATDIR source directory, if one wasn't distributed..
3846 --$(srcdir)/Lib/$(PLATDIR):
3847 -- mkdir $(srcdir)/Lib/$(PLATDIR)
3848 -- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
3849 -- export PATH; PATH="`pwd`:$$PATH"; \
3850 -- export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
3851 -- export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
3852 -- export EXE; EXE="$(BUILDEXE)"; \
3853 -- if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
3854 -- export PYTHON_FOR_BUILD; \
3855 -- if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
3856 -- PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
3857 -- else \
3858 -- PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
3859 -- fi; \
3860 -- cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
3861 --
3862 - python-config: $(srcdir)/Misc/python-config.in
3863 - # Substitution happens here, as the completely-expanded BINDIR
3864 - # is not available in configure
3865 -@@ -1476,7 +1485,7 @@
3866 - Python/thread.o: @THREADHEADERS@
3867 -
3868 - # Declare targets that aren't real files
3869 --.PHONY: all build_all sharedmods oldsharedmods test quicktest
3870 -+.PHONY: all build_all sharedmods oldsharedmods platformspecificmods test quicktest
3871 - .PHONY: install altinstall oldsharedinstall bininstall altbininstall
3872 - .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
3873 - .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
3874
3875 diff --git a/dev-lang/python/files/3.3/21_all_distutils_c++.patch b/dev-lang/python/files/3.3/21_all_distutils_c++.patch
3876 deleted file mode 100644
3877 index 1f6c19a..0000000
3878 --- a/dev-lang/python/files/3.3/21_all_distutils_c++.patch
3879 +++ /dev/null
3880 @@ -1,271 +0,0 @@
3881 -http://bugs.python.org/issue1222585
3882 -
3883 ---- Lib/distutils/cygwinccompiler.py
3884 -+++ Lib/distutils/cygwinccompiler.py
3885 -@@ -124,8 +124,10 @@
3886 - # dllwrap 2.10.90 is buggy
3887 - if self.ld_version >= "2.10.90":
3888 - self.linker_dll = "gcc"
3889 -+ self.linker_dll_cxx = "g++"
3890 - else:
3891 - self.linker_dll = "dllwrap"
3892 -+ self.linker_dll_cxx = "dllwrap"
3893 -
3894 - # ld_version >= "2.13" support -shared so use it instead of
3895 - # -mdll -static
3896 -@@ -139,9 +141,13 @@
3897 - self.set_executables(compiler='gcc -mcygwin -O -Wall',
3898 - compiler_so='gcc -mcygwin -mdll -O -Wall',
3899 - compiler_cxx='g++ -mcygwin -O -Wall',
3900 -+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
3901 - linker_exe='gcc -mcygwin',
3902 - linker_so=('%s -mcygwin %s' %
3903 -- (self.linker_dll, shared_option)))
3904 -+ (self.linker_dll, shared_option)),
3905 -+ linker_exe_cxx='g++ -mcygwin',
3906 -+ linker_so_cxx=('%s -mcygwin %s' %
3907 -+ (self.linker_dll_cxx, shared_option)))
3908 -
3909 - # cygwin and mingw32 need different sets of libraries
3910 - if self.gcc_version == "2.91.57":
3911 -@@ -165,8 +171,12 @@
3912 - raise CompileError(msg)
3913 - else: # for other files use the C-compiler
3914 - try:
3915 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
3916 -- extra_postargs)
3917 -+ if self.detect_language(src) == 'c++':
3918 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
3919 -+ extra_postargs)
3920 -+ else:
3921 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
3922 -+ extra_postargs)
3923 - except DistutilsExecError as msg:
3924 - raise CompileError(msg)
3925 -
3926 -@@ -302,9 +312,14 @@
3927 - self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin,
3928 - compiler_so='gcc%s -mdll -O -Wall' % no_cygwin,
3929 - compiler_cxx='g++%s -O -Wall' % no_cygwin,
3930 -+ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin,
3931 - linker_exe='gcc%s' % no_cygwin,
3932 - linker_so='%s%s %s %s'
3933 - % (self.linker_dll, no_cygwin,
3934 -+ shared_option, entry_point),
3935 -+ linker_exe_cxx='g++%s' % no_cygwin,
3936 -+ linker_so_cxx='%s%s %s %s'
3937 -+ % (self.linker_dll_cxx, no_cygwin,
3938 - shared_option, entry_point))
3939 - # Maybe we should also append -mthreads, but then the finished
3940 - # dlls need another dll (mingwm10.dll see Mingw32 docs)
3941 ---- Lib/distutils/emxccompiler.py
3942 -+++ Lib/distutils/emxccompiler.py
3943 -@@ -63,8 +63,12 @@
3944 - # XXX optimization, warnings etc. should be customizable.
3945 - self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
3946 - compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
3947 -+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
3948 -+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
3949 - linker_exe='gcc -Zomf -Zmt -Zcrtdll',
3950 -- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
3951 -+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
3952 -+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
3953 -+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
3954 -
3955 - # want the gcc library statically linked (so that we don't have
3956 - # to distribute a version dependent on the compiler we have)
3957 -@@ -81,8 +85,12 @@
3958 - raise CompileError(msg)
3959 - else: # for other files use the C-compiler
3960 - try:
3961 -- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
3962 -- extra_postargs)
3963 -+ if self.detect_language(src) == 'c++':
3964 -+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
3965 -+ extra_postargs)
3966 -+ else:
3967 -+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
3968 -+ extra_postargs)
3969 - except DistutilsExecError as msg:
3970 - raise CompileError(msg)
3971 -
3972 ---- Lib/distutils/sysconfig.py
3973 -+++ Lib/distutils/sysconfig.py
3974 -@@ -191,9 +191,12 @@
3975 - _osx_support.customize_compiler(_config_vars)
3976 - _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
3977 -
3978 -- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
3979 -- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
3980 -- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
3981 -+ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
3982 -+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
3983 -+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
3984 -+
3985 -+ cflags = ''
3986 -+ cxxflags = ''
3987 -
3988 - if 'CC' in os.environ:
3989 - newcc = os.environ['CC']
3990 -@@ -208,19 +211,27 @@
3991 - cxx = os.environ['CXX']
3992 - if 'LDSHARED' in os.environ:
3993 - ldshared = os.environ['LDSHARED']
3994 -+ if 'LDCXXSHARED' in os.environ:
3995 -+ ldcxxshared = os.environ['LDCXXSHARED']
3996 - if 'CPP' in os.environ:
3997 - cpp = os.environ['CPP']
3998 - else:
3999 - cpp = cc + " -E" # not always
4000 - if 'LDFLAGS' in os.environ:
4001 - ldshared = ldshared + ' ' + os.environ['LDFLAGS']
4002 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
4003 - if 'CFLAGS' in os.environ:
4004 -- cflags = opt + ' ' + os.environ['CFLAGS']
4005 -+ cflags = os.environ['CFLAGS']
4006 - ldshared = ldshared + ' ' + os.environ['CFLAGS']
4007 -+ if 'CXXFLAGS' in os.environ:
4008 -+ cxxflags = os.environ['CXXFLAGS']
4009 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
4010 - if 'CPPFLAGS' in os.environ:
4011 - cpp = cpp + ' ' + os.environ['CPPFLAGS']
4012 - cflags = cflags + ' ' + os.environ['CPPFLAGS']
4013 -+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
4014 - ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
4015 -+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
4016 - if 'AR' in os.environ:
4017 - ar = os.environ['AR']
4018 - if 'ARFLAGS' in os.environ:
4019 -@@ -229,13 +240,17 @@
4020 - archiver = ar + ' ' + ar_flags
4021 -
4022 - cc_cmd = cc + ' ' + cflags
4023 -+ cxx_cmd = cxx + ' ' + cxxflags
4024 - compiler.set_executables(
4025 - preprocessor=cpp,
4026 - compiler=cc_cmd,
4027 - compiler_so=cc_cmd + ' ' + ccshared,
4028 -- compiler_cxx=cxx,
4029 -+ compiler_cxx=cxx_cmd,
4030 -+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
4031 - linker_so=ldshared,
4032 - linker_exe=cc,
4033 -+ linker_so_cxx=ldcxxshared,
4034 -+ linker_exe_cxx=cxx,
4035 - archiver=archiver)
4036 -
4037 - compiler.shared_lib_extension = shlib_suffix
4038 ---- Lib/distutils/unixccompiler.py
4039 -+++ Lib/distutils/unixccompiler.py
4040 -@@ -52,14 +52,17 @@
4041 - # are pretty generic; they will probably have to be set by an outsider
4042 - # (eg. using information discovered by the sysconfig about building
4043 - # Python extensions).
4044 -- executables = {'preprocessor' : None,
4045 -- 'compiler' : ["cc"],
4046 -- 'compiler_so' : ["cc"],
4047 -- 'compiler_cxx' : ["cc"],
4048 -- 'linker_so' : ["cc", "-shared"],
4049 -- 'linker_exe' : ["cc"],
4050 -- 'archiver' : ["ar", "-cr"],
4051 -- 'ranlib' : None,
4052 -+ executables = {'preprocessor' : None,
4053 -+ 'compiler' : ["cc"],
4054 -+ 'compiler_so' : ["cc"],
4055 -+ 'compiler_cxx' : ["c++"],
4056 -+ 'compiler_so_cxx' : ["c++"],
4057 -+ 'linker_so' : ["cc", "-shared"],
4058 -+ 'linker_exe' : ["cc"],
4059 -+ 'linker_so_cxx' : ["c++", "-shared"],
4060 -+ 'linker_exe_cxx' : ["c++"],
4061 -+ 'archiver' : ["ar", "-cr"],
4062 -+ 'ranlib' : None,
4063 - }
4064 -
4065 - if sys.platform[:6] == "darwin":
4066 -@@ -108,12 +111,19 @@
4067 -
4068 - def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
4069 - compiler_so = self.compiler_so
4070 -+ compiler_so_cxx = self.compiler_so_cxx
4071 - if sys.platform == 'darwin':
4072 - compiler_so = _osx_support.compiler_fixup(compiler_so,
4073 - cc_args + extra_postargs)
4074 -+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
4075 -+ cc_args + extra_postargs)
4076 - try:
4077 -- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
4078 -- extra_postargs)
4079 -+ if self.detect_language(src) == 'c++':
4080 -+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
4081 -+ extra_postargs)
4082 -+ else:
4083 -+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
4084 -+ extra_postargs)
4085 - except DistutilsExecError as msg:
4086 - raise CompileError(msg)
4087 -
4088 -@@ -171,22 +181,16 @@
4089 - ld_args.extend(extra_postargs)
4090 - self.mkpath(os.path.dirname(output_filename))
4091 - try:
4092 -- if target_desc == CCompiler.EXECUTABLE:
4093 -- linker = self.linker_exe[:]
4094 -+ if target_lang == "c++":
4095 -+ if target_desc == CCompiler.EXECUTABLE:
4096 -+ linker = self.linker_exe_cxx[:]
4097 -+ else:
4098 -+ linker = self.linker_so_cxx[:]
4099 - else:
4100 -- linker = self.linker_so[:]
4101 -- if target_lang == "c++" and self.compiler_cxx:
4102 -- # skip over environment variable settings if /usr/bin/env
4103 -- # is used to set up the linker's environment.
4104 -- # This is needed on OSX. Note: this assumes that the
4105 -- # normal and C++ compiler have the same environment
4106 -- # settings.
4107 -- i = 0
4108 -- if os.path.basename(linker[0]) == "env":
4109 -- i = 1
4110 -- while '=' in linker[i]:
4111 -- i += 1
4112 -- linker[i] = self.compiler_cxx[i]
4113 -+ if target_desc == CCompiler.EXECUTABLE:
4114 -+ linker = self.linker_exe[:]
4115 -+ else:
4116 -+ linker = self.linker_so[:]
4117 -
4118 - if sys.platform == 'darwin':
4119 - linker = _osx_support.compiler_fixup(linker, ld_args)
4120 ---- Lib/_osx_support.py
4121 -+++ Lib/_osx_support.py
4122 -@@ -14,13 +14,13 @@
4123 - # configuration variables that may contain universal build flags,
4124 - # like "-arch" or "-isdkroot", that may need customization for
4125 - # the user environment
4126 --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
4127 -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
4128 -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
4129 -- 'PY_CORE_CFLAGS')
4130 -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
4131 -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
4132 -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
4133 -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
4134 -
4135 - # configuration variables that may contain compiler calls
4136 --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
4137 -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
4138 -
4139 - # prefix added to original configuration variable names
4140 - _INITPRE = '_OSX_SUPPORT_INITIAL_'
4141 ---- Makefile.pre.in
4142 -+++ Makefile.pre.in
4143 -@@ -496,7 +496,7 @@
4144 - *\ -s*|s*) quiet="-q";; \
4145 - *) quiet="";; \
4146 - esac; \
4147 -- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
4148 -+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \
4149 - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
4150 - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
4151 -
4152
4153 diff --git a/dev-lang/python/files/3.3/22_all_tests_environment.patch b/dev-lang/python/files/3.3/22_all_tests_environment.patch
4154 deleted file mode 100644
4155 index edb3351..0000000
4156 --- a/dev-lang/python/files/3.3/22_all_tests_environment.patch
4157 +++ /dev/null
4158 @@ -1,192 +0,0 @@
4159 -http://bugs.python.org/issue1674555
4160 -
4161 ---- Lib/site.py
4162 -+++ Lib/site.py
4163 -@@ -587,8 +587,9 @@
4164 - known_paths = venv(known_paths)
4165 - if ENABLE_USER_SITE is None:
4166 - ENABLE_USER_SITE = check_enableusersite()
4167 -- known_paths = addusersitepackages(known_paths)
4168 -- known_paths = addsitepackages(known_paths)
4169 -+ if os.environ.get("_PYTHONNOSITEPACKAGES") is None:
4170 -+ known_paths = addusersitepackages(known_paths)
4171 -+ known_paths = addsitepackages(known_paths)
4172 - if sys.platform == 'os2emx':
4173 - setBEGINLIBPATH()
4174 - setquit()
4175 ---- Lib/test/regrtest.py
4176 -+++ Lib/test/regrtest.py
4177 -@@ -188,6 +188,7 @@
4178 - import unittest
4179 - import warnings
4180 - from inspect import isabstract
4181 -+from subprocess import Popen, PIPE
4182 -
4183 - try:
4184 - import threading
4185 -@@ -578,6 +579,62 @@
4186 - support.use_resources = use_resources
4187 - save_modules = sys.modules.keys()
4188 -
4189 -+ opt_args = support.args_from_interpreter_flags()
4190 -+ base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
4191 -+ debug_output_pat = re.compile(r"\[\d+ refs\]$")
4192 -+
4193 -+ def get_args_tuple(test, verbose, quiet, huntrleaks, debug, use_resources,
4194 -+ output_on_failure, failfast, match_tests, timeout):
4195 -+ return (
4196 -+ (test, verbose, quiet),
4197 -+ dict(huntrleaks=huntrleaks, debug=debug,
4198 -+ use_resources=use_resources,
4199 -+ output_on_failure=output_on_failure, failfast=failfast,
4200 -+ match_tests=match_tests, timeout=timeout)
4201 -+ )
4202 -+
4203 -+ def _runtest(test, verbose, quiet, huntrleaks=False, debug=False,
4204 -+ use_resources=None, output_on_failure=False, failfast=False,
4205 -+ match_tests=None, timeout=None):
4206 -+ if test == "test_site":
4207 -+ args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks, debug,
4208 -+ use_resources, output_on_failure,
4209 -+ failfast, match_tests, timeout)
4210 -+ env = os.environ.copy()
4211 -+ try:
4212 -+ del env["_PYTHONNOSITEPACKAGES"]
4213 -+ except KeyError:
4214 -+ pass
4215 -+ popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)],
4216 -+ stdout=PIPE, stderr=PIPE,
4217 -+ universal_newlines=True,
4218 -+ close_fds=(os.name != 'nt'),
4219 -+ env=env)
4220 -+ stdout, stderr = popen.communicate()
4221 -+ retcode = popen.wait()
4222 -+ # Strip last refcount output line if it exists, since it
4223 -+ # comes from the shutdown of the interpreter in the subcommand.
4224 -+ stderr = debug_output_pat.sub("", stderr)
4225 -+ stdout, _, result = stdout.strip().rpartition("\n")
4226 -+ if retcode != 0:
4227 -+ result = (CHILD_ERROR, "Exit code %s" % retcode)
4228 -+ else:
4229 -+ result = json.loads(result)
4230 -+ if stdout:
4231 -+ print(stdout)
4232 -+ if stderr:
4233 -+ print(stderr, file=sys.stderr)
4234 -+ if result[0] == INTERRUPTED:
4235 -+ assert result[1] == 'KeyboardInterrupt'
4236 -+ raise KeyboardInterrupt
4237 -+ return result
4238 -+ else:
4239 -+ return runtest(test, verbose, quiet, huntrleaks=huntrleaks,
4240 -+ debug=debug, use_resources=use_resources,
4241 -+ output_on_failure=output_on_failure,
4242 -+ failfast=failfast, match_tests=match_tests,
4243 -+ timeout=timeout)
4244 -+
4245 - def accumulate_result(test, result):
4246 - ok, test_time = result
4247 - test_times.append((test_time, test))
4248 -@@ -615,12 +672,8 @@
4249 - print("Multiprocess option requires thread support")
4250 - sys.exit(2)
4251 - from queue import Queue
4252 -- from subprocess import Popen, PIPE
4253 -- debug_output_pat = re.compile(r"\[\d+ refs\]$")
4254 - output = Queue()
4255 - pending = MultiprocessTests(tests)
4256 -- opt_args = support.args_from_interpreter_flags()
4257 -- base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
4258 - def work():
4259 - # A worker thread.
4260 - try:
4261 -@@ -630,13 +683,9 @@
4262 - except StopIteration:
4263 - output.put((None, None, None, None))
4264 - return
4265 -- args_tuple = (
4266 -- (test, verbose, quiet),
4267 -- dict(huntrleaks=huntrleaks, use_resources=use_resources,
4268 -- debug=debug, output_on_failure=verbose3,
4269 -- timeout=timeout, failfast=failfast,
4270 -- match_tests=match_tests)
4271 -- )
4272 -+ args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks,
4273 -+ debug, use_resources, verbose3,
4274 -+ failfast, match_tests, timeout)
4275 - # -E is needed by some tests, e.g. test_import
4276 - # Running the child from the same working directory ensures
4277 - # that TEMPDIR for the child is the same when
4278 -@@ -707,14 +756,14 @@
4279 - if trace:
4280 - # If we're tracing code coverage, then we don't exit with status
4281 - # if on a false return value from main.
4282 -- tracer.runctx('runtest(test, verbose, quiet, timeout=timeout)',
4283 -+ tracer.runctx('_runtest(test, verbose, quiet, timeout=timeout)',
4284 - globals=globals(), locals=vars())
4285 - else:
4286 - try:
4287 -- result = runtest(test, verbose, quiet, huntrleaks, debug,
4288 -- output_on_failure=verbose3,
4289 -- timeout=timeout, failfast=failfast,
4290 -- match_tests=match_tests)
4291 -+ result = _runtest(test, verbose, quiet, huntrleaks, debug,
4292 -+ output_on_failure=verbose3,
4293 -+ timeout=timeout, failfast=failfast,
4294 -+ match_tests=match_tests)
4295 - accumulate_result(test, result)
4296 - except KeyboardInterrupt:
4297 - interrupted = True
4298 -@@ -785,7 +834,7 @@
4299 - sys.stdout.flush()
4300 - try:
4301 - verbose = True
4302 -- ok = runtest(test, True, quiet, huntrleaks, debug, timeout=timeout)
4303 -+ ok = _runtest(test, True, quiet, huntrleaks, debug, timeout=timeout)
4304 - except KeyboardInterrupt:
4305 - # print a newline separate from the ^C
4306 - print()
4307 -@@ -1182,8 +1231,9 @@
4308 - for name, get, restore in self.resource_info():
4309 - current = get()
4310 - original = saved_values.pop(name)
4311 -- # Check for changes to the resource's value
4312 -- if current != original:
4313 -+ # Check for changes to the resource's value. test_site is always run
4314 -+ # in a subprocess and is allowed to change os.environ and sys.path.
4315 -+ if current != original and self.testname != "test_site":
4316 - self.changed = True
4317 - restore(original)
4318 - if not self.quiet:
4319 ---- Lib/test/test_site.py
4320 -+++ Lib/test/test_site.py
4321 -@@ -8,6 +8,7 @@
4322 - import test.support
4323 - from test.support import captured_stderr, TESTFN, EnvironmentVarGuard
4324 - import builtins
4325 -+import imp
4326 - import os
4327 - import sys
4328 - import re
4329 -@@ -26,6 +27,10 @@
4330 -
4331 - import site
4332 -
4333 -+if "_PYTHONNOSITEPACKAGES" in os.environ:
4334 -+ del os.environ["_PYTHONNOSITEPACKAGES"]
4335 -+ imp.reload(site)
4336 -+
4337 - if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
4338 - # need to add user site directory for tests
4339 - os.makedirs(site.USER_SITE)
4340 ---- Makefile.pre.in
4341 -+++ Makefile.pre.in
4342 -@@ -883,7 +883,7 @@
4343 - ######################################################################
4344 -
4345 - TESTOPTS= $(EXTRATESTOPTS)
4346 --TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
4347 -+TESTPYTHON= _PYTHONNOSITEPACKAGES=1 $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
4348 - TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
4349 - TESTTIMEOUT= 3600
4350 -
4351
4352 diff --git a/dev-lang/python/files/3.3/23_all_h2py_encoding.patch b/dev-lang/python/files/3.3/23_all_h2py_encoding.patch
4353 deleted file mode 100644
4354 index d594f56..0000000
4355 --- a/dev-lang/python/files/3.3/23_all_h2py_encoding.patch
4356 +++ /dev/null
4357 @@ -1,173 +0,0 @@
4358 -http://bugs.python.org/issue13032
4359 -
4360 ---- Tools/scripts/h2py.py
4361 -+++ Tools/scripts/h2py.py
4362 -@@ -23,36 +23,36 @@
4363 -
4364 - import sys, re, getopt, os
4365 -
4366 --p_define = re.compile('^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
4367 -+p_define = re.compile(b'^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
4368 -
4369 - p_macro = re.compile(
4370 -- '^[\t ]*#[\t ]*define[\t ]+'
4371 -- '([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
4372 -+ b'^[\t ]*#[\t ]*define[\t ]+'
4373 -+ b'([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
4374 -
4375 --p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
4376 -+p_include = re.compile(b'^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
4377 -
4378 --p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
4379 --p_cpp_comment = re.compile('//.*')
4380 -+p_comment = re.compile(br'/\*([^*]+|\*+[^/])*(\*+/)?')
4381 -+p_cpp_comment = re.compile(b'//.*')
4382 -
4383 - ignores = [p_comment, p_cpp_comment]
4384 -
4385 --p_char = re.compile(r"'(\\.[^\\]*|[^\\])'")
4386 -+p_char = re.compile(br"'(\\.[^\\]*|[^\\])'")
4387 -
4388 --p_hex = re.compile(r"0x([0-9a-fA-F]+)L?")
4389 -+p_hex = re.compile(br"0x([0-9a-fA-F]+)L?")
4390 -
4391 - filedict = {}
4392 - importable = {}
4393 -
4394 - try:
4395 -- searchdirs=os.environ['include'].split(';')
4396 -+ searchdirs=os.environb[b'include'].split(b';')
4397 - except KeyError:
4398 - try:
4399 -- searchdirs=os.environ['INCLUDE'].split(';')
4400 -+ searchdirs=os.environb[b'INCLUDE'].split(b';')
4401 - except KeyError:
4402 -- searchdirs=['/usr/include']
4403 -+ searchdirs=[b'/usr/include']
4404 - try:
4405 -- searchdirs.insert(0, os.path.join('/usr/include',
4406 -- os.environ['MULTIARCH']))
4407 -+ searchdirs.insert(0, os.path.join(b'/usr/include',
4408 -+ os.environb[b'MULTIARCH']))
4409 - except KeyError:
4410 - pass
4411 -
4412 -@@ -61,22 +61,23 @@
4413 - opts, args = getopt.getopt(sys.argv[1:], 'i:')
4414 - for o, a in opts:
4415 - if o == '-i':
4416 -- ignores.append(re.compile(a))
4417 -+ ignores.append(re.compile(a.encode()))
4418 - if not args:
4419 - args = ['-']
4420 - for filename in args:
4421 - if filename == '-':
4422 - sys.stdout.write('# Generated by h2py from stdin\n')
4423 -- process(sys.stdin, sys.stdout)
4424 -+ process(sys.stdin.buffer, sys.stdout.buffer)
4425 - else:
4426 -- fp = open(filename, 'r')
4427 -+ filename = filename.encode()
4428 -+ fp = open(filename, 'rb')
4429 - outfile = os.path.basename(filename)
4430 -- i = outfile.rfind('.')
4431 -+ i = outfile.rfind(b'.')
4432 - if i > 0: outfile = outfile[:i]
4433 - modname = outfile.upper()
4434 -- outfile = modname + '.py'
4435 -- outfp = open(outfile, 'w')
4436 -- outfp.write('# Generated by h2py from %s\n' % filename)
4437 -+ outfile = modname + b'.py'
4438 -+ outfp = open(outfile, 'wb')
4439 -+ outfp.write(b'# Generated by h2py from ' + filename + b'\n')
4440 - filedict = {}
4441 - for dir in searchdirs:
4442 - if filename[:len(dir)] == dir:
4443 -@@ -90,9 +91,9 @@
4444 - def pytify(body):
4445 - # replace ignored patterns by spaces
4446 - for p in ignores:
4447 -- body = p.sub(' ', body)
4448 -+ body = p.sub(b' ', body)
4449 - # replace char literals by ord(...)
4450 -- body = p_char.sub("ord('\\1')", body)
4451 -+ body = p_char.sub(b"ord('\\1')", body)
4452 - # Compute negative hexadecimal constants
4453 - start = 0
4454 - UMAX = 2*(sys.maxsize+1)
4455 -@@ -103,7 +104,7 @@
4456 - val = int(body[slice(*m.span(1))], 16)
4457 - if val > sys.maxsize:
4458 - val -= UMAX
4459 -- body = body[:s] + "(" + str(val) + ")" + body[e:]
4460 -+ body = body[:s] + b"(" + str(val).encode() + b")" + body[e:]
4461 - start = s + 1
4462 - return body
4463 -
4464 -@@ -116,7 +117,7 @@
4465 - match = p_define.match(line)
4466 - if match:
4467 - # gobble up continuation lines
4468 -- while line[-2:] == '\\\n':
4469 -+ while line[-2:] == b'\\\n':
4470 - nextline = fp.readline()
4471 - if not nextline: break
4472 - lineno = lineno + 1
4473 -@@ -125,11 +126,11 @@
4474 - body = line[match.end():]
4475 - body = pytify(body)
4476 - ok = 0
4477 -- stmt = '%s = %s\n' % (name, body.strip())
4478 -+ stmt = name + b' = ' + body.strip() + b'\n'
4479 - try:
4480 - exec(stmt, env)
4481 - except:
4482 -- sys.stderr.write('Skipping: %s' % stmt)
4483 -+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
4484 - else:
4485 - outfp.write(stmt)
4486 - match = p_macro.match(line)
4487 -@@ -137,11 +138,11 @@
4488 - macro, arg = match.group(1, 2)
4489 - body = line[match.end():]
4490 - body = pytify(body)
4491 -- stmt = 'def %s(%s): return %s\n' % (macro, arg, body)
4492 -+ stmt = b'def ' + macro + b'(' + arg + b'): return ' + body + b'\n'
4493 - try:
4494 - exec(stmt, env)
4495 - except:
4496 -- sys.stderr.write('Skipping: %s' % stmt)
4497 -+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
4498 - else:
4499 - outfp.write(stmt)
4500 - match = p_include.match(line)
4501 -@@ -150,23 +151,24 @@
4502 - a, b = regs[1]
4503 - filename = line[a:b]
4504 - if filename in importable:
4505 -- outfp.write('from %s import *\n' % importable[filename])
4506 -+ outfp.write(b'from ' + importable[filename] + b' import *\n')
4507 - elif filename not in filedict:
4508 - filedict[filename] = None
4509 - inclfp = None
4510 - for dir in searchdirs:
4511 - try:
4512 -- inclfp = open(dir + '/' + filename)
4513 -+ inclfp = open(dir + b'/' + filename, 'rb')
4514 - break
4515 - except IOError:
4516 - pass
4517 - if inclfp:
4518 - outfp.write(
4519 -- '\n# Included from %s\n' % filename)
4520 -+ b'\n# Included from ' + filename + b'\n')
4521 - process(inclfp, outfp, env)
4522 -+ inclfp.close()
4523 - else:
4524 -- sys.stderr.write('Warning - could not find file %s\n' %
4525 -- filename)
4526 -+ sys.stderr.buffer.write(b'Warning - could not find file ' +
4527 -+ filename + b'\n')
4528 -
4529 - if __name__ == '__main__':
4530 - main()
4531
4532 diff --git a/dev-lang/python/files/3.3/24_all_sqlite-3.8.4.patch b/dev-lang/python/files/3.3/24_all_sqlite-3.8.4.patch
4533 deleted file mode 100644
4534 index d6af2eb..0000000
4535 --- a/dev-lang/python/files/3.3/24_all_sqlite-3.8.4.patch
4536 +++ /dev/null
4537 @@ -1,14 +0,0 @@
4538 -http://bugs.python.org/issue20901
4539 -http://hg.python.org/cpython/rev/dbc9e3ed5e9f
4540 -
4541 ---- Lib/sqlite3/test/hooks.py
4542 -+++ Lib/sqlite3/test/hooks.py
4543 -@@ -162,7 +162,7 @@
4544 - create table bar (a, b)
4545 - """)
4546 - second_count = len(progress_calls)
4547 -- self.assertGreater(first_count, second_count)
4548 -+ self.assertGreaterEqual(first_count, second_count)
4549 -
4550 - def CheckCancelOperation(self):
4551 - """
4552
4553 diff --git a/dev-lang/python/files/3.3/61_all_process_data.patch b/dev-lang/python/files/3.3/61_all_process_data.patch
4554 deleted file mode 100644
4555 index b7738c7..0000000
4556 --- a/dev-lang/python/files/3.3/61_all_process_data.patch
4557 +++ /dev/null
4558 @@ -1,166 +0,0 @@
4559 -GENTOO_PYTHON_PROCESS_NAME environmental variable is set by python-wrapper and wrapper scripts generated by
4560 -python_generate_wrapper_scripts() and specifies process name.
4561 -GENTOO_PYTHON_WRAPPER_SCRIPT_PATH environmental variable is set by wrapper scripts generated by
4562 -python_generate_wrapper_scripts() and specifies sys.argv[0] in target executables.
4563 -GENTOO_PYTHON_TARGET_SCRIPT_PATH environmental variable is set by wrapper scripts generated by
4564 -python_generate_wrapper_scripts() and specifies paths to actually executed scripts.
4565 -GENTOO_PYTHON_TARGET_SCRIPT_PATH_VERIFICATION environmental variable is used by wrapper scripts generated by
4566 -python_generate_wrapper_scripts() to check if Python supports GENTOO_PYTHON_TARGET_SCRIPT_PATH environmental variable.
4567 -
4568 ---- Modules/main.c
4569 -+++ Modules/main.c
4570 -@@ -331,6 +331,7 @@
4571 - int version = 0;
4572 - int saw_unbuffered_flag = 0;
4573 - PyCompilerFlags cf;
4574 -+ char *target_script_name = getenv("GENTOO_PYTHON_TARGET_SCRIPT_PATH");
4575 -
4576 - cf.cf_flags = 0;
4577 -
4578 -@@ -551,7 +552,17 @@
4579 - filename = argv[_PyOS_optind];
4580 -
4581 - #else
4582 -- filename = argv[_PyOS_optind];
4583 -+ if (target_script_name != NULL && *target_script_name != '\0') {
4584 -+ size_t length = strlen(target_script_name);
4585 -+ wchar_t *wcs_target_script_name = (wchar_t *) calloc(length + 1, sizeof(wchar_t));
4586 -+ char *old_locale = setlocale(LC_CTYPE, NULL);
4587 -+ setlocale(LC_CTYPE, "");
4588 -+ if (mbstowcs(wcs_target_script_name, target_script_name, length) >= 0)
4589 -+ filename = wcs_target_script_name;
4590 -+ setlocale(LC_CTYPE, old_locale);
4591 -+ }
4592 -+ if (filename == NULL)
4593 -+ filename = argv[_PyOS_optind];
4594 - #endif
4595 - }
4596 -
4597 ---- Modules/posixmodule.c
4598 -+++ Modules/posixmodule.c
4599 -@@ -1157,6 +1157,10 @@
4600 - char *p = strchr(*e, '=');
4601 - if (p == NULL)
4602 - continue;
4603 -+ if ((strlen("GENTOO_PYTHON_PROCESS_NAME") == (int)(p-*e) && strncmp("GENTOO_PYTHON_PROCESS_NAME", *e, (int)(p-*e)) == 0) ||
4604 -+ (strlen("GENTOO_PYTHON_TARGET_SCRIPT_PATH") == (int)(p-*e) && strncmp("GENTOO_PYTHON_TARGET_SCRIPT_PATH", *e, (int)(p-*e)) == 0) ||
4605 -+ (strlen("GENTOO_PYTHON_WRAPPER_SCRIPT_PATH") == (int)(p-*e) && strncmp("GENTOO_PYTHON_WRAPPER_SCRIPT_PATH", *e, (int)(p-*e)) == 0))
4606 -+ continue;
4607 - k = PyBytes_FromStringAndSize(*e, (int)(p-*e));
4608 - if (k == NULL) {
4609 - PyErr_Clear();
4610 ---- Modules/python.c
4611 -+++ Modules/python.c
4612 -@@ -7,6 +7,14 @@
4613 - #include <floatingpoint.h>
4614 - #endif
4615 -
4616 -+#ifdef __linux__
4617 -+#include <linux/prctl.h>
4618 -+#include <sys/prctl.h>
4619 -+#ifndef PR_SET_NAME
4620 -+#define PR_SET_NAME 15
4621 -+#endif
4622 -+#endif
4623 -+
4624 - #ifdef MS_WINDOWS
4625 - int
4626 - wmain(int argc, wchar_t **argv)
4627 -@@ -18,6 +26,11 @@
4628 - int
4629 - main(int argc, char **argv)
4630 - {
4631 -+ if (getenv("GENTOO_PYTHON_TARGET_SCRIPT_PATH_VERIFICATION")) {
4632 -+ printf("GENTOO_PYTHON_TARGET_SCRIPT_PATH supported\n");
4633 -+ return 0;
4634 -+ }
4635 -+
4636 - wchar_t **argv_copy;
4637 - /* We need a second copy, as Python might modify the first one. */
4638 - wchar_t **argv_copy2;
4639 -@@ -59,6 +72,16 @@
4640 -
4641 - setlocale(LC_ALL, oldloc);
4642 - free(oldloc);
4643 -+
4644 -+#ifdef __linux__
4645 -+ char *process_name = getenv("GENTOO_PYTHON_PROCESS_NAME");
4646 -+#ifdef HAVE_UNSETENV
4647 -+ unsetenv("GENTOO_PYTHON_PROCESS_NAME");
4648 -+#endif
4649 -+ if (process_name != NULL && *process_name != '\0')
4650 -+ prctl(PR_SET_NAME, process_name);
4651 -+#endif
4652 -+
4653 - res = Py_Main(argc, argv_copy);
4654 - for (i = 0; i < argc; i++) {
4655 - PyMem_Free(argv_copy2[i]);
4656 ---- Python/sysmodule.c
4657 -+++ Python/sysmodule.c
4658 -@@ -1778,6 +1778,10 @@
4659 - makeargvobject(int argc, wchar_t **argv)
4660 - {
4661 - PyObject *av;
4662 -+ char *wrapper_script_name = getenv("GENTOO_PYTHON_WRAPPER_SCRIPT_PATH");
4663 -+#ifdef HAVE_UNSETENV
4664 -+ unsetenv("GENTOO_PYTHON_WRAPPER_SCRIPT_PATH");
4665 -+#endif
4666 - if (argc <= 0 || argv == NULL) {
4667 - /* Ensure at least one (empty) argument is seen */
4668 - static wchar_t *empty_argv[1] = {L""};
4669 -@@ -1802,7 +1806,16 @@
4670 - } else
4671 - v = PyUnicode_FromString(argv[i]);
4672 - #else
4673 -- PyObject *v = PyUnicode_FromWideChar(argv[i], -1);
4674 -+ PyObject *v = NULL;
4675 -+ if (i == 0 && wrapper_script_name != NULL && *wrapper_script_name != '\0') {
4676 -+ size_t length = strlen(wrapper_script_name);
4677 -+ wchar_t *wcs_wrapper_script_name = (wchar_t *) calloc(length + 1, sizeof(wchar_t));
4678 -+ if (mbstowcs(wcs_wrapper_script_name, wrapper_script_name, length) >= 0)
4679 -+ v = PyUnicode_FromWideChar(wcs_wrapper_script_name, -1);
4680 -+ free(wcs_wrapper_script_name);
4681 -+ }
4682 -+ if (v == NULL)
4683 -+ v = PyUnicode_FromWideChar(argv[i], -1);
4684 - #endif
4685 - if (v == NULL) {
4686 - Py_DECREF(av);
4687 -@@ -1822,7 +1835,12 @@
4688 - static void
4689 - sys_update_path(int argc, wchar_t **argv)
4690 - {
4691 -- wchar_t *argv0;
4692 -+ char *target_script_name = getenv("GENTOO_PYTHON_TARGET_SCRIPT_PATH");
4693 -+#ifdef HAVE_UNSETENV
4694 -+ unsetenv("GENTOO_PYTHON_TARGET_SCRIPT_PATH");
4695 -+#endif
4696 -+ wchar_t *wcs_target_script_name = NULL;
4697 -+ wchar_t *argv0 = NULL;
4698 - wchar_t *p = NULL;
4699 - Py_ssize_t n = 0;
4700 - PyObject *a;
4701 -@@ -1842,7 +1860,14 @@
4702 - if (path == NULL)
4703 - return;
4704 -
4705 -- argv0 = argv[0];
4706 -+ if (target_script_name != NULL && *target_script_name != '\0') {
4707 -+ size_t length = strlen(target_script_name);
4708 -+ wcs_target_script_name = (wchar_t *) calloc(length + 1, sizeof(wchar_t));
4709 -+ if (mbstowcs(wcs_target_script_name, target_script_name, length) >= 0)
4710 -+ argv0 = wcs_target_script_name;
4711 -+ }
4712 -+ if (argv0 == NULL)
4713 -+ argv0 = argv[0];
4714 -
4715 - #ifdef HAVE_READLINK
4716 - if (_HAVE_SCRIPT_ARGUMENT(argc, argv))
4717 -@@ -1919,6 +1944,7 @@
4718 - if (PyList_Insert(path, 0, a) < 0)
4719 - Py_FatalError("sys.path.insert(0) failed");
4720 - Py_DECREF(a);
4721 -+ free(wcs_target_script_name);
4722 - }
4723 -
4724 - void
4725
4726 diff --git a/dev-lang/python/files/python-3.3-CVE-2014-4616.patch b/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
4727 deleted file mode 100644
4728 index c67b2e5..0000000
4729 --- a/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
4730 +++ /dev/null
4731 @@ -1,52 +0,0 @@
4732 -# HG changeset patch
4733 -# User Benjamin Peterson <benjamin@××××××.org>
4734 -# Date 1397441438 14400
4735 -# Node ID 50c07ed1743da9cd4540d83de0c30bd17aeb41b0
4736 -# Parent 218e28a935ab4494d05215c243e2129625a71893
4737 -in scan_once, prevent the reading of arbitrary memory when passed a negative index
4738 -
4739 -Bug reported by Guido Vranken.
4740 -
4741 -Index: Python-3.3.5/Lib/json/tests/test_decode.py
4742 -===================================================================
4743 ---- Python-3.3.5.orig/Lib/test/test_json/test_decode.py 2014-06-26 18:40:10.825269130 +0200
4744 -+++ Python-3.3.5/Lib/test/test_json/test_decode.py 2014-06-26 18:40:21.962323035 +0200
4745 -@@ -60,5 +60,10 @@
4746 - msg = 'escape'
4747 - self.assertRaisesRegexp(ValueError, msg, self.loads, s)
4748 -
4749 -+ def test_negative_index(self):
4750 -+ d = self.json.JSONDecoder()
4751 -+ self.assertRaises(ValueError, d.raw_decode, 'a'*42, -50000)
4752 -+ self.assertRaises(ValueError, d.raw_decode, u'a'*42, -50000)
4753 -+
4754 - class TestPyDecode(TestDecode, PyTest): pass
4755 - class TestCDecode(TestDecode, CTest): pass
4756 -Index: Python-3.3.5/Misc/ACKS
4757 -===================================================================
4758 ---- Python-3.3.5.orig/Misc/ACKS 2014-06-26 18:40:10.826269135 +0200
4759 -+++ Python-3.3.5/Misc/ACKS 2014-06-26 18:40:21.962323035 +0200
4760 -@@ -1085,6 +1085,7 @@
4761 - Frank Visser
4762 - Johannes Vogel
4763 - Alex Volkov
4764 -+Guido Vranken
4765 - Martijn Vries
4766 - Niki W. Waibel
4767 - Wojtek Walczak
4768 -Index: Python-3.3.5/Modules/_json.c
4769 -===================================================================
4770 ---- a/Modules/_json.c
4771 -+++ b/Modules/_json.c
4772 -@@ -975,7 +975,10 @@ scan_once_unicode(PyScannerObject *s, Py
4773 - kind = PyUnicode_KIND(pystr);
4774 - length = PyUnicode_GET_LENGTH(pystr);
4775 -
4776 -- if (idx >= length) {
4777 -+ if (idx < 0)
4778 -+ /* Compatibility with Python version. */
4779 -+ idx += length;
4780 -+ if (idx < 0 || idx >= length) {
4781 - PyErr_SetNone(PyExc_StopIteration);
4782 - return NULL;
4783 - }
4784
4785 diff --git a/dev-lang/python/files/python-3.3-libressl.patch b/dev-lang/python/files/python-3.3-libressl.patch
4786 deleted file mode 100644
4787 index 816704e..0000000
4788 --- a/dev-lang/python/files/python-3.3-libressl.patch
4789 +++ /dev/null
4790 @@ -1,127 +0,0 @@
4791 -From eed8d3b553e00e04c1f97c87ea02723630fb15a4 Mon Sep 17 00:00:00 2001
4792 -From: hasufell <hasufell@g.o>
4793 -Date: Sun, 20 Sep 2015 14:25:43 +0200
4794 -Subject: [PATCH] Backport upstream libressl patches to python-3.3
4795 -
4796 -https://hg.python.org/cpython/raw-rev/7f82f50fdad0
4797 -https://hg.python.org/cpython/raw-rev/4dac45f88d45
4798 ----
4799 - Lib/ssl.py | 7 ++++++-
4800 - Lib/test/test_ssl.py | 21 +++++++++++++--------
4801 - Modules/_ssl.c | 4 ++++
4802 - configure | 42 ++++++++++++++++++++++++++++++++++++++++++
4803 - configure.ac | 3 +++
4804 - pyconfig.h.in | 3 +++
4805 - 6 files changed, 71 insertions(+), 9 deletions(-)
4806 -
4807 -diff --git a/Lib/ssl.py b/Lib/ssl.py
4808 -index cd8d6b4..445ae87 100644
4809 ---- a/Lib/ssl.py
4810 -+++ b/Lib/ssl.py
4811 -@@ -78,7 +78,12 @@ try:
4812 - from _ssl import OP_SINGLE_ECDH_USE
4813 - except ImportError:
4814 - pass
4815 --from _ssl import RAND_status, RAND_egd, RAND_add, RAND_bytes, RAND_pseudo_bytes
4816 -+from _ssl import RAND_status, RAND_add, RAND_bytes, RAND_pseudo_bytes
4817 -+try:
4818 -+ from _ssl import RAND_egd
4819 -+except ImportError:
4820 -+ # LibreSSL does not provide RAND_egd
4821 -+ pass
4822 - from _ssl import (
4823 - SSL_ERROR_ZERO_RETURN,
4824 - SSL_ERROR_WANT_READ,
4825 -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
4826 -index 9fc6027..879f791 100644
4827 ---- a/Lib/test/test_ssl.py
4828 -+++ b/Lib/test/test_ssl.py
4829 -@@ -130,8 +130,9 @@ class BasicSocketTests(unittest.TestCase):
4830 - self.assertRaises(ValueError, ssl.RAND_bytes, -5)
4831 - self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
4832 -
4833 -- self.assertRaises(TypeError, ssl.RAND_egd, 1)
4834 -- self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
4835 -+ if hasattr(ssl, 'RAND_egd'):
4836 -+ self.assertRaises(TypeError, ssl.RAND_egd, 1)
4837 -+ self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
4838 - ssl.RAND_add("this is a random string", 75.0)
4839 -
4840 - @unittest.skipUnless(os.name == 'posix', 'requires posix')
4841 -@@ -250,11 +251,11 @@ class BasicSocketTests(unittest.TestCase):
4842 - # Some sanity checks follow
4843 - # >= 0.9
4844 - self.assertGreaterEqual(n, 0x900000)
4845 -- # < 2.0
4846 -- self.assertLess(n, 0x20000000)
4847 -+ # < 3.0
4848 -+ self.assertLess(n, 0x30000000)
4849 - major, minor, fix, patch, status = t
4850 - self.assertGreaterEqual(major, 0)
4851 -- self.assertLess(major, 2)
4852 -+ self.assertLess(major, 3)
4853 - self.assertGreaterEqual(minor, 0)
4854 - self.assertLess(minor, 256)
4855 - self.assertGreaterEqual(fix, 0)
4856 -@@ -263,9 +264,13 @@ class BasicSocketTests(unittest.TestCase):
4857 - self.assertLessEqual(patch, 26)
4858 - self.assertGreaterEqual(status, 0)
4859 - self.assertLessEqual(status, 15)
4860 -- # Version string as returned by OpenSSL, the format might change
4861 -- self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
4862 -- (s, t))
4863 -+ # Version string as returned by {Open,Libre}SSL, the format might change
4864 -+ if "LibreSSL" in s:
4865 -+ self.assertTrue(s.startswith("LibreSSL {:d}.{:d}".format(major, minor)),
4866 -+ (s, t))
4867 -+ else:
4868 -+ self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
4869 -+ (s, t))
4870 -
4871 - @support.cpython_only
4872 - def test_refcycle(self):
4873 -diff --git a/Modules/_ssl.c b/Modules/_ssl.c
4874 -index 499e8ba..cb151ba 100644
4875 ---- a/Modules/_ssl.c
4876 -+++ b/Modules/_ssl.c
4877 -@@ -2559,6 +2559,7 @@ Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n\
4878 - It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
4879 - using the ssl() function.");
4880 -
4881 -+#ifdef HAVE_RAND_EGD
4882 - static PyObject *
4883 - PySSL_RAND_egd(PyObject *self, PyObject *args)
4884 - {
4885 -@@ -2586,6 +2587,7 @@ PyDoc_STRVAR(PySSL_RAND_egd_doc,
4886 - Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
4887 - Returns number of bytes read. Raises SSLError if connection to EGD\n\
4888 - fails or if it does not provide enough data to seed PRNG.");
4889 -+#endif /* HAVE_RAND_EGD */
4890 -
4891 - #endif /* HAVE_OPENSSL_RAND */
4892 -
4893 -@@ -2604,8 +2606,10 @@ static PyMethodDef PySSL_methods[] = {
4894 - PySSL_RAND_bytes_doc},
4895 - {"RAND_pseudo_bytes", PySSL_RAND_pseudo_bytes, METH_VARARGS,
4896 - PySSL_RAND_pseudo_bytes_doc},
4897 -+#ifdef HAVE_RAND_EGD
4898 - {"RAND_egd", PySSL_RAND_egd, METH_VARARGS,
4899 - PySSL_RAND_egd_doc},
4900 -+#endif
4901 - {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS,
4902 - PySSL_RAND_status_doc},
4903 - #endif
4904 -diff --git a/configure.ac b/configure.ac
4905 -index 6a64bff..90f315a 100644
4906 ---- a/configure.ac
4907 -+++ b/configure.ac
4908 -@@ -2181,6 +2181,9 @@ AC_MSG_RESULT($SHLIBS)
4909 - AC_CHECK_LIB(sendfile, sendfile)
4910 - AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
4911 - AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
4912 -+AC_CHECK_LIB(crypto, RAND_egd,
4913 -+ AC_DEFINE(HAVE_RAND_EGD, 1,
4914 -+ [Define if the libcrypto has RAND_egd]))
4915 -
4916 - # only check for sem_init if thread support is requested
4917 - if test "$with_threads" = "yes" -o -z "$with_threads"; then
4918
4919 diff --git a/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch b/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
4920 deleted file mode 100644
4921 index d963b9e..0000000
4922 --- a/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
4923 +++ /dev/null
4924 @@ -1,40 +0,0 @@
4925 -do not hardcode /usr/include paths
4926 -
4927 ---- a/configure.ac
4928 -+++ b/configure.ac
4929 -@@ -668,6 +668,8 @@ AC_ARG_WITH(cxx_main,
4930 - ])
4931 - AC_MSG_RESULT($with_cxx_main)
4932 -
4933 -+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
4934 -+
4935 - preset_cxx="$CXX"
4936 - if test -z "$CXX"
4937 - then
4938 -@@ -1513,7 +1515,7 @@ dnl AC_MSG_RESULT($cpp_type)
4939 - # checks for header files
4940 - AC_HEADER_STDC
4941 - ac_save_cppflags="$CPPFLAGS"
4942 --CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
4943 -+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
4944 - AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
4945 - fcntl.h grp.h \
4946 - ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
4947 -@@ -2225,8 +2227,6 @@ LIBS="$withval $LIBS"
4948 - ],
4949 - [AC_MSG_RESULT(no)])
4950 -
4951 --AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
4952 --
4953 - # Check for use of the system expat library
4954 - AC_MSG_CHECKING(for --with-system-expat)
4955 - AC_ARG_WITH(system_expat,
4956 -@@ -4273,7 +4273,7 @@ then
4957 - fi
4958 -
4959 - ac_save_cppflags="$CPPFLAGS"
4960 --CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
4961 -+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
4962 - # On HP/UX 11.0, mvwdelch is a block with a return statement
4963 - AC_MSG_CHECKING(whether mvwdelch is an expression)
4964 - AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
4965
4966 diff --git a/dev-lang/python/files/python-3.4-gcc-5.patch b/dev-lang/python/files/python-3.4-gcc-5.patch
4967 deleted file mode 100644
4968 index 80afbd1..0000000
4969 --- a/dev-lang/python/files/python-3.4-gcc-5.patch
4970 +++ /dev/null
4971 @@ -1,37 +0,0 @@
4972 -changeset: 94583:689092296ad3
4973 -branch: 3.4
4974 -parent: 94579:645f3d750be1
4975 -user: Victor Stinner <victor.stinner@×××××.com>
4976 -date: Wed Feb 11 14:23:35 2015 +0100
4977 -summary: Issue #23433: Fix faulthandler._stack_overflow()
4978 -
4979 -diff -r 645f3d750be1 -r 689092296ad3 Modules/faulthandler.c
4980 ---- a/Modules/faulthandler.c Tue Feb 10 14:49:32 2015 +0100
4981 -+++ b/Modules/faulthandler.c Wed Feb 11 14:23:35 2015 +0100
4982 -@@ -911,12 +911,12 @@
4983 - }
4984 -
4985 - #if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION)
4986 --static void*
4987 --stack_overflow(void *min_sp, void *max_sp, size_t *depth)
4988 -+static Py_uintptr_t
4989 -+stack_overflow(Py_uintptr_t min_sp, Py_uintptr_t max_sp, size_t *depth)
4990 - {
4991 - /* allocate 4096 bytes on the stack at each call */
4992 - unsigned char buffer[4096];
4993 -- void *sp = &buffer;
4994 -+ Py_uintptr_t sp = (Py_uintptr_t)&buffer;
4995 - *depth += 1;
4996 - if (sp < min_sp || max_sp < sp)
4997 - return sp;
4998 -@@ -929,7 +929,8 @@
4999 - faulthandler_stack_overflow(PyObject *self)
5000 - {
5001 - size_t depth, size;
5002 -- char *sp = (char *)&depth, *stop;
5003 -+ Py_uintptr_t sp = (Py_uintptr_t)&depth;
5004 -+ Py_uintptr_t stop;
5005 -
5006 - depth = 0;
5007 - stop = stack_overflow(sp - STACK_OVERFLOW_MAX_SIZE,
5008 -
5009
5010 diff --git a/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch b/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch
5011 deleted file mode 100644
5012 index 8bfad11..0000000
5013 --- a/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch
5014 +++ /dev/null
5015 @@ -1,13 +0,0 @@
5016 -do not hardcode /usr/include paths
5017 -
5018 ---- a/configure.ac
5019 -+++ b/configure.ac
5020 -@@ -4402,7 +4402,7 @@ fi
5021 -
5022 - # first curses header check
5023 - ac_save_cppflags="$CPPFLAGS"
5024 --CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
5025 -+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
5026 -
5027 - AC_CHECK_HEADERS(curses.h ncurses.h)
5028 -
5029
5030 diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
5031 index 6a4ebd8..dfcbe08 100644
5032 --- a/dev-lang/python/metadata.xml
5033 +++ b/dev-lang/python/metadata.xml
5034 @@ -7,7 +7,6 @@
5035 </maintainer>
5036 <use>
5037 <flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
5038 - <flag name="wide-unicode">Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
5039 <flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag>
5040 </use>
5041 </pkgmetadata>
5042
5043 diff --git a/dev-lang/python/python-2.6.9.ebuild b/dev-lang/python/python-2.6.9.ebuild
5044 deleted file mode 100644
5045 index 4fab57d..0000000
5046 --- a/dev-lang/python/python-2.6.9.ebuild
5047 +++ /dev/null
5048 @@ -1,340 +0,0 @@
5049 -# Copyright 1999-2015 Gentoo Foundation
5050 -# Distributed under the terms of the GNU General Public License v2
5051 -# $Id$
5052 -
5053 -EAPI="5"
5054 -WANT_AUTOMAKE="none"
5055 -WANT_LIBTOOL="none"
5056 -
5057 -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
5058 -
5059 -MY_P="Python-${PV}"
5060 -
5061 -DESCRIPTION="An interpreted, interactive, object-oriented programming language"
5062 -HOMEPAGE="http://www.python.org/"
5063 -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz"
5064 -
5065 -LICENSE="PSF-2"
5066 -SLOT="2.6"
5067 -KEYWORDS=""
5068 -IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
5069 -
5070 -# Do not add a dependency on dev-lang/python to this ebuild.
5071 -# If you need to apply a patch which requires python for bootstrapping, please
5072 -# run the bootstrap code on your dev box and include the results in the
5073 -# patchset. See bug 447752.
5074 -
5075 -RDEPEND="app-arch/bzip2
5076 - >=sys-libs/zlib-1.1.3
5077 - virtual/libffi
5078 - virtual/libintl
5079 - !build? (
5080 - berkdb? ( || (
5081 - sys-libs/db:4.7
5082 - sys-libs/db:4.6
5083 - sys-libs/db:4.5
5084 - sys-libs/db:4.4
5085 - sys-libs/db:4.3
5086 - sys-libs/db:4.2
5087 - ) )
5088 - gdbm? ( sys-libs/gdbm[berkdb] )
5089 - ncurses? (
5090 - >=sys-libs/ncurses-5.2
5091 - readline? ( >=sys-libs/readline-4.1 )
5092 - )
5093 - sqlite? ( >=dev-db/sqlite-3.3.3:3 )
5094 - ssl? ( dev-libs/openssl )
5095 - tk? (
5096 - >=dev-lang/tk-8.0
5097 - dev-tcltk/blt
5098 - )
5099 - xml? ( >=dev-libs/expat-2.1 )
5100 - )
5101 - !!<sys-apps/portage-2.1.9"
5102 -DEPEND="${RDEPEND}
5103 - virtual/pkgconfig
5104 - >=sys-devel/autoconf-2.61
5105 - !sys-devel/gcc[libffi]"
5106 -RDEPEND+=" !build? ( app-misc/mime-types )
5107 - doc? ( dev-python/python-docs:${SLOT} )"
5108 -
5109 -S="${WORKDIR}/${MY_P}"
5110 -
5111 -pkg_setup() {
5112 - if use berkdb; then
5113 - ewarn "'bsddb' module is out-of-date and no longer maintained inside"
5114 - ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
5115 - ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
5116 - ewarn "is provided by dev-python/bsddb3."
5117 - else
5118 - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
5119 - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
5120 - ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
5121 - ewarn "You might need to migrate your databases."
5122 - fi
5123 - fi
5124 -}
5125 -
5126 -src_prepare() {
5127 - # Ensure that internal copies of expat, libffi and zlib are not used.
5128 - rm -r Modules/expat || die
5129 - rm -r Modules/_ctypes/libffi* || die
5130 - rm -r Modules/zlib || die
5131 -
5132 - local excluded_patches
5133 - if ! tc-is-cross-compiler; then
5134 - excluded_patches="*_all_crosscompile.patch"
5135 - fi
5136 -
5137 - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
5138 - epatch "${FILESDIR}/${SLOT}"
5139 -
5140 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
5141 - Lib/distutils/command/install.py \
5142 - Lib/distutils/sysconfig.py \
5143 - Lib/site.py \
5144 - Makefile.pre.in \
5145 - Modules/Setup.dist \
5146 - Modules/getpath.c \
5147 - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
5148 -
5149 - epatch_user
5150 -
5151 - eautoconf
5152 - eautoheader
5153 -}
5154 -
5155 -src_configure() {
5156 - if use build; then
5157 - # Disable extraneous modules with extra dependencies.
5158 - export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
5159 - export PYTHON_DISABLE_SSL="1"
5160 - else
5161 - # dbm module can be linked against berkdb or gdbm.
5162 - # Defaults to gdbm when both are enabled, #204343.
5163 - local disable
5164 - use berkdb || use gdbm || disable+=" dbm"
5165 - use berkdb || disable+=" _bsddb"
5166 - use gdbm || disable+=" gdbm"
5167 - use ncurses || disable+=" _curses _curses_panel"
5168 - use readline || disable+=" readline"
5169 - use sqlite || disable+=" _sqlite3"
5170 - use ssl || export PYTHON_DISABLE_SSL="1"
5171 - use tk || disable+=" _tkinter"
5172 - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
5173 - export PYTHON_DISABLE_MODULES="${disable}"
5174 -
5175 - if ! use xml; then
5176 - ewarn "You have configured Python without XML support."
5177 - ewarn "This is NOT a recommended configuration as you"
5178 - ewarn "may face problems parsing any XML documents."
5179 - fi
5180 - fi
5181 -
5182 - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
5183 - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
5184 - fi
5185 -
5186 - if [[ "$(gcc-major-version)" -ge 4 ]]; then
5187 - append-flags -fwrapv
5188 - fi
5189 -
5190 - filter-flags -malign-double
5191 -
5192 - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
5193 -
5194 - # https://bugs.gentoo.org/show_bug.cgi?id=50309
5195 - if is-flagq -O3; then
5196 - is-flagq -fstack-protector-all && replace-flags -O3 -O2
5197 - use hardened && replace-flags -O3 -O2
5198 - fi
5199 -
5200 - # Run the configure scripts in parallel.
5201 - multijob_init
5202 -
5203 - mkdir -p "${WORKDIR}"/{${CBUILD},${CHOST}} || die
5204 -
5205 - if tc-is-cross-compiler; then
5206 - (
5207 - multijob_child_init
5208 - cd "${WORKDIR}"/${CBUILD} >/dev/null || die
5209 - OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \
5210 - "${S}"/configure \
5211 - --{build,host}=${CBUILD} \
5212 - || die "cross-configure failed"
5213 - ) &
5214 - multijob_post_fork
5215 - fi
5216 -
5217 - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
5218 - tc-export CXX
5219 - # The configure script fails to use pkg-config correctly.
5220 - # http://bugs.python.org/issue15506
5221 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
5222 -
5223 - # Set LDFLAGS so we link modules with -lpython2.6 correctly.
5224 - # Needed on FreeBSD unless Python 2.6 is already installed.
5225 - # Please query BSD team before removing this!
5226 - append-ldflags "-L."
5227 -
5228 - cd "${WORKDIR}"/${CHOST} || die
5229 - ECONF_SOURCE=${S} OPT="" \
5230 - econf \
5231 - --with-fpectl \
5232 - --enable-shared \
5233 - $(use_enable ipv6) \
5234 - $(use_with threads) \
5235 - $(usex wide-unicode "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2" "") \
5236 - --infodir='${prefix}/share/info' \
5237 - --mandir='${prefix}/share/man' \
5238 - --with-libc="" \
5239 - --with-system-ffi
5240 -
5241 - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
5242 - eerror "configure has detected that the sem_open function is broken."
5243 - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
5244 - die "Broken sem_open function (bug 496328)"
5245 - fi
5246 -
5247 - if tc-is-cross-compiler; then
5248 - # Modify the Makefile.pre so we don't regen for the host/ one.
5249 - # We need to link the host python programs into $PWD and run
5250 - # them from here because the distutils sysconfig module will
5251 - # parse Makefile/etc... from argv[0], and we need it to pick
5252 - # up the target settings, not the host ones.
5253 - sed -i \
5254 - -e '1iHOSTPYTHONPATH = ./hostpythonpath:' \
5255 - -e '/^HOSTPYTHON/s:=.*:= ./hostpython:' \
5256 - -e '/^HOSTPGEN/s:=.*:= ./Parser/hostpgen:' \
5257 - Makefile{.pre,} || die "sed failed"
5258 - fi
5259 -
5260 - multijob_finish
5261 -}
5262 -
5263 -src_compile() {
5264 - if tc-is-cross-compiler; then
5265 - cd "${WORKDIR}"/${CBUILD}
5266 - # Disable as many modules as possible -- but we need a few to install.
5267 - PYTHON_DISABLE_MODULES=$(
5268 - sed -n "/Extension('/{s:^.*Extension('::;s:'.*::;p}" "${S}"/setup.py | \
5269 - egrep -v '(unicodedata|time|cStringIO|_struct|binascii)'
5270 - ) \
5271 - PTHON_DISABLE_SSL="1" \
5272 - SYSROOT= \
5273 - emake
5274 - # See comment in src_configure about these.
5275 - ln python ../${CHOST}/hostpython || die
5276 - ln Parser/pgen ../${CHOST}/Parser/hostpgen || die
5277 - ln -s ../${CBUILD}/build/lib.*/ ../${CHOST}/hostpythonpath || die
5278 - fi
5279 -
5280 - cd "${WORKDIR}"/${CHOST} || die
5281 - default
5282 -
5283 - # Work around bug 329499. See also bug 413751.
5284 - pax-mark m python
5285 -}
5286 -
5287 -src_test() {
5288 - # Tests will not work when cross compiling.
5289 - if tc-is-cross-compiler; then
5290 - elog "Disabling tests due to crosscompiling."
5291 - return
5292 - fi
5293 -
5294 - cd "${WORKDIR}/${CHOST}" || die
5295 -
5296 - # Skip failing tests.
5297 - local skipped_tests="distutils tcl"
5298 -
5299 - for test in ${skipped_tests}; do
5300 - mv "${S}"/Lib/test/test_${test}.py "${T}"
5301 - done
5302 -
5303 - # Rerun failed tests in verbose mode (regrtest -w).
5304 - PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-w" < /dev/tty
5305 - local result="$?"
5306 -
5307 - for test in ${skipped_tests}; do
5308 - mv "${T}/test_${test}.py" "${S}"/Lib/test || die
5309 - done
5310 -
5311 - elog "The following tests have been skipped:"
5312 - for test in ${skipped_tests}; do
5313 - elog "test_${test}.py"
5314 - done
5315 -
5316 - elog "If you would like to run them, you may:"
5317 - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
5318 - elog "and run the tests separately."
5319 -
5320 - if [[ "${result}" -ne 0 ]]; then
5321 - die "emake test failed"
5322 - fi
5323 -}
5324 -
5325 -src_install() {
5326 - local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
5327 -
5328 - cd "${WORKDIR}"/${CHOST} || die
5329 - emake DESTDIR="${D}" altinstall maninstall
5330 -
5331 - # Fix collisions between different slots of Python.
5332 - mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" || die
5333 - mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" || die
5334 - mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" || die
5335 - mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1" || die
5336 - rm -f "${ED}usr/bin/smtpd.py" || die
5337 -
5338 - if use build; then
5339 - rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} || die
5340 - else
5341 - use elibc_uclibc && { rm -fr "${libdir}/"{bsddb/test,test} || die; }
5342 - use berkdb || { rm -fr "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die; }
5343 - use sqlite || { rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} || die; }
5344 - use tk || { rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die; }
5345 - fi
5346 -
5347 - use threads || { rm -fr "${libdir}/multiprocessing" || die; }
5348 - use wininst || { rm -f "${libdir}/distutils/command/"wininst-*.exe || die; }
5349 -
5350 - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
5351 -
5352 - if use examples; then
5353 - docinto examples
5354 - dodoc -r "${S}"/Tools/.
5355 - fi
5356 -
5357 - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
5358 - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
5359 - sed \
5360 - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
5361 - -e "s:@PYDOC@:pydoc${SLOT}:" \
5362 - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
5363 -
5364 - # for python-exec
5365 - python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
5366 -
5367 - # if not using a cross-compiler, use the fresh binary
5368 - if ! tc-is-cross-compiler; then
5369 - local PYTHON=./python \
5370 - LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
5371 - export LD_LIBRARY_PATH
5372 - fi
5373 -
5374 - echo "EPYTHON='${EPYTHON}'" > epython.py
5375 - python_domodule epython.py
5376 -}
5377 -
5378 -pkg_postinst() {
5379 - ewarn "Please note that Python ${SLOT} is no longer supported in Gentoo."
5380 - ewarn "The interpreter is not maintained, and may contain security"
5381 - ewarn "vulnerabilities. Gentoo ebuilds will no longer be built with support"
5382 - ewarn "for Python ${SLOT}."
5383 - ewarn
5384 - ewarn "If you wish to use Python ${SLOT} for your own purposes (development,"
5385 - ewarn "testing), we suggest establishing a virtualenv for this interpreter,"
5386 - ewarn "and installing the necessary dependencies inside it. However, we also"
5387 - ewarn "strongly discourage using Python ${SLOT} on production systems."
5388 -}
5389
5390 diff --git a/dev-lang/python/python-3.2.6.ebuild b/dev-lang/python/python-3.2.6.ebuild
5391 deleted file mode 100644
5392 index 456ac47..0000000
5393 --- a/dev-lang/python/python-3.2.6.ebuild
5394 +++ /dev/null
5395 @@ -1,340 +0,0 @@
5396 -# Copyright 1999-2015 Gentoo Foundation
5397 -# Distributed under the terms of the GNU General Public License v2
5398 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.2.5-r6.ebuild,v 1.11 2015/03/31 18:46:33 ulm Exp $
5399 -
5400 -EAPI=5
5401 -WANT_AUTOMAKE="none"
5402 -WANT_LIBTOOL="none"
5403 -
5404 -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
5405 -
5406 -MY_P="Python-${PV}"
5407 -
5408 -DESCRIPTION="An interpreted, interactive, object-oriented programming language"
5409 -HOMEPAGE="http://www.python.org/"
5410 -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz"
5411 -
5412 -LICENSE="PSF-2"
5413 -SLOT="3.2"
5414 -KEYWORDS=""
5415 -IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
5416 -
5417 -# Do not add a dependency on dev-lang/python to this ebuild.
5418 -# If you need to apply a patch which requires python for bootstrapping, please
5419 -# run the bootstrap code on your dev box and include the results in the
5420 -# patchset. See bug 447752.
5421 -
5422 -RDEPEND="app-arch/bzip2
5423 - >=sys-libs/zlib-1.1.3
5424 - virtual/libffi
5425 - virtual/libintl
5426 - !build? (
5427 - gdbm? ( sys-libs/gdbm[berkdb] )
5428 - ncurses? (
5429 - >=sys-libs/ncurses-5.2
5430 - readline? ( >=sys-libs/readline-4.1 )
5431 - )
5432 - sqlite? ( >=dev-db/sqlite-3.3.8:3 )
5433 - ssl? ( dev-libs/openssl )
5434 - tk? (
5435 - >=dev-lang/tk-8.0
5436 - dev-tcltk/blt
5437 - dev-tcltk/tix
5438 - )
5439 - xml? ( >=dev-libs/expat-2.1 )
5440 - )"
5441 -DEPEND="${RDEPEND}
5442 - virtual/pkgconfig
5443 - >=sys-devel/autoconf-2.65
5444 - !sys-devel/gcc[libffi]"
5445 -RDEPEND+=" !build? ( app-misc/mime-types )
5446 - doc? ( dev-python/python-docs:${SLOT} )"
5447 -
5448 -S="${WORKDIR}/${MY_P}"
5449 -
5450 -src_prepare() {
5451 - # Ensure that internal copies of expat, libffi and zlib are not used.
5452 - rm -r Modules/expat || die
5453 - rm -r Modules/_ctypes/libffi* || die
5454 - rm -r Modules/zlib || die
5455 -
5456 - local excluded_patches
5457 - if ! tc-is-cross-compiler; then
5458 - excluded_patches="*_all_crosscompile.patch"
5459 - fi
5460 -
5461 - EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
5462 - epatch "${FILESDIR}/${SLOT}"
5463 -
5464 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
5465 - Lib/distutils/command/install.py \
5466 - Lib/distutils/sysconfig.py \
5467 - Lib/site.py \
5468 - Lib/sysconfig.py \
5469 - Lib/test/test_site.py \
5470 - Makefile.pre.in \
5471 - Modules/Setup.dist \
5472 - Modules/getpath.c \
5473 - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
5474 -
5475 - # Disable ABI flags.
5476 - sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
5477 -
5478 - epatch_user
5479 -
5480 - eautoconf
5481 - eautoheader
5482 -}
5483 -
5484 -src_configure() {
5485 - if use build; then
5486 - # Disable extraneous modules with extra dependencies.
5487 - export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
5488 - export PYTHON_DISABLE_SSL="1"
5489 - else
5490 - local disable
5491 - use gdbm || disable+=" gdbm"
5492 - use ncurses || disable+=" _curses _curses_panel"
5493 - use readline || disable+=" readline"
5494 - use sqlite || disable+=" _sqlite3"
5495 - use ssl || export PYTHON_DISABLE_SSL="1"
5496 - use tk || disable+=" _tkinter"
5497 - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
5498 - export PYTHON_DISABLE_MODULES="${disable}"
5499 -
5500 - if ! use xml; then
5501 - ewarn "You have configured Python without XML support."
5502 - ewarn "This is NOT a recommended configuration as you"
5503 - ewarn "may face problems parsing any XML documents."
5504 - fi
5505 - fi
5506 -
5507 - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
5508 - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
5509 - fi
5510 -
5511 - if [[ "$(gcc-major-version)" -ge 4 ]]; then
5512 - append-flags -fwrapv
5513 - fi
5514 -
5515 - filter-flags -malign-double
5516 -
5517 - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
5518 -
5519 - # https://bugs.gentoo.org/show_bug.cgi?id=50309
5520 - if is-flagq -O3; then
5521 - is-flagq -fstack-protector-all && replace-flags -O3 -O2
5522 - use hardened && replace-flags -O3 -O2
5523 - fi
5524 -
5525 - # Run the configure scripts in parallel.
5526 - multijob_init
5527 -
5528 - mkdir -p "${WORKDIR}"/{${CBUILD},${CHOST}} || die
5529 -
5530 - if tc-is-cross-compiler; then
5531 - (
5532 - multijob_child_init
5533 - cd "${WORKDIR}"/${CBUILD} >/dev/null || die
5534 - OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \
5535 - "${S}"/configure \
5536 - --{build,host}=${CBUILD} \
5537 - || die "cross-configure failed"
5538 - ) &
5539 - multijob_post_fork
5540 -
5541 - # The configure script assumes it's buggy when cross-compiling.
5542 - export ac_cv_buggy_getaddrinfo=no
5543 - export ac_cv_have_long_long_format=yes
5544 - fi
5545 -
5546 - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
5547 - tc-export CXX
5548 - # The configure script fails to use pkg-config correctly.
5549 - # http://bugs.python.org/issue15506
5550 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
5551 -
5552 - # Set LDFLAGS so we link modules with -lpython3.2 correctly.
5553 - # Needed on FreeBSD unless Python 3.2 is already installed.
5554 - # Please query BSD team before removing this!
5555 - append-ldflags "-L."
5556 -
5557 - local dbmliborder
5558 - if use gdbm; then
5559 - dbmliborder+="${dbmliborder:+:}gdbm"
5560 - fi
5561 -
5562 - cd "${WORKDIR}"/${CHOST} || die
5563 - ECONF_SOURCE=${S} OPT="" \
5564 - econf \
5565 - --with-fpectl \
5566 - --enable-shared \
5567 - $(use_enable ipv6) \
5568 - $(use_with threads) \
5569 - $(use_with wide-unicode) \
5570 - --infodir='${prefix}/share/info' \
5571 - --mandir='${prefix}/share/man' \
5572 - --with-computed-gotos \
5573 - --with-dbmliborder="${dbmliborder}" \
5574 - --with-libc="" \
5575 - --enable-loadable-sqlite-extensions \
5576 - --with-system-expat \
5577 - --with-system-ffi
5578 -
5579 - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
5580 - eerror "configure has detected that the sem_open function is broken."
5581 - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
5582 - die "Broken sem_open function (bug 496328)"
5583 - fi
5584 -
5585 - if tc-is-cross-compiler; then
5586 - # Modify the Makefile.pre so we don't regen for the host/ one.
5587 - # We need to link the host python programs into $PWD and run
5588 - # them from here because the distutils sysconfig module will
5589 - # parse Makefile/etc... from argv[0], and we need it to pick
5590 - # up the target settings, not the host ones.
5591 - sed -i \
5592 - -e '1iHOSTPYTHONPATH = ./hostpythonpath:' \
5593 - -e '/^HOSTPYTHON/s:=.*:= ./hostpython:' \
5594 - -e '/^HOSTPGEN/s:=.*:= ./Parser/hostpgen:' \
5595 - Makefile{.pre,} || die "sed failed"
5596 - fi
5597 -
5598 - multijob_finish
5599 -}
5600 -
5601 -src_compile() {
5602 - if tc-is-cross-compiler; then
5603 - cd "${WORKDIR}"/${CBUILD}
5604 - # Disable as many modules as possible -- but we need a few to install.
5605 - PYTHON_DISABLE_MODULES=$(
5606 - sed -n "/Extension('/{s:^.*Extension('::;s:'.*::;p}" "${S}"/setup.py | \
5607 - egrep -v '(unicodedata|time|cStringIO|_struct|binascii)'
5608 - ) \
5609 - PTHON_DISABLE_SSL="1" \
5610 - SYSROOT= \
5611 - emake
5612 - # See comment in src_configure about these.
5613 - ln python ../${CHOST}/hostpython || die
5614 - ln Parser/pgen ../${CHOST}/Parser/hostpgen || die
5615 - ln -s ../${CBUILD}/build/lib.*/ ../${CHOST}/hostpythonpath || die
5616 - fi
5617 -
5618 - cd "${WORKDIR}"/${CHOST} || die
5619 - emake CPPFLAGS="" CFLAGS="" LDFLAGS=""
5620 -
5621 - # Work around bug 329499. See also bug 413751 and 457194.
5622 - if has_version "dev-libs/libffi[pax_kernel]"; then
5623 - pax-mark E python
5624 - else
5625 - pax-mark m python
5626 - fi
5627 -}
5628 -
5629 -src_test() {
5630 - # Tests will not work when cross compiling.
5631 - if tc-is-cross-compiler; then
5632 - elog "Disabling tests due to crosscompiling."
5633 - return
5634 - fi
5635 -
5636 - cd "${WORKDIR}/${CHOST}" || die
5637 -
5638 - # Skip failing tests.
5639 - local skipped_tests="gdb"
5640 -
5641 - for test in ${skipped_tests}; do
5642 - mv "${S}"/Lib/test/test_${test}.py "${T}"
5643 - done
5644 -
5645 - # Rerun failed tests in verbose mode (regrtest -w).
5646 - PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-w" CPPFLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty
5647 - local result="$?"
5648 -
5649 - for test in ${skipped_tests}; do
5650 - mv "${T}/test_${test}.py" "${S}"/Lib/test || die
5651 - done
5652 -
5653 - elog "The following tests have been skipped:"
5654 - for test in ${skipped_tests}; do
5655 - elog "test_${test}.py"
5656 - done
5657 -
5658 - elog "If you would like to run them, you may:"
5659 - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
5660 - elog "and run the tests separately."
5661 -
5662 - if [[ "${result}" -ne 0 ]]; then
5663 - die "emake test failed"
5664 - fi
5665 -}
5666 -
5667 -src_install() {
5668 - local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
5669 -
5670 - cd "${WORKDIR}"/${CHOST} || die
5671 - emake DESTDIR="${D}" altinstall
5672 -
5673 - sed \
5674 - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
5675 - -e "s/\(PY_LDFLAGS=\).*/\1/" \
5676 - -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
5677 -
5678 - # Fix collisions between different slots of Python.
5679 - rm "${ED}usr/$(get_libdir)/libpython3.so" || die
5680 -
5681 - if use build; then
5682 - rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter} || die
5683 - else
5684 - use elibc_uclibc && { rm -fr "${libdir}/test" || die; }
5685 - use sqlite || { rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} || die; }
5686 - use tk || { rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die; }
5687 - fi
5688 -
5689 - use threads || { rm -fr "${libdir}/multiprocessing" || die; }
5690 - use wininst || { rm -f "${libdir}/distutils/command/"wininst-*.exe || die; }
5691 -
5692 - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
5693 -
5694 - if use examples; then
5695 - docinto examples
5696 - find "${S}"/Tools -name __pycache__ -exec rm -fr {} + || die
5697 - dodoc -r "${S}"/Tools/.
5698 - fi
5699 - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
5700 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
5701 - emake --no-print-directory -s -f - 2>/dev/null)
5702 - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
5703 -
5704 - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
5705 - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
5706 - sed \
5707 - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
5708 - -e "s:@PYDOC@:pydoc${SLOT}:" \
5709 - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
5710 -
5711 - # for python-exec
5712 - python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
5713 -
5714 - # if not using a cross-compiler, use the fresh binary
5715 - if ! tc-is-cross-compiler; then
5716 - local PYTHON=./python \
5717 - LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
5718 - export LD_LIBRARY_PATH
5719 - fi
5720 -
5721 - echo "EPYTHON='${EPYTHON}'" > epython.py
5722 - python_domodule epython.py
5723 -}
5724 -
5725 -pkg_postinst() {
5726 - ewarn "Please note that Python ${SLOT} is no longer supported in Gentoo."
5727 - ewarn "The interpreter is not well maintained, and may contain security"
5728 - ewarn "vulnerabilities. Gentoo ebuilds will no longer be built with support"
5729 - ewarn "for Python ${SLOT}."
5730 - ewarn
5731 - ewarn "If you wish to use Python ${SLOT} for your own purposes (development,"
5732 - ewarn "testing), we suggest establishing a virtualenv for this interpreter,"
5733 - ewarn "and installing the necessary dependencies inside it. However, we also"
5734 - ewarn "strongly discourage using Python ${SLOT} on production systems."
5735 -}
5736
5737 diff --git a/dev-lang/python/python-3.3.5.ebuild b/dev-lang/python/python-3.3.5.ebuild
5738 deleted file mode 100644
5739 index 896721e..0000000
5740 --- a/dev-lang/python/python-3.3.5.ebuild
5741 +++ /dev/null
5742 @@ -1,368 +0,0 @@
5743 -# Copyright 1999-2016 Gentoo Foundation
5744 -# Distributed under the terms of the GNU General Public License v2
5745 -# $Id$
5746 -
5747 -EAPI="5"
5748 -WANT_AUTOMAKE="none"
5749 -WANT_LIBTOOL="none"
5750 -
5751 -inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
5752 -
5753 -MY_P="Python-${PV}"
5754 -PATCHSET_VERSION="${PV}-0"
5755 -
5756 -DESCRIPTION="An interpreted, interactive, object-oriented programming language"
5757 -HOMEPAGE="http://www.python.org/"
5758 -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz"
5759 -
5760 -LICENSE="PSF-2"
5761 -SLOT="3.3/3.3m"
5762 -KEYWORDS=""
5763 -IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
5764 -
5765 -# Do not add a dependency on dev-lang/python to this ebuild.
5766 -# If you need to apply a patch which requires python for bootstrapping, please
5767 -# run the bootstrap code on your dev box and include the results in the
5768 -# patchset. See bug 447752.
5769 -
5770 -PYVER=${SLOT%/*}
5771 -
5772 -RDEPEND="app-arch/bzip2:0=
5773 - app-arch/xz-utils:0=
5774 - >=sys-libs/zlib-1.1.3:0=
5775 - virtual/libffi
5776 - virtual/libintl
5777 - !build? (
5778 - gdbm? ( sys-libs/gdbm:0=[berkdb] )
5779 - ncurses? (
5780 - >=sys-libs/ncurses-5.2:0=
5781 - readline? ( >=sys-libs/readline-4.1:0= )
5782 - )
5783 - sqlite? ( >=dev-db/sqlite-3.3.8:3= )
5784 - ssl? (
5785 - !libressl? ( dev-libs/openssl:0= )
5786 - libressl? ( dev-libs/libressl:= )
5787 - )
5788 - tk? (
5789 - >=dev-lang/tcl-8.0:0=
5790 - >=dev-lang/tk-8.0:0=
5791 - dev-tcltk/blt:0=
5792 - dev-tcltk/tix
5793 - )
5794 - xml? ( >=dev-libs/expat-2.1:0= )
5795 - )
5796 - !!<sys-apps/sandbox-2.6-r1"
5797 -DEPEND="${RDEPEND}
5798 - virtual/pkgconfig
5799 - >=sys-devel/autoconf-2.65
5800 - !sys-devel/gcc[libffi(-)]"
5801 -RDEPEND+=" !build? ( app-misc/mime-types )
5802 - doc? ( dev-python/python-docs:${PYVER} )"
5803 -PDEPEND=">=app-eselect/eselect-python-20140125-r1"
5804 -
5805 -S="${WORKDIR}/${MY_P}"
5806 -
5807 -src_prepare() {
5808 - # Ensure that internal copies of expat, libffi and zlib are not used.
5809 - rm -fr Modules/expat
5810 - rm -fr Modules/_ctypes/libffi*
5811 - rm -fr Modules/zlib
5812 -
5813 - if tc-is-cross-compiler; then
5814 - # Invokes BUILDPYTHON, which is built for the host arch
5815 - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
5816 - fi
5817 -
5818 - EPATCH_SUFFIX="patch" EPATCH_EXCLUDE="61_all_process_data.patch" \
5819 - epatch "${FILESDIR}/3.3"
5820 - epatch "${FILESDIR}/${PN}-3.3.5-ncurses-pkg-config.patch"
5821 - epatch "${FILESDIR}/${PN}-3.4-gcc-5.patch" #547626
5822 -
5823 - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
5824 - Lib/distutils/command/install.py \
5825 - Lib/distutils/sysconfig.py \
5826 - Lib/site.py \
5827 - Lib/sysconfig.py \
5828 - Lib/test/test_site.py \
5829 - Makefile.pre.in \
5830 - Modules/Setup.dist \
5831 - Modules/getpath.c \
5832 - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
5833 -
5834 - # bug #514686
5835 - epatch "${FILESDIR}/${PN}-3.3-CVE-2014-4616.patch"
5836 -
5837 - epatch "${FILESDIR}"/${PN}-3.3-libressl.patch
5838 -
5839 - epatch_user
5840 -
5841 - eautoconf
5842 - eautoheader
5843 -}
5844 -
5845 -src_configure() {
5846 - if use build; then
5847 - # Disable extraneous modules with extra dependencies.
5848 - export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
5849 - export PYTHON_DISABLE_SSL="1"
5850 - else
5851 - local disable
5852 - use gdbm || disable+=" gdbm"
5853 - use ncurses || disable+=" _curses _curses_panel"
5854 - use readline || disable+=" readline"
5855 - use sqlite || disable+=" _sqlite3"
5856 - use ssl || export PYTHON_DISABLE_SSL="1"
5857 - use tk || disable+=" _tkinter"
5858 - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
5859 - export PYTHON_DISABLE_MODULES="${disable}"
5860 -
5861 - if ! use xml; then
5862 - ewarn "You have configured Python without XML support."
5863 - ewarn "This is NOT a recommended configuration as you"
5864 - ewarn "may face problems parsing any XML documents."
5865 - fi
5866 - fi
5867 -
5868 - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
5869 - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
5870 - fi
5871 -
5872 - if [[ "$(gcc-major-version)" -ge 4 ]]; then
5873 - append-flags -fwrapv
5874 - fi
5875 -
5876 - filter-flags -malign-double
5877 -
5878 - # https://bugs.gentoo.org/show_bug.cgi?id=50309
5879 - if is-flagq -O3; then
5880 - is-flagq -fstack-protector-all && replace-flags -O3 -O2
5881 - use hardened && replace-flags -O3 -O2
5882 - fi
5883 -
5884 - # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
5885 - tc-export CXX
5886 - # The configure script fails to use pkg-config correctly.
5887 - # http://bugs.python.org/issue15506
5888 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
5889 -
5890 - # Set LDFLAGS so we link modules with -lpython3.2 correctly.
5891 - # Needed on FreeBSD unless Python 3.2 is already installed.
5892 - # Please query BSD team before removing this!
5893 - append-ldflags "-L."
5894 -
5895 - local dbmliborder
5896 - if use gdbm; then
5897 - dbmliborder+="${dbmliborder:+:}gdbm"
5898 - fi
5899 -
5900 - BUILD_DIR="${WORKDIR}/${CHOST}"
5901 - mkdir -p "${BUILD_DIR}" || die
5902 - cd "${BUILD_DIR}" || die
5903 -
5904 - ECONF_SOURCE="${S}" OPT="" \
5905 - econf \
5906 - --with-fpectl \
5907 - --enable-shared \
5908 - $(use_enable ipv6) \
5909 - $(use_with threads) \
5910 - --infodir='${prefix}/share/info' \
5911 - --mandir='${prefix}/share/man' \
5912 - --with-computed-gotos \
5913 - --with-dbmliborder="${dbmliborder}" \
5914 - --with-libc="" \
5915 - --enable-loadable-sqlite-extensions \
5916 - --with-system-expat \
5917 - --with-system-ffi
5918 -
5919 - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
5920 - eerror "configure has detected that the sem_open function is broken."
5921 - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
5922 - die "Broken sem_open function (bug 496328)"
5923 - fi
5924 -}
5925 -
5926 -src_compile() {
5927 - # Avoid invoking pgen for cross-compiles.
5928 - touch Include/graminit.h Python/graminit.c || die
5929 -
5930 - cd "${BUILD_DIR}" || die
5931 - emake CPPFLAGS="" CFLAGS="" LDFLAGS=""
5932 -
5933 - # Work around bug 329499. See also bug 413751 and 457194.
5934 - if has_version dev-libs/libffi[pax_kernel]; then
5935 - pax-mark E python
5936 - else
5937 - pax-mark m python
5938 - fi
5939 -}
5940 -
5941 -src_test() {
5942 - # Tests will not work when cross compiling.
5943 - if tc-is-cross-compiler; then
5944 - elog "Disabling tests due to crosscompiling."
5945 - return
5946 - fi
5947 -
5948 - cd "${BUILD_DIR}" || die
5949 -
5950 - # Skip failing tests.
5951 - local skipped_tests="gdb"
5952 -
5953 - for test in ${skipped_tests}; do
5954 - mv "${S}"/Lib/test/test_${test}.py "${T}"
5955 - done
5956 -
5957 - PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty
5958 - local result="$?"
5959 -
5960 - for test in ${skipped_tests}; do
5961 - mv "${T}/test_${test}.py" "${S}"/Lib/test
5962 - done
5963 -
5964 - elog "The following tests have been skipped:"
5965 - for test in ${skipped_tests}; do
5966 - elog "test_${test}.py"
5967 - done
5968 -
5969 - elog "If you would like to run them, you may:"
5970 - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
5971 - elog "and run the tests separately."
5972 -
5973 - if [[ "${result}" -ne 0 ]]; then
5974 - die "emake test failed"
5975 - fi
5976 -}
5977 -
5978 -src_install() {
5979 - local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
5980 -
5981 - cd "${BUILD_DIR}" || die
5982 -
5983 - emake DESTDIR="${D}" altinstall
5984 -
5985 - sed \
5986 - -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
5987 - -e "s/\(PY_LDFLAGS=\).*/\1/" \
5988 - -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
5989 -
5990 - # Fix collisions between different slots of Python.
5991 - rm -f "${ED}usr/$(get_libdir)/libpython3.so"
5992 -
5993 - # Cheap hack to get version with ABIFLAGS
5994 - local abiver=$(cd "${ED}usr/include"; echo python*)
5995 - if [[ ${abiver} != python${PYVER} ]]; then
5996 - # Replace python3.X with a symlink to python3.Xm
5997 - rm "${ED}usr/bin/python${PYVER}" || die
5998 - dosym "${abiver}" "/usr/bin/python${PYVER}"
5999 - # Create python3.X-config symlink
6000 - dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
6001 - # Create python-3.5m.pc symlink
6002 - dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
6003 - fi
6004 -
6005 - if use build; then
6006 - rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
6007 - else
6008 - use elibc_uclibc && rm -fr "${libdir}/test"
6009 - use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
6010 - use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
6011 - fi
6012 -
6013 - use threads || rm -fr "${libdir}/multiprocessing"
6014 - use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
6015 -
6016 - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
6017 -
6018 - if use examples; then
6019 - insinto /usr/share/doc/${PF}/examples
6020 - find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
6021 - doins -r "${S}"/Tools
6022 - fi
6023 - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
6024 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
6025 - emake --no-print-directory -s -f - 2>/dev/null)
6026 - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
6027 -
6028 - newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
6029 - newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
6030 - sed \
6031 - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
6032 - -e "s:@PYDOC@:pydoc${PYVER}:" \
6033 - -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
6034 -
6035 - # for python-exec
6036 - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
6037 -
6038 - # if not using a cross-compiler, use the fresh binary
6039 - if ! tc-is-cross-compiler; then
6040 - local -x PYTHON=./python
6041 - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
6042 - else
6043 - vars=( PYTHON "${vars[@]}" )
6044 - fi
6045 -
6046 - python_export "python${PYVER}" "${vars[@]}"
6047 - echo "EPYTHON='${EPYTHON}'" > epython.py || die
6048 - python_domodule epython.py
6049 -
6050 - # python-exec wrapping support
6051 - local pymajor=${PYVER%.*}
6052 - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
6053 - # python and pythonX
6054 - ln -s "../../../bin/${abiver}" \
6055 - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
6056 - ln -s "python${pymajor}" \
6057 - "${D}${PYTHON_SCRIPTDIR}/python" || die
6058 - # python-config and pythonX-config
6059 - # note: we need to create a wrapper rather than symlinking it due
6060 - # to some random dirname(argv[0]) magic performed by python-config
6061 - cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
6062 - #!/bin/sh
6063 - exec "${abiver}-config" "\${@}"
6064 - EOF
6065 - chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
6066 - ln -s "python${pymajor}-config" \
6067 - "${D}${PYTHON_SCRIPTDIR}/python-config" || die
6068 - # 2to3, pydoc, pyvenv
6069 - ln -s "../../../bin/2to3-${PYVER}" \
6070 - "${D}${PYTHON_SCRIPTDIR}/2to3" || die
6071 - ln -s "../../../bin/pydoc${PYVER}" \
6072 - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
6073 - ln -s "../../../bin/pyvenv-${PYVER}" \
6074 - "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
6075 - # idle
6076 - if use tk; then
6077 - ln -s "../../../bin/idle${PYVER}" \
6078 - "${D}${PYTHON_SCRIPTDIR}/idle" || die
6079 - fi
6080 -}
6081 -
6082 -pkg_preinst() {
6083 - if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
6084 - python_updater_warning="1"
6085 - fi
6086 -}
6087 -
6088 -eselect_python_update() {
6089 - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
6090 - eselect python update
6091 - fi
6092 -
6093 - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
6094 - eselect python update --python${PV%%.*}
6095 - fi
6096 -}
6097 -
6098 -pkg_postinst() {
6099 - eselect_python_update
6100 -
6101 - if [[ "${python_updater_warning}" == "1" ]]; then
6102 - ewarn "You have just upgraded from an older version of Python."
6103 - ewarn
6104 - ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
6105 - fi
6106 -}
6107 -
6108 -pkg_postrm() {
6109 - eselect_python_update
6110 -}