aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-12-29 12:56:03 +0100
committerMichał Górny <mgorny@gentoo.org>2019-12-29 12:56:32 +0100
commit6d0796d2302019591f3c59f0c5d5d40ae06a636d (patch)
treee2c269e2e304e350f00959ceac62ea7b27ae75fa
parentdev-lang/python: Remove unnecessary +x (diff)
downloadpython-6d0796d2302019591f3c59f0c5d5d40ae06a636d.tar.gz
python-6d0796d2302019591f3c59f0c5d5d40ae06a636d.tar.bz2
python-6d0796d2302019591f3c59f0c5d5d40ae06a636d.zip
dev-lang/python: Drop old
All the old versions (2.6, 3.2 and 3.3) no longer build with new openssl and glibc. Somebody would have to backport even more patches. Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-lang/python/Manifest3
-rw-r--r--dev-lang/python/files/2.6/.gitattributes1
-rw-r--r--dev-lang/python/files/2.6/01_all_static_library_location.patch68
-rw-r--r--dev-lang/python/files/2.6/02_all_disable_modules_and_ssl.patch92
-rw-r--r--dev-lang/python/files/2.6/03_all_add_portage_search_path.patch10
-rw-r--r--dev-lang/python/files/2.6/04_all_libdir.patch119
-rw-r--r--dev-lang/python/files/2.6/05_all_verbose_building_of_extensions.patch10
-rw-r--r--dev-lang/python/files/2.6/06_all_dbm_automagic.patch52
-rw-r--r--dev-lang/python/files/2.6/07_all_internal_expat.patch33
-rw-r--r--dev-lang/python/files/2.6/08_all_non-zero_exit_status_on_failure.patch31
-rw-r--r--dev-lang/python/files/2.6/09_all_use_external_libffi.patch51
-rw-r--r--dev-lang/python/files/2.6/10_all_sys.platform_linux2.patch13
-rw-r--r--dev-lang/python/files/2.6/11_all_regenerate_platform-specific_modules.patch110
-rw-r--r--dev-lang/python/files/2.6/21_all_distutils_c++.patch426
-rw-r--r--dev-lang/python/files/2.6/22_all_turkish_locale.patch128
-rw-r--r--dev-lang/python/files/2.6/23_all_arm_OABI.patch185
-rw-r--r--dev-lang/python/files/2.6/24_all_ctypes_mmap_wx.patch124
-rw-r--r--dev-lang/python/files/2.6/25_all_gdbm-1.9.patch14
-rw-r--r--dev-lang/python/files/2.6/26_all_expat-2.1.patch15
-rw-r--r--dev-lang/python/files/2.6/41_all_crosscompile.patch113
-rw-r--r--dev-lang/python/files/2.6/62_all_xml.use_pyxml.patch41
-rw-r--r--dev-lang/python/files/2.6/81_all_use_new_readline_function_types__closes__20374_.patch28
-rw-r--r--dev-lang/python/files/2.6/82_all_new_plan__just_remove_typecasts__closes__20374_.patch37
-rw-r--r--dev-lang/python/files/2.6/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch37
-rw-r--r--dev-lang/python/files/2.6/99_all_tcl86.patch11
-rw-r--r--dev-lang/python/files/3.2/01_all_static_library_location.patch70
-rw-r--r--dev-lang/python/files/3.2/02_all_disable_modules_and_ssl.patch89
-rw-r--r--dev-lang/python/files/3.2/03_all_libdir.patch174
-rw-r--r--dev-lang/python/files/3.2/04_all_non-zero_exit_status_on_failure.patch31
-rw-r--r--dev-lang/python/files/3.2/05_all_regenerate_platform-specific_modules.patch112
-rw-r--r--dev-lang/python/files/3.2/21_all_distutils_c++.patch262
-rw-r--r--dev-lang/python/files/3.2/22_all_tests_environment.patch183
-rw-r--r--dev-lang/python/files/3.2/23_all_h2py_encoding.patch173
-rw-r--r--dev-lang/python/files/3.2/41_all_crosscompile.patch94
-rw-r--r--dev-lang/python/files/3.2/81_all_use_new_readline_function_types__closes__20374_.patch28
-rw-r--r--dev-lang/python/files/3.2/82_all_new_plan__just_remove_typecasts__closes__20374_.patch37
-rw-r--r--dev-lang/python/files/3.2/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch37
-rw-r--r--dev-lang/python/files/3.3/.gitattributes1
-rw-r--r--dev-lang/python/files/3.3/01_all_static_library_location.patch70
-rw-r--r--dev-lang/python/files/3.3/02_all_disable_modules_and_ssl.patch57
-rw-r--r--dev-lang/python/files/3.3/03_all_libdir.patch174
-rw-r--r--dev-lang/python/files/3.3/04_all_non-zero_exit_status_on_failure.patch31
-rw-r--r--dev-lang/python/files/3.3/05_all_regenerate_platform-specific_modules.patch123
-rw-r--r--dev-lang/python/files/3.3/21_all_distutils_c++.patch271
-rw-r--r--dev-lang/python/files/3.3/22_all_tests_environment.patch192
-rw-r--r--dev-lang/python/files/3.3/23_all_h2py_encoding.patch173
-rw-r--r--dev-lang/python/files/3.3/24_all_sqlite-3.8.4.patch14
-rw-r--r--dev-lang/python/files/3.3/61_all_process_data.patch166
-rw-r--r--dev-lang/python/files/python-3.3-CVE-2014-4616.patch52
-rw-r--r--dev-lang/python/files/python-3.3-libressl.patch127
-rw-r--r--dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch40
-rw-r--r--dev-lang/python/files/python-3.4-gcc-5.patch37
-rw-r--r--dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch13
-rw-r--r--dev-lang/python/metadata.xml1
-rw-r--r--dev-lang/python/python-2.6.9.ebuild340
-rw-r--r--dev-lang/python/python-3.2.6.ebuild340
-rw-r--r--dev-lang/python/python-3.3.5.ebuild368
57 files changed, 0 insertions, 5632 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 618d9be..e0d52ba 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,6 +1,3 @@
-DIST Python-2.6.9.tar.xz 9333664 BLAKE2B 097b670701a3751e764f345725297b317efbc44c1e6bfe177bd012fa2263b3d27d84bff8627bc1d999b71c888fddcc3145a88926bd6f25f2227c289b4b56a4c9 SHA512 bcd9286b6af3bfa2017f0b32c6c0f9b934224ece496d2d897ab3a61a936d306a5f61a580c060ce501034a614da374d17831a9c9be9f947b01d977b56437c023b
-DIST Python-3.2.6.tar.xz 9243292 BLAKE2B b657f55521612c89923dc013adb00fd7ee742c13926623e4a268e85a6b43f04163279e77f2239d28d1b3d6d81298c23abb74b1ba1e1509f29522e7fea0661957 SHA512 514b46029dd5b07f2d287a1f00c6716970197186a38e3f2e1ec60c2292cf03a2dc45165ba9c217e5219c7cb6d96a09f790f5b3bdcc8d11db53f927297fe4ddc9
-DIST Python-3.3.5.tar.xz 12116308 BLAKE2B fda7d2b2fdaa27d775e337af3df8e4ebe5d0bdf50a68aa15c06fc450dd3478748af79ee7f58a7a5d8d06e2724b4d947ecbab7614d0958b43579409cdecf0da7b SHA512 562ebd85291f29ff18d37f05682763fc45aa9d070688006f4ef5c89392a48022357c3ca9ee1d795e9e863bdef413e6bab77b8d65581d374a76dbe7cacec65550
DIST Python-3.4.10.tar.xz 14559088 BLAKE2B ea1e333f04c286fe715c1ce97ade37c6a768e58a2e34da2ec51613a76c87a2e704f67d9ae8fd92a95366ab1814295028d7948e49b071d7e457b388176186c2e8 SHA512 d5d27d68049b61f135e21b12a800dbd4fc521d6935de178de6e2e88a989cda511d3c8fead90d14e38d2db0e528a74b22674e0da01c51ff4fad7d335ec6c3dbbc
DIST Python-3.5.9.tar.xz 15388876 BLAKE2B 6086ed2350b6dce3203360f24c2fddf77df65a5815d6da019809796b30c2f43440a9e349c7defd0187cfc3a50a387352dfa63594c2ec513dd6bf585e7c34ec51 SHA512 58127793adef42ed57ae4d56338268866e14c2d084f09f57f26fc6b1c9454e70cc6d3dffc638f8d56f182acc0884021a4dbb578f312dd6fc01995fa85e31377e
DIST python-gentoo-patches-3.4.10.tar.xz 21340 BLAKE2B c2ca41fc4bc81ae6be9426d772b1ffc09a4b2e2c021905886a92d85476871e6c3b51ca30c60eeede93ff8cd90628809cd8c6fb00041d16c1595ce1ba8369dac8 SHA512 27ee476c080a0d1c012ef5d3d8325db6e697e1c3d9611f0337668f3660a50e50e6529bd0fd8b3b5b6030c9be8f8a86d95fa59bc27085ce7d18a7e0b50afe9f4b
diff --git a/dev-lang/python/files/2.6/.gitattributes b/dev-lang/python/files/2.6/.gitattributes
deleted file mode 100644
index 5e5a56d..0000000
--- a/dev-lang/python/files/2.6/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-Makefile export-ignore
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
deleted file mode 100644
index 83231c9..0000000
--- a/dev-lang/python/files/2.6/01_all_static_library_location.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Install libpythonX.Y.a in /usr/lib instead of /usr/lib/pythonX.Y/config.
-https://bugs.gentoo.org/show_bug.cgi?id=252372
-http://bugs.python.org/issue6103
-
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -788,6 +788,19 @@
- fi; \
- else true; \
- fi
-+ @if test -f $(LIBRARY) && test $(LIBRARY) != $(LDLIBRARY); then \
-+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
-+ if test "$(SO)" = .dll; then \
-+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR); \
-+ else \
-+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR); \
-+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY); \
-+ fi; \
-+ else \
-+ echo "Skipped install of $(LIBRARY) - use make frameworkinstall"; \
-+ fi; \
-+ else true; \
-+ fi
-
- # Install the manual page
- maninstall:
-@@ -946,18 +959,6 @@
- else true; \
- fi; \
- done
-- @if test -d $(LIBRARY); then :; else \
-- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
-- if test "$(SO)" = .dll; then \
-- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
-- else \
-- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- fi; \
-- else \
-- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
-- fi; \
-- fi
- $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
- $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
- $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
---- Misc/python-config.in
-+++ Misc/python-config.in
-@@ -45,9 +45,4 @@
- elif opt in ('--libs', '--ldflags'):
- libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
- libs.append('-lpython'+pyver)
-- # add the prefix/lib/pythonX.Y/config dir, but only if there is no
-- # shared library in prefix/lib/.
-- if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
-- libs.insert(0, '-L' + getvar('LIBPL'))
- print ' '.join(libs)
--
---- Modules/makesetup
-+++ Modules/makesetup
-@@ -89,7 +89,7 @@
- then
- ExtraLibDir=.
- else
-- ExtraLibDir='$(LIBPL)'
-+ ExtraLibDir='$(LIBDIR)'
- fi
- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
- esac
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
deleted file mode 100644
index c5de56d..0000000
--- a/dev-lang/python/files/2.6/02_all_disable_modules_and_ssl.patch
+++ /dev/null
@@ -1,92 +0,0 @@
---- setup.py
-+++ setup.py
-@@ -18,7 +18,18 @@
- from distutils.spawn import find_executable
-
- # This global variable is used to hold the list of modules to be disabled.
--disabled_module_list = []
-+pdm_env = "PYTHON_DISABLE_MODULES"
-+if pdm_env in os.environ:
-+ disabled_module_list = os.environ[pdm_env].split()
-+else:
-+ disabled_module_list = []
-+
-+pds_env = "PYTHON_DISABLE_SSL"
-+if pds_env in os.environ:
-+ disable_ssl = os.environ[pds_env]
-+else:
-+ disable_ssl = 0
-+
-
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -355,6 +366,7 @@
- return sys.platform
-
- def detect_modules(self):
-+ global disable_ssl
- # Ensure that /usr/local is always used
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-@@ -697,7 +709,7 @@
- ssl_incs = find_file('openssl/ssl.h', inc_dirs,
- search_for_ssl_incs_in
- )
-- if ssl_incs is not None:
-+ if ssl_incs is not None and not disable_ssl:
- krb5_h = find_file('krb5.h', inc_dirs,
- ['/usr/kerberos/include'])
- if krb5_h:
-@@ -708,7 +720,8 @@
- ] )
-
- if (ssl_incs is not None and
-- ssl_libs is not None):
-+ ssl_libs is not None and
-+ not disable_ssl):
- exts.append( Extension('_ssl', ['_ssl.c'],
- include_dirs = ssl_incs,
- library_dirs = ssl_libs,
-@@ -742,6 +755,7 @@
-
- if (ssl_incs is not None and
- ssl_libs is not None and
-+ not disable_ssl and
- openssl_ver >= 0x00907000):
- # The _hashlib module wraps optimized implementations
- # of hash functions from the OpenSSL library.
-@@ -752,20 +766,22 @@
- # these aren't strictly missing since they are unneeded.
- #missing.extend(['_sha', '_md5'])
- else:
-- # The _sha module implements the SHA1 hash algorithm.
-- exts.append( Extension('_sha', ['shamodule.c']) )
-- # The _md5 module implements the RSA Data Security, Inc. MD5
-- # Message-Digest Algorithm, described in RFC 1321. The
-- # necessary files md5.c and md5.h are included here.
-- exts.append( Extension('_md5',
-- sources = ['md5module.c', 'md5.c'],
-- depends = ['md5.h']) )
- missing.append('_hashlib')
-
-- if (openssl_ver < 0x00908000):
-- # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
-- exts.append( Extension('_sha256', ['sha256module.c']) )
-- exts.append( Extension('_sha512', ['sha512module.c']) )
-+ ### Build these unconditionally so emerge won't fail
-+ ### when openssl is dropped/broken etc.
-+ # The _sha module implements the SHA1 hash algorithm.
-+ exts.append( Extension('_sha', ['shamodule.c']) )
-+ # The _md5 module implements the RSA Data Security, Inc. MD5
-+ # Message-Digest Algorithm, described in RFC 1321. The
-+ # necessary files md5.c and md5.h are included here.
-+ exts.append( Extension('_md5',
-+ sources = ['md5module.c', 'md5.c'],
-+ depends = ['md5.h']) )
-+
-+ exts.append( Extension('_sha256', ['sha256module.c']) )
-+ exts.append( Extension('_sha512', ['sha512module.c']) )
-+ ###
-
- # Modules that provide persistent dictionary-like semantics. You will
- # probably want to arrange for at least one of them to be available on
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
deleted file mode 100644
index 029284c..0000000
--- a/dev-lang/python/files/2.6/03_all_add_portage_search_path.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- Lib/site.py
-+++ Lib/site.py
-@@ -269,6 +269,7 @@
- "python" + sys.version[:3],
- "site-packages"))
- sitedirs.append(os.path.join(prefix, "lib", "site-python"))
-+ sitedirs.append(os.path.join(prefix, "lib", "portage", "pym"))
- else:
- sitedirs.append(prefix)
- sitedirs.append(os.path.join(prefix, "lib", "site-packages"))
diff --git a/dev-lang/python/files/2.6/04_all_libdir.patch b/dev-lang/python/files/2.6/04_all_libdir.patch
deleted file mode 100644
index af61191..0000000
--- a/dev-lang/python/files/2.6/04_all_libdir.patch
+++ /dev/null
@@ -1,119 +0,0 @@
---- Lib/distutils/command/install.py
-+++ Lib/distutils/command/install.py
-@@ -41,8 +41,8 @@
-
- INSTALL_SCHEMES = {
- 'unix_prefix': {
-- 'purelib': '$base/lib/python$py_version_short/site-packages',
-- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
-+ 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
-+ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
- 'headers': '$base/include/python$py_version_short/$dist_name',
- 'scripts': '$base/bin',
- 'data' : '$base',
---- Lib/distutils/sysconfig.py
-+++ Lib/distutils/sysconfig.py
-@@ -120,7 +120,8 @@
-
- if os.name == "posix":
- libpython = os.path.join(prefix,
-- "lib", "python" + get_python_version())
-+ "@@GENTOO_LIBDIR@@",
-+ "python" + get_python_version())
- if standard_lib:
- return libpython
- else:
---- Lib/site.py
-+++ Lib/site.py
-@@ -265,11 +265,11 @@
- if sys.platform in ('os2emx', 'riscos'):
- sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
- elif os.sep == '/':
-- sitedirs.append(os.path.join(prefix, "lib",
-+ sitedirs.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@",
- "python" + sys.version[:3],
- "site-packages"))
-- sitedirs.append(os.path.join(prefix, "lib", "site-python"))
-- sitedirs.append(os.path.join(prefix, "lib", "portage", "pym"))
-+ sitedirs.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python"))
-+ sitedirs.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "portage", "pym"))
- else:
- sitedirs.append(prefix)
- sitedirs.append(os.path.join(prefix, "lib", "site-packages"))
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -91,7 +91,7 @@
- MANDIR= @mandir@
- INCLUDEDIR= @includedir@
- CONFINCLUDEDIR= $(exec_prefix)/include
--SCRIPTDIR= $(prefix)/lib
-+SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@
-
- # Detailed destination directories
- BINLIBDEST= $(LIBDIR)/python$(VERSION)
---- Modules/getpath.c
-+++ Modules/getpath.c
-@@ -129,7 +129,7 @@
- static char exec_prefix[MAXPATHLEN+1];
- static char progpath[MAXPATHLEN+1];
- static char *module_search_path = NULL;
--static char lib_python[] = "lib/python" VERSION;
-+static char lib_python[] = "@@GENTOO_LIBDIR@@/python" VERSION;
-
- static void
- reduce(char *dir)
-@@ -524,7 +524,7 @@
- }
- else
- strncpy(zip_path, PREFIX, MAXPATHLEN);
-- joinpath(zip_path, "lib/python00.zip");
-+ joinpath(zip_path, "@@GENTOO_LIBDIR@@/python00.zip");
- bufsz = strlen(zip_path); /* Replace "00" with version */
- zip_path[bufsz - 6] = VERSION[0];
- zip_path[bufsz - 5] = VERSION[2];
-@@ -534,7 +534,7 @@
- fprintf(stderr,
- "Could not find platform dependent libraries <exec_prefix>\n");
- strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
-- joinpath(exec_prefix, "lib/lib-dynload");
-+ joinpath(exec_prefix, "@@GENTOO_LIBDIR@@/lib-dynload");
- }
- /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
-
---- Modules/Setup.dist
-+++ Modules/Setup.dist
-@@ -460,7 +460,7 @@
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.gzip.org/zlib/
--#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
-
- # Interface to the Expat XML parser
- #
---- setup.py
-+++ setup.py
-@@ -420,8 +420,7 @@
- # if a file is found in one of those directories, it can
- # be assumed that no additional -I,-L directives are needed.
- lib_dirs = self.compiler.library_dirs + [
-- '/lib64', '/usr/lib64',
-- '/lib', '/usr/lib',
-+ '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
- ]
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
- exts = []
-@@ -674,11 +673,11 @@
- elif curses_library:
- readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
-+ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
- 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
-- library_dirs=['/usr/lib/termcap'],
-+ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
- extra_link_args=readline_extra_link_args,
- libraries=readline_libs) )
- else:
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
deleted file mode 100644
index de852be..0000000
--- a/dev-lang/python/files/2.6/05_all_verbose_building_of_extensions.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -395,7 +395,6 @@
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
- @case $$MAKEFLAGS in \
-- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
- esac
-
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
deleted file mode 100644
index 9fc1031..0000000
--- a/dev-lang/python/files/2.6/06_all_dbm_automagic.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- setup.py
-+++ setup.py
-@@ -1137,16 +1137,11 @@
-
- # The standard Unix dbm module:
- if platform not in ['cygwin']:
-- if find_file("ndbm.h", inc_dirs, []) is not None:
-- # Some systems have -lndbm, others don't
-- if self.compiler.find_library_file(lib_dirs, 'ndbm'):
-- ndbm_libs = ['ndbm']
-- else:
-- ndbm_libs = []
-- exts.append( Extension('dbm', ['dbmmodule.c'],
-- define_macros=[('HAVE_NDBM_H',None)],
-- libraries = ndbm_libs ) )
-- elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
-+ # To prevent automagic dependencies check for relevant modules in
-+ # disabled_module_list.
-+ if (self.compiler.find_library_file(lib_dirs, 'gdbm')
-+ and find_file("gdbm/ndbm.h", inc_dirs, []) is not None
-+ and 'gdbm' not in disabled_module_list):
- gdbm_libs = ['gdbm']
- if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
- gdbm_libs.append('gdbm_compat')
-@@ -1162,7 +1157,7 @@
- libraries = gdbm_libs ) )
- else:
- missing.append('dbm')
-- elif db_incs is not None:
-+ elif db_incs is not None and 'bsddb' not in disabled_module_list:
- exts.append( Extension('dbm', ['dbmmodule.c'],
- library_dirs=dblib_dir,
- runtime_library_dirs=dblib_dir,
-@@ -1170,6 +1165,18 @@
- define_macros=[('HAVE_BERKDB_H',None),
- ('DB_DBM_HSEARCH',None)],
- libraries=dblibs))
-+ # Check for ndbm.h here after checking berkdb because ndbm.h is
-+ # only provided by db-1*
-+ elif (find_file("ndbm.h", inc_dirs, []) is not None
-+ and 'bsddb' not in disabled_module_list):
-+ # Some systems have -lndbm, others don't
-+ if self.compiler.find_library_file(lib_dirs, 'ndbm'):
-+ ndbm_libs = ['ndbm']
-+ else:
-+ ndbm_libs = []
-+ exts.append( Extension('dbm', ['dbmmodule.c'],
-+ define_macros=[('HAVE_NDBM_H',None)],
-+ libraries = ndbm_libs ) )
- else:
- missing.append('dbm')
-
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
deleted file mode 100644
index 3ffdae2..0000000
--- a/dev-lang/python/files/2.6/07_all_internal_expat.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- setup.py
-+++ setup.py
-@@ -1326,18 +1326,15 @@
- #
- # More information on Expat can be found at www.libexpat.org.
- #
-- expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
-- define_macros = [
-- ('HAVE_EXPAT_CONFIG_H', '1'),
-- ]
-+ # Use system expat
-+ expatinc = '/usr/include'
-+ define_macros = []
-
- exts.append(Extension('pyexpat',
- define_macros = define_macros,
- include_dirs = [expatinc],
-+ libraries = ['expat'],
- sources = ['pyexpat.c',
-- 'expat/xmlparse.c',
-- 'expat/xmlrole.c',
-- 'expat/xmltok.c',
- ],
- ))
-
-@@ -1349,6 +1346,7 @@
- exts.append(Extension('_elementtree',
- define_macros = define_macros,
- include_dirs = [expatinc],
-+ libraries = ['expat'],
- sources = ['_elementtree.c'],
- ))
- else:
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
deleted file mode 100644
index 8d0ebe8..0000000
--- a/dev-lang/python/files/2.6/08_all_non-zero_exit_status_on_failure.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=281968
-http://bugs.python.org/issue6731
-
---- setup.py
-+++ setup.py
-@@ -31,6 +31,8 @@
- disable_ssl = 0
-
-
-+exit_status = 0
-+
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (at the front) if
- 1) 'dir' is not already in 'dirlist'
-@@ -279,6 +281,8 @@
- print
-
- if self.failed:
-+ global exit_status
-+ exit_status = 1
- failed = self.failed[:]
- print
- print "Failed to build these modules:"
-@@ -2050,6 +2054,7 @@
- 'Tools/scripts/2to3',
- 'Lib/smtpd.py']
- )
-+ sys.exit(exit_status)
-
- # --install-platlib
- if __name__ == '__main__':
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
deleted file mode 100644
index 0c54246..0000000
--- a/dev-lang/python/files/2.6/09_all_use_external_libffi.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-http://bugs.python.org/issue6943
-http://hg.python.org/cpython/rev/f02881332342
-http://hg.python.org/cpython/rev/6d9be1a97c17
-
---- configure.in
-+++ configure.in
-@@ -2046,11 +2046,20 @@
- ],
- [AC_MSG_RESULT(no)])
-
-+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-+
- # Check for use of the system libffi library
- AC_MSG_CHECKING(for --with-system-ffi)
- AC_ARG_WITH(system_ffi,
- AC_HELP_STRING(--with-system-ffi, build _ctypes module using an installed ffi library))
-
-+if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
-+ LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
-+else
-+ LIBFFI_INCLUDEDIR=""
-+fi
-+AC_SUBST(LIBFFI_INCLUDEDIR)
-+
- AC_MSG_RESULT($with_system_ffi)
-
- # Determine if signalmodule should be used.
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -202,6 +202,8 @@
- GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
-
-
-+LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
-+
- ##########################################################################
- # Parser
- PGEN= Parser/pgen$(EXE)
---- setup.py
-+++ setup.py
-@@ -1929,7 +1929,9 @@
- # in /usr/include/ffi
- inc_dirs.append('/usr/include/ffi')
-
-- ffi_inc = find_file('ffi.h', [], inc_dirs)
-+ ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
-+ if not ffi_inc:
-+ ffi_inc = find_file('ffi.h', [], inc_dirs)
- if ffi_inc is not None:
- ffi_h = ffi_inc[0] + '/ffi.h'
- fp = open(ffi_h)
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
deleted file mode 100644
index 40e4080..0000000
--- a/dev-lang/python/files/2.6/10_all_sys.platform_linux2.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-http://bugs.python.org/issue12326
-http://hg.python.org/cpython/rev/c816479f6aaf
-
---- configure.in
-+++ configure.in
-@@ -260,6 +260,7 @@
- MACHDEP="$ac_md_system$ac_md_release"
-
- case $MACHDEP in
-+ linux*) MACHDEP="linux2";;
- cygwin*) MACHDEP="cygwin";;
- darwin*) MACHDEP="darwin";;
- atheos*) MACHDEP="atheos";;
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
deleted file mode 100644
index 425e149..0000000
--- a/dev-lang/python/files/2.6/11_all_regenerate_platform-specific_modules.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-http://bugs.python.org/issue12619
-
---- Lib/plat-aix4/regen
-+++ Lib/plat-aix4/regen
-@@ -5,4 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py.py -i '(u_long)' /usr/include/netinet/in.h
-+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
---- Lib/plat-linux2/regen
-+++ Lib/plat-linux2/regen
-@@ -5,4 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
-+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
---- Lib/plat-sunos5/regen
-+++ Lib/plat-sunos5/regen
-@@ -5,5 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
--
-+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
---- Lib/plat-unixware7/regen
-+++ Lib/plat-unixware7/regen
-@@ -5,5 +5,5 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/netinet/in.h
--h2py /usr/include/sys/stropts.h
-+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
-+python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -355,7 +355,7 @@
-
- # Default target
- all: build_all
--build_all: $(BUILDPYTHON) oldsharedmods sharedmods
-+build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods
-
- # Compile a binary with gcc profile guided optimization.
- profile-opt:
-@@ -400,6 +400,26 @@
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
- esac
-
-+# Build the platform-specific modules
-+platformspecificmods: $(BUILDPYTHON) sharedmods
-+ @PLATDIR=$(PLATDIR); \
-+ if test ! -f $(srcdir)/Lib/$(PLATDIR)/regen; then \
-+ $(INSTALL) -d $(srcdir)/Lib/$(PLATDIR); \
-+ if test -f $(srcdir)/Lib/$${PLATDIR%?}/regen; then \
-+ cp $(srcdir)/Lib/$${PLATDIR%?}/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
-+ else \
-+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
-+ fi \
-+ fi
-+ @EXE="$(BUILDEXE)"; export EXE; \
-+ PATH="`pwd`:$$PATH"; export PATH; \
-+ PYTHONPATH="`pwd`/Lib"; export PYTHONPATH; \
-+ cd $(srcdir)/Lib/$(PLATDIR); \
-+ $(RUNSHARED) ./regen || exit 1; \
-+ for module in *.py; do \
-+ $(RUNSHARED) $(BUILDPYTHON) -c "import py_compile; py_compile.compile('$$module', cfile='/dev/null', doraise=True)" || exit 1; \
-+ done
-+
- # Build static library
- # avoid long command lines, same as LIBRARY_OBJS
- $(LIBRARY): $(LIBRARY_OBJS)
-@@ -845,7 +865,7 @@
- multiprocessing multiprocessing/dummy \
- lib-old \
- curses pydoc_data $(MACHDEPS)
--libinstall: build_all $(srcdir)/Lib/$(PLATDIR)
-+libinstall: build_all
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
- if test ! -d $(DESTDIR)$$i; then \
-@@ -920,16 +940,6 @@
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-
--# Create the PLATDIR source directory, if one wasn't distributed..
--$(srcdir)/Lib/$(PLATDIR):
-- mkdir $(srcdir)/Lib/$(PLATDIR)
-- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
-- export PATH; PATH="`pwd`:$$PATH"; \
-- export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
-- export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
-- export EXE; EXE="$(BUILDEXE)"; \
-- cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
--
- # Install the include files
- INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
- inclinstall:
-@@ -1212,7 +1222,7 @@
- Python/thread.o: @THREADHEADERS@
-
- # Declare targets that aren't real files
--.PHONY: all build_all sharedmods oldsharedmods test quicktest memtest
-+.PHONY: all build_all sharedmods oldsharedmods platformspecificmods test quicktest memtest
- .PHONY: install altinstall oldsharedinstall bininstall altbininstall
- .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
- .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
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
deleted file mode 100644
index 7e1e89a..0000000
--- a/dev-lang/python/files/2.6/21_all_distutils_c++.patch
+++ /dev/null
@@ -1,426 +0,0 @@
-http://bugs.python.org/issue1222585
-
---- configure.in
-+++ configure.in
-@@ -1723,6 +1723,7 @@
- # Set info about shared libraries.
- AC_SUBST(SO)
- AC_SUBST(LDSHARED)
-+AC_SUBST(LDCXXSHARED)
- AC_SUBST(BLDSHARED)
- AC_SUBST(CCSHARED)
- AC_SUBST(LINKFORSHARED)
-@@ -1775,36 +1776,47 @@
- IRIX/5*) LDSHARED="ld -shared";;
- IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
- SunOS/5*)
-- if test "$GCC" = "yes"
-- then LDSHARED='$(CC) -shared'
-- else LDSHARED='$(CC) -G';
-+ if test "$GCC" = "yes" ; then
-+ LDSHARED='$(CC) -shared'
-+ LDCXXSHARED='$(CXX) -shared'
-+ else
-+ LDSHARED='$(CC) -G'
-+ LDCXXSHARED='$(CXX) -G'
- fi ;;
- hp*|HP*)
-- if test "$GCC" = "yes"
-- then LDSHARED='$(CC) -shared'
-- else LDSHARED='ld -b';
-+ if test "$GCC" = "yes" ; then
-+ LDSHARED='$(CC) -shared'
-+ LDCXXSHARED='$(CXX) -shared'
-+ else
-+ LDSHARED='ld -b'
- fi ;;
- OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
- Darwin/1.3*)
- LDSHARED='$(CC) $(LDFLAGS) -bundle'
-+ LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
- if test "$enable_framework" ; then
- # Link against the framework. All externals should be defined.
- BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
- LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-+ LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
- else
- # No framework. Ignore undefined symbols, assuming they come from Python
- LDSHARED="$LDSHARED -undefined suppress"
-+ LDCXXSHARED="$LDCXXSHARED -undefined suppress"
- fi ;;
- Darwin/1.4*|Darwin/5.*|Darwin/6.*)
- LDSHARED='$(CC) $(LDFLAGS) -bundle'
-+ LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
- if test "$enable_framework" ; then
- # Link against the framework. All externals should be defined.
- BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
- LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-+ LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
- else
- # No framework, use the Python app as bundle-loader
- BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
- LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
-+ LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
- fi ;;
- Darwin/*)
- # Use -undefined dynamic_lookup whenever possible (10.3 and later).
-@@ -1816,26 +1828,35 @@
- LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
- fi
- LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
-+ LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
- BLDSHARED="$LDSHARED"
- else
- LDSHARED='$(CC) $(LDFLAGS) -bundle'
-+ LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
- if test "$enable_framework" ; then
- # Link against the framework. All externals should be defined.
- BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
- LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-+ LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
- else
- # No framework, use the Python app as bundle-loader
- BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
- LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
-+ LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
- fi
- fi
- ;;
-- Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
-- BSD/OS*/4*) LDSHARED="gcc -shared";;
-+ Linux*|GNU*|QNX*)
-+ LDSHARED='$(CC) -shared'
-+ LDCXXSHARED='$(CXX) -shared';;
-+ BSD/OS*/4*)
-+ LDSHARED="gcc -shared"
-+ LDCXXSHARED="g++ -shared";;
- FreeBSD*)
- if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
- then
- LDSHARED='$(CC) -shared ${LDFLAGS}'
-+ LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
- else
- LDSHARED="ld -Bshareable ${LDFLAGS}"
- fi;;
-@@ -1843,6 +1864,7 @@
- if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
- then
- LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
-+ LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
- else
- case `uname -r` in
- [[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
-@@ -1850,23 +1872,36 @@
- ;;
- *)
- LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
-+ LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
- ;;
- esac
- fi;;
-- NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
-+ NetBSD*|DragonFly*)
-+ LDSHARED="cc -shared ${LDFLAGS}"
-+ LDCXXSHARED="c++ -shared ${LDFLAGS}";;
- OpenUNIX*|UnixWare*)
-- if test "$GCC" = "yes"
-- then LDSHARED='$(CC) -shared'
-- else LDSHARED='$(CC) -G'
-+ if test "$GCC" = "yes" ; then
-+ LDSHARED='$(CC) -shared'
-+ LDCXXSHARED='$(CXX) -shared'
-+ else
-+ LDSHARED='$(CC) -G'
-+ LDCXXSHARED='$(CXX) -G'
- fi;;
-- SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
-+ SCO_SV*)
-+ LDSHARED='$(CC) -Wl,-G,-Bexport'
-+ LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
- Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
-- CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
-- atheos*) LDSHARED="gcc -shared";;
-+ CYGWIN*)
-+ LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
-+ LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
-+ atheos*)
-+ LDSHARED="gcc -shared"
-+ LDCXXSHARED="g++ -shared";;
- *) LDSHARED="ld";;
- esac
- fi
- AC_MSG_RESULT($LDSHARED)
-+LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
- BLDSHARED=${BLDSHARED-$LDSHARED}
- # CCSHARED are the C *flags* used to create objects to go into a shared
- # library (module) -- this is only needed for a few systems
---- Lib/distutils/cygwinccompiler.py
-+++ Lib/distutils/cygwinccompiler.py
-@@ -132,9 +132,13 @@
- self.set_executables(compiler='gcc -mcygwin -O -Wall',
- compiler_so='gcc -mcygwin -mdll -O -Wall',
- compiler_cxx='g++ -mcygwin -O -Wall',
-+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
- linker_exe='gcc -mcygwin',
- linker_so=('%s -mcygwin %s' %
-- (self.linker_dll, shared_option)))
-+ (self.linker_dll, shared_option)),
-+ linker_exe_cxx='g++ -mcygwin',
-+ linker_so_cxx=('%s -mcygwin %s' %
-+ (self.linker_dll, shared_option)))
-
- # cygwin and mingw32 need different sets of libraries
- if self.gcc_version == "2.91.57":
-@@ -160,8 +164,12 @@
- raise CompileError, msg
- else: # for other files use the C-compiler
- try:
-- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError, msg:
- raise CompileError, msg
-
-@@ -322,10 +330,15 @@
- self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
- compiler_so='gcc -mno-cygwin -mdll -O -Wall',
- compiler_cxx='g++ -mno-cygwin -O -Wall',
-+ compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
- linker_exe='gcc -mno-cygwin',
- linker_so='%s -mno-cygwin %s %s'
- % (self.linker_dll, shared_option,
-- entry_point))
-+ entry_point),
-+ linker_exe_cxx='g++ -mno-cygwin',
-+ linker_so_cxx='%s -mno-cygwin %s %s'
-+ % (self.linker_dll, shared_option,
-+ entry_point))
- # Maybe we should also append -mthreads, but then the finished
- # dlls need another dll (mingwm10.dll see Mingw32 docs)
- # (-mthreads: Support thread-safe exception handling on `Mingw32')
---- Lib/distutils/emxccompiler.py
-+++ Lib/distutils/emxccompiler.py
-@@ -65,8 +65,12 @@
- # XXX optimization, warnings etc. should be customizable.
- self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
- compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
- linker_exe='gcc -Zomf -Zmt -Zcrtdll',
-- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
-+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
-+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
-+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
-
- # want the gcc library statically linked (so that we don't have
- # to distribute a version dependent on the compiler we have)
-@@ -83,8 +87,12 @@
- raise CompileError, msg
- else: # for other files use the C-compiler
- try:
-- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError, msg:
- raise CompileError, msg
-
---- Lib/distutils/sysconfig.py
-+++ Lib/distutils/sysconfig.py
-@@ -167,9 +167,12 @@
- varies across Unices and is stored in Python's Makefile.
- """
- if compiler.compiler_type == "unix":
-- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \
-- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
-- 'CCSHARED', 'LDSHARED', 'SO')
-+ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext) = \
-+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED',
-+ 'LDCXXSHARED', 'SO')
-+
-+ cflags = ''
-+ cxxflags = ''
-
- if 'CC' in os.environ:
- cc = os.environ['CC']
-@@ -177,28 +180,40 @@
- cxx = os.environ['CXX']
- if 'LDSHARED' in os.environ:
- ldshared = os.environ['LDSHARED']
-+ if 'LDCXXSHARED' in os.environ:
-+ ldcxxshared = os.environ['LDCXXSHARED']
- if 'CPP' in os.environ:
- cpp = os.environ['CPP']
- else:
- cpp = cc + " -E" # not always
- if 'LDFLAGS' in os.environ:
- ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
- if 'CFLAGS' in os.environ:
-- cflags = opt + ' ' + os.environ['CFLAGS']
-+ cflags = os.environ['CFLAGS']
- ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+ if 'CXXFLAGS' in os.environ:
-+ cxxflags = os.environ['CXXFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
- if 'CPPFLAGS' in os.environ:
- cpp = cpp + ' ' + os.environ['CPPFLAGS']
- cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
- ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
-
- cc_cmd = cc + ' ' + cflags
-+ cxx_cmd = cxx + ' ' + cxxflags
- compiler.set_executables(
- preprocessor=cpp,
- compiler=cc_cmd,
- compiler_so=cc_cmd + ' ' + ccshared,
-- compiler_cxx=cxx,
-+ compiler_cxx=cxx_cmd,
-+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
- linker_so=ldshared,
-- linker_exe=cc)
-+ linker_exe=cc,
-+ linker_so_cxx=ldcxxshared,
-+ linker_exe_cxx=cxx)
-
- compiler.shared_lib_extension = so_ext
-
-@@ -546,7 +561,7 @@
- for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
- # a number of derived variables. These need to be
- # patched up as well.
-- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
-+ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
- flags = _config_vars[key]
- flags = re.sub('-arch\s+\w+\s', ' ', flags)
- flags = re.sub('-isysroot [^ \t]*', ' ', flags)
-@@ -565,7 +580,7 @@
- for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
- # a number of derived variables. These need to be
- # patched up as well.
-- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
-+ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
-
- flags = _config_vars[key]
- flags = re.sub('-arch\s+\w+\s', ' ', flags)
-@@ -589,7 +604,7 @@
- for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
- # a number of derived variables. These need to be
- # patched up as well.
-- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
-+ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
-
- flags = _config_vars[key]
- flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags)
---- Lib/distutils/unixccompiler.py
-+++ Lib/distutils/unixccompiler.py
-@@ -114,14 +114,17 @@
- # are pretty generic; they will probably have to be set by an outsider
- # (eg. using information discovered by the sysconfig about building
- # Python extensions).
-- executables = {'preprocessor' : None,
-- 'compiler' : ["cc"],
-- 'compiler_so' : ["cc"],
-- 'compiler_cxx' : ["cc"],
-- 'linker_so' : ["cc", "-shared"],
-- 'linker_exe' : ["cc"],
-- 'archiver' : ["ar", "-cr"],
-- 'ranlib' : None,
-+ executables = {'preprocessor' : None,
-+ 'compiler' : ["cc"],
-+ 'compiler_so' : ["cc"],
-+ 'compiler_cxx' : ["c++"],
-+ 'compiler_so_cxx' : ["c++"],
-+ 'linker_so' : ["cc", "-shared"],
-+ 'linker_exe' : ["cc"],
-+ 'linker_so_cxx' : ["c++", "-shared"],
-+ 'linker_exe_cxx' : ["c++"],
-+ 'archiver' : ["ar", "-cr"],
-+ 'ranlib' : None,
- }
-
- if sys.platform[:6] == "darwin":
-@@ -171,11 +174,18 @@
-
- def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
- compiler_so = self.compiler_so
-+ compiler_so_cxx = self.compiler_so_cxx
- if sys.platform == 'darwin':
- compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs)
-+ compiler_so_cxx = _darwin_compiler_fixup(compiler_so_cxx, cc_args +
-+ extra_postargs)
- try:
-- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError, msg:
- raise CompileError, msg
-
-@@ -232,23 +242,16 @@
- ld_args.extend(extra_postargs)
- self.mkpath(os.path.dirname(output_filename))
- try:
-- if target_desc == CCompiler.EXECUTABLE:
-- linker = self.linker_exe[:]
-+ if target_lang == "c++":
-+ if target_desc == CCompiler.EXECUTABLE:
-+ linker = self.linker_exe_cxx[:]
-+ else:
-+ linker = self.linker_so_cxx[:]
- else:
-- linker = self.linker_so[:]
-- if target_lang == "c++" and self.compiler_cxx:
-- # skip over environment variable settings if /usr/bin/env
-- # is used to set up the linker's environment.
-- # This is needed on OSX. Note: this assumes that the
-- # normal and C++ compiler have the same environment
-- # settings.
-- i = 0
-- if os.path.basename(linker[0]) == "env":
-- i = 1
-- while '=' in linker[i]:
-- i = i + 1
--
-- linker[i] = self.compiler_cxx[i]
-+ if target_desc == CCompiler.EXECUTABLE:
-+ linker = self.linker_exe[:]
-+ else:
-+ linker = self.linker_so[:]
-
- if sys.platform == 'darwin':
- linker = _darwin_compiler_fixup(linker, ld_args)
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -104,6 +104,7 @@
- SO= @SO@
- LDSHARED= @LDSHARED@
- BLDSHARED= @BLDSHARED@
-+LDCXXSHARED= @LDCXXSHARED@
- DESTSHARED= $(BINLIBDEST)/lib-dynload
-
- # Executable suffix (.exe on Windows and Mac OS X)
-@@ -397,7 +398,7 @@
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
- @case $$MAKEFLAGS in \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
-+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
- esac
-
- # Build the platform-specific modules
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
deleted file mode 100644
index 1321c3c..0000000
--- a/dev-lang/python/files/2.6/22_all_turkish_locale.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=250075
-http://bugs.python.org/issue1813
-
---- Lib/decimal.py
-+++ Lib/decimal.py
-@@ -153,6 +153,13 @@
- ROUND_HALF_DOWN = 'ROUND_HALF_DOWN'
- ROUND_05UP = 'ROUND_05UP'
-
-+import string
-+
-+def ascii_upper(s):
-+ trans_table = string.maketrans(string.ascii_lowercase, string.ascii_uppercase)
-+ return s.translate(trans_table)
-+
-+
- # Errors
-
- class DecimalException(ArithmeticError):
-@@ -3645,7 +3652,7 @@
- if name.startswith('_round_')]
- for name in rounding_functions:
- # name is like _round_half_even, goes to the global ROUND_HALF_EVEN value.
-- globalname = name[1:].upper()
-+ globalname = ascii_upper(name[1:])
- val = globals()[globalname]
- Decimal._pick_rounding_function[val] = name
-
---- Lib/email/__init__.py
-+++ Lib/email/__init__.py
-@@ -109,15 +109,19 @@
- 'Text',
- ]
-
-+import string
-+lower_map = string.maketrans(string.ascii_uppercase, string.ascii_lowercase)
-+
-+
- for _name in _LOWERNAMES:
-- importer = LazyImporter(_name.lower())
-+ importer = LazyImporter(_name.translate(lower_map))
- sys.modules['email.' + _name] = importer
- setattr(sys.modules['email'], _name, importer)
-
-
- import email.mime
- for _name in _MIMENAMES:
-- importer = LazyImporter('mime.' + _name.lower())
-+ importer = LazyImporter('mime.' + _name.translate(lower_map))
- sys.modules['email.MIME' + _name] = importer
- setattr(sys.modules['email'], 'MIME' + _name, importer)
- setattr(sys.modules['email.mime'], _name, importer)
---- Lib/locale.py
-+++ Lib/locale.py
-@@ -313,6 +313,14 @@
- # overridden below)
- _setlocale = setlocale
-
-+# Avoid relying on the locale-dependent .lower() method
-+# (see bug #1813).
-+_ascii_lower_map = ''.join(
-+ chr(x + 32 if x >= ord('A') and x <= ord('Z') else x)
-+ for x in range(256)
-+)
-+
-+
- def normalize(localename):
-
- """ Returns a normalized locale code for the given locale
-@@ -330,7 +338,7 @@
-
- """
- # Normalize the locale name and extract the encoding
-- fullname = localename.lower()
-+ fullname = localename.encode('ascii').translate(_ascii_lower_map)
- if ':' in fullname:
- # ':' is sometimes used as encoding delimiter.
- fullname = fullname.replace(':', '.')
---- Lib/test/test_codecs.py
-+++ Lib/test/test_codecs.py
-@@ -1,5 +1,6 @@
- from test import test_support
- import unittest
-+import locale
- import codecs
- import sys, StringIO, _testcapi
-
-@@ -1133,6 +1134,16 @@
- self.assertRaises(LookupError, codecs.lookup, "__spam__")
- self.assertRaises(LookupError, codecs.lookup, " ")
-
-+ def test_lookup_with_locale(self):
-+ # Bug #1813: when normalizing codec name, lowercasing must be locale
-+ # agnostic, otherwise the looked up codec name might end up wrong.
-+ try:
-+ locale.setlocale(locale.LC_CTYPE, 'tr')
-+ except locale.Error:
-+ # SKIPped test
-+ return
-+ codecs.lookup('ISO8859_1')
-+
- def test_getencoder(self):
- self.assertRaises(TypeError, codecs.getencoder)
- self.assertRaises(LookupError, codecs.getencoder, "__spam__")
---- Python/codecs.c
-+++ Python/codecs.c
-@@ -45,6 +45,12 @@
- return -1;
- }
-
-+/* isupper() forced into the ASCII locale */
-+#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A))
-+/* tolower() forced into the ASCII locale */
-+#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x))
-+
-+
- /* Convert a string to a normalized Python string: all characters are
- converted to lower case, spaces are replaced with underscores. */
-
-@@ -70,7 +76,7 @@
- if (ch == ' ')
- ch = '-';
- else
-- ch = tolower(Py_CHARMASK(ch));
-+ ch = ascii_tolower(Py_CHARMASK(ch));
- p[i] = ch;
- }
- return v;
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
deleted file mode 100644
index e373281..0000000
--- a/dev-lang/python/files/2.6/23_all_arm_OABI.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=266703
-http://bugs.python.org/issue1762561
-
---- Objects/floatobject.c
-+++ Objects/floatobject.c
-@@ -1691,9 +1691,18 @@
- /* this is for the benefit of the pack/unpack routines below */
-
- typedef enum {
-- unknown_format, ieee_big_endian_format, ieee_little_endian_format
-+ unknown_format,
-+ ieee_big_endian_format,
-+ ieee_little_endian_format,
-+ ieee_arm_mixed_endian_format
- } float_format_type;
-
-+/* byte order of a C double for each of the recognised IEEE formats */
-+
-+static const unsigned char BIG_ENDIAN_BYTEORDER[8] = {7,6,5,4,3,2,1,0};
-+static const unsigned char LITTLE_ENDIAN_BYTEORDER[8] = {0,1,2,3,4,5,6,7};
-+static const unsigned char ARM_MIXED_ENDIAN_BYTEORDER[8] = {4,5,6,7,0,1,2,3};
-+
- static float_format_type double_format, float_format;
- static float_format_type detected_double_format, detected_float_format;
-
-@@ -1730,6 +1739,8 @@
- return PyString_FromString("IEEE, little-endian");
- case ieee_big_endian_format:
- return PyString_FromString("IEEE, big-endian");
-+ case ieee_arm_mixed_endian_format:
-+ return PyString_FromString("IEEE, ARM mixed-endian");
- default:
- Py_FatalError("insane float_format or double_format");
- return NULL;
-@@ -1743,8 +1754,9 @@
- "used in Python's test suite.\n"
- "\n"
- "typestr must be 'double' or 'float'. This function returns whichever of\n"
--"'unknown', 'IEEE, big-endian' or 'IEEE, little-endian' best describes the\n"
--"format of floating point numbers used by the C type named by typestr.");
-+"'unknown', 'IEEE, big-endian', 'IEEE, little-endian' or\n"
-+"'IEEE, ARM mixed-endian' best describes the format of floating-point\n"
-+"numbers used by the C type named by typestr.");
-
- static PyObject *
- float_setformat(PyTypeObject *v, PyObject* args)
-@@ -1782,11 +1794,15 @@
- else if (strcmp(format, "IEEE, big-endian") == 0) {
- f = ieee_big_endian_format;
- }
-+ else if (strcmp(format, "IEEE, ARM mixed-endian") == 0 &&
-+ p == &double_format) {
-+ f = ieee_arm_mixed_endian_format;
-+ }
- else {
- PyErr_SetString(PyExc_ValueError,
- "__setformat__() argument 2 must be "
-- "'unknown', 'IEEE, little-endian' or "
-- "'IEEE, big-endian'");
-+ "'unknown', 'IEEE, little-endian', "
-+ "'IEEE, big-endian' or 'IEEE, ARM mixed-endian'");
- return NULL;
-
- }
-@@ -1809,8 +1825,10 @@
- "used in Python's test suite.\n"
- "\n"
- "typestr must be 'double' or 'float'. fmt must be one of 'unknown',\n"
--"'IEEE, big-endian' or 'IEEE, little-endian', and in addition can only be\n"
--"one of the latter two if it appears to match the underlying C reality.\n"
-+"'IEEE, big-endian', 'IEEE, little-endian' or 'IEEE, ARM mixed-endian'\n"
-+"and in addition can only be one of the last three if it appears to\n"
-+"match the underlying C reality. Note that the ARM mixed-endian\n"
-+"format can only be set for the 'double' type, not for 'float'.\n"
- "\n"
- "Overrides the automatic determination of C-level floating point type.\n"
- "This affects how floats are converted to and from binary strings.");
-@@ -2005,7 +2023,11 @@
- Note that if we're on some whacked-out platform which uses
- IEEE formats but isn't strictly little-endian or big-
- endian, we will fall back to the portable shifts & masks
-- method. */
-+ method.
-+
-+ Addendum: We also attempt to detect the mixed-endian IEEE format
-+ used by the ARM old ABI (OABI) and also used by the FPA
-+ floating-point unit on some older ARM processors. */
-
- #if SIZEOF_DOUBLE == 8
- {
-@@ -2014,6 +2036,8 @@
- detected_double_format = ieee_big_endian_format;
- else if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
- detected_double_format = ieee_little_endian_format;
-+ else if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
-+ detected_double_format = ieee_arm_mixed_endian_format;
- else
- detected_double_format = unknown_format;
- }
-@@ -2353,17 +2377,31 @@
- }
- else {
- const char *s = (char*)&x;
-- int i, incr = 1;
-+ int i;
-+ const unsigned char *byteorder;
-
-- if ((double_format == ieee_little_endian_format && !le)
-- || (double_format == ieee_big_endian_format && le)) {
-- p += 7;
-- incr = -1;
-+ switch (double_format) {
-+ case ieee_little_endian_format:
-+ byteorder = LITTLE_ENDIAN_BYTEORDER;
-+ break;
-+ case ieee_big_endian_format:
-+ byteorder = BIG_ENDIAN_BYTEORDER;
-+ break;
-+ case ieee_arm_mixed_endian_format:
-+ byteorder = ARM_MIXED_ENDIAN_BYTEORDER;
-+ break;
-+ default:
-+ Py_FatalError("insane float_format or double_format");
-+ return -1;
- }
-
-- for (i = 0; i < 8; i++) {
-- *p = *s++;
-- p += incr;
-+ if (le) {
-+ for (i = 0; i < 8; i++)
-+ p[byteorder[i]] = *s++;
-+ }
-+ else {
-+ for (i = 0; i < 8; i++)
-+ p[7-byteorder[i]] = *s++;
- }
- return 0;
- }
-@@ -2522,22 +2560,33 @@
- }
- else {
- double x;
-+ char *s = (char*)&x;
-+ const unsigned char *byteorder;
-+ int i;
-+
-+ switch (double_format) {
-+ case ieee_little_endian_format:
-+ byteorder = LITTLE_ENDIAN_BYTEORDER;
-+ break;
-+ case ieee_big_endian_format:
-+ byteorder = BIG_ENDIAN_BYTEORDER;
-+ break;
-+ case ieee_arm_mixed_endian_format:
-+ byteorder = ARM_MIXED_ENDIAN_BYTEORDER;
-+ break;
-+ default:
-+ Py_FatalError("insane float_format or double_format");
-+ return -1.0;
-+ }
-
-- if ((double_format == ieee_little_endian_format && !le)
-- || (double_format == ieee_big_endian_format && le)) {
-- char buf[8];
-- char *d = &buf[7];
-- int i;
--
-- for (i = 0; i < 8; i++) {
-- *d-- = *p++;
-- }
-- memcpy(&x, buf, 8);
-+ if (le) {
-+ for (i=0; i<8; i++)
-+ *s++ = p[byteorder[i]];
- }
- else {
-- memcpy(&x, p, 8);
-+ for (i=0; i<8; i++)
-+ *s++ = p[7-byteorder[i]];
- }
--
- return x;
- }
- }
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
deleted file mode 100644
index 918d97c..0000000
--- a/dev-lang/python/files/2.6/24_all_ctypes_mmap_wx.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=329499
-http://bugs.python.org/issue5504
-http://hg.python.org/cpython/rev/e13ea83e2edb
-
---- Modules/_ctypes/callbacks.c
-+++ Modules/_ctypes/callbacks.c
-@@ -21,8 +21,8 @@
- Py_XDECREF(self->converters);
- Py_XDECREF(self->callable);
- Py_XDECREF(self->restype);
-- if (self->pcl)
-- FreeClosure(self->pcl);
-+ if (self->pcl_write)
-+ ffi_closure_free(self->pcl_write);
- PyObject_GC_Del(self);
- }
-
-@@ -373,7 +373,8 @@
- return NULL;
- }
-
-- p->pcl = NULL;
-+ p->pcl_exec = NULL;
-+ p->pcl_write = NULL;
- memset(&p->cif, 0, sizeof(p->cif));
- p->converters = NULL;
- p->callable = NULL;
-@@ -403,8 +404,9 @@
-
- assert(CThunk_CheckExact(p));
-
-- p->pcl = MallocClosure();
-- if (p->pcl == NULL) {
-+ p->pcl_write = ffi_closure_alloc(sizeof(ffi_closure),
-+ &p->pcl_exec);
-+ if (p->pcl_write == NULL) {
- PyErr_NoMemory();
- goto error;
- }
-@@ -449,7 +451,9 @@
- "ffi_prep_cif failed with %d", result);
- goto error;
- }
-- result = ffi_prep_closure(p->pcl, &p->cif, closure_fcn, p);
-+ result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn,
-+ p,
-+ p->pcl_exec);
- if (result != FFI_OK) {
- PyErr_Format(PyExc_RuntimeError,
- "ffi_prep_closure failed with %d", result);
---- Modules/_ctypes/_ctypes.c
-+++ Modules/_ctypes/_ctypes.c
-@@ -3443,7 +3443,7 @@
- self->callable = callable;
-
- self->thunk = thunk;
-- *(void **)self->b_ptr = (void *)thunk->pcl;
-+ *(void **)self->b_ptr = (void *)thunk->pcl_exec;
-
- Py_INCREF((PyObject *)thunk); /* for KeepRef */
- if (-1 == KeepRef((CDataObject *)self, 0, (PyObject *)thunk)) {
---- Modules/_ctypes/ctypes.h
-+++ Modules/_ctypes/ctypes.h
-@@ -95,7 +95,8 @@
-
- typedef struct {
- PyObject_VAR_HEAD
-- ffi_closure *pcl; /* the C callable */
-+ ffi_closure *pcl_write; /* the C callable, writeable */
-+ void *pcl_exec; /* the C callable, executable */
- ffi_cif cif;
- int flags;
- PyObject *converters;
-@@ -427,9 +428,6 @@
-
- #endif
-
--extern void FreeClosure(void *);
--extern void *MallocClosure(void);
--
- extern void _AddTraceback(char *, char *, int);
-
- extern PyObject *CData_FromBaseObj(PyObject *type, PyObject *base, Py_ssize_t index, char *adr);
---- Modules/_ctypes/malloc_closure.c
-+++ Modules/_ctypes/malloc_closure.c
-@@ -93,7 +93,7 @@
- /******************************************************************/
-
- /* put the item back into the free list */
--void FreeClosure(void *p)
-+void ffi_closure_free(void *p)
- {
- ITEM *item = (ITEM *)p;
- item->next = free_list;
-@@ -101,7 +101,7 @@
- }
-
- /* return one item from the free list, allocating more if needed */
--void *MallocClosure(void)
-+void *ffi_closure_alloc(size_t ignored, void** codeloc)
- {
- ITEM *item;
- if (!free_list)
-@@ -110,5 +110,7 @@
- return NULL;
- item = free_list;
- free_list = item->next;
-- return item;
-+ *codeloc = (void *)item;
-+ return (void *)item;
- }
-+
---- setup.py
-+++ setup.py
-@@ -1885,8 +1885,7 @@
- '_ctypes/callbacks.c',
- '_ctypes/callproc.c',
- '_ctypes/stgdict.c',
-- '_ctypes/cfield.c',
-- '_ctypes/malloc_closure.c']
-+ '_ctypes/cfield.c']
- depends = ['_ctypes/ctypes.h']
-
- if sys.platform == 'darwin':
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
deleted file mode 100644
index 85c991b..0000000
--- a/dev-lang/python/files/2.6/25_all_gdbm-1.9.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-http://bugs.python.org/issue13007
-http://hg.python.org/cpython/rev/14cafb8d1480
-
---- Lib/whichdb.py
-+++ Lib/whichdb.py
-@@ -91,7 +91,7 @@
- return ""
-
- # Check for GNU dbm
-- if magic == 0x13579ace:
-+ if magic in (0x13579ace, 0x13579acd, 0x13579acf):
- return "gdbm"
-
- # Check for old Berkeley db hash file format v2
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
deleted file mode 100644
index 9872136..0000000
--- a/dev-lang/python/files/2.6/26_all_expat-2.1.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://bugs.python.org/issue9054
-http://hg.python.org/cpython/rev/5b536c90ca36
-
---- Modules/pyexpat.c
-+++ Modules/pyexpat.c
-@@ -456,6 +456,9 @@
- PyObject *args;
- PyObject *temp;
-
-+ if (!have_handler(self, CharacterData))
-+ return -1;
-+
- args = PyTuple_New(1);
- if (args == NULL)
- return -1;
diff --git a/dev-lang/python/files/2.6/41_all_crosscompile.patch b/dev-lang/python/files/2.6/41_all_crosscompile.patch
deleted file mode 100644
index a398769..0000000
--- a/dev-lang/python/files/2.6/41_all_crosscompile.patch
+++ /dev/null
@@ -1,113 +0,0 @@
---- configure.in
-+++ configure.in
-@@ -3905,7 +3905,7 @@
- AC_MSG_RESULT(no)
- fi
-
--AC_MSG_CHECKING(for %zd printf() format support)
-+AC_CACHE_CHECK([for %zd printf() format support], [py_cv_has_zd_printf], [dnl
- AC_TRY_RUN([#include <stdio.h>
- #include <stddef.h>
- #include <string.h>
-@@ -3939,10 +3939,13 @@
- return 1;
-
- return 0;
--}],
--[AC_MSG_RESULT(yes)
-- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
-- AC_MSG_RESULT(no))
-+}], [py_cv_has_zd_printf="yes"],
-+ [py_cv_has_zd_printf="no"],
-+ [py_cv_has_zd_printf="cross -- assuming yes"]
-+)])
-+if test "$py_cv_has_zd_printf" != "no" ; then
-+ AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])
-+fi
-
- AC_CHECK_TYPE(socklen_t,,
- AC_DEFINE(socklen_t,int,
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -176,6 +176,7 @@
-
- PYTHON= python$(EXE)
- BUILDPYTHON= python$(BUILDEXE)
-+HOSTPYTHON= $(BUILDPYTHON)
-
- # The task to run while instrument when building the profile-opt target
- PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-@@ -209,6 +210,7 @@
- # Parser
- PGEN= Parser/pgen$(EXE)
-
-+HOSTPGEN= $(PGEN)$(EXE)
- POBJS= \
- Parser/acceler.o \
- Parser/grammar1.o \
-@@ -398,7 +400,7 @@
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
- @case $$MAKEFLAGS in \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
-+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS)' ./$(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
- esac
-
- # Build the platform-specific modules
-@@ -540,7 +542,7 @@
-
- $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
- -@$(INSTALL) -d Include
-- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-
- $(PGEN): $(PGENOBJS)
- $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
-@@ -923,23 +925,23 @@
- done
- $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-+ ./$(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ ./$(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-+ ./$(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ ./$(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-+ ./$(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-
- # Install the include files
- INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
-@@ -1015,7 +1017,7 @@
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall:
-- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
-+ $(RUNSHARED) ./$(HOSTPYTHON) -E $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
---- setup.py
-+++ setup.py
-@@ -334,6 +334,7 @@
- try:
- imp.load_dynamic(ext.name, ext_filename)
- except ImportError, why:
-+ return
- self.failed.append(ext.name)
- self.announce('*** WARNING: renaming "%s" since importing it'
- ' failed: %s' % (ext.name, why), level=3)
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
deleted file mode 100644
index 757299b..0000000
--- a/dev-lang/python/files/2.6/62_all_xml.use_pyxml.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- Lib/xml/__init__.py
-+++ Lib/xml/__init__.py
-@@ -28,20 +28,23 @@
- _MINIMUM_XMLPLUS_VERSION = (0, 8, 4)
-
-
--try:
-+def use_pyxml():
- import _xmlplus
--except ImportError:
-- pass
--else:
-- try:
-- v = _xmlplus.version_info
-- except AttributeError:
-- # _xmlplus is too old; ignore it
-- pass
-+ v = _xmlplus.version_info
-+ if v >= _MINIMUM_XMLPLUS_VERSION:
-+ import sys
-+ _xmlplus.__path__.extend(__path__)
-+ sys.modules[__name__] = _xmlplus
-+ cleared_modules = []
-+ redefined_modules = []
-+ for module in sys.modules:
-+ if module.startswith("xml.") and not module.startswith(("xml.marshal", "xml.schema", "xml.utils", "xml.xpath", "xml.xslt")):
-+ cleared_modules.append(module)
-+ if module.startswith(("xml.__init__", "xml.dom", "xml.parsers", "xml.sax")) and sys.modules[module] is not None:
-+ redefined_modules.append(module)
-+ for module in cleared_modules:
-+ del sys.modules[module]
-+ for module in sorted(redefined_modules):
-+ __import__(module)
- else:
-- if v >= _MINIMUM_XMLPLUS_VERSION:
-- import sys
-- _xmlplus.__path__.extend(__path__)
-- sys.modules[__name__] = _xmlplus
-- else:
-- del v
-+ raise ImportError("PyXML too old: %s" % ".".join(str(x) for x in v))
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
deleted file mode 100644
index b63f4c7..0000000
--- a/dev-lang/python/files/2.6/81_all_use_new_readline_function_types__closes__20374_.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1390541532 18000
-# Fri Jan 24 00:32:12 2014 -0500
-# Branch 2.7
-# Node ID 79b82ebc4fd17fda401c32840da1da0577e3c73e
-# Parent f28b60141c5c417111670a22b223f0c411136c7b
-use new readline function types (closes #20374)
-
-diff --git a/Modules/readline.c b/Modules/readline.c
---- a/Modules/readline.c
-+++ b/Modules/readline.c
-@@ -911,12 +911,12 @@
- rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
- rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
- /* Set our hook functions */
-- rl_startup_hook = (Function *)on_startup_hook;
-+ rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
- #ifdef HAVE_RL_PRE_INPUT_HOOK
-- rl_pre_input_hook = (Function *)on_pre_input_hook;
-+ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
- #endif
- /* Set our completion function */
-- rl_attempted_completion_function = (CPPFunction *)flex_complete;
-+ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
- /* Set Python word break characters */
- completer_word_break_characters =
- rl_completer_word_break_characters =
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
deleted file mode 100644
index 71ac4b1..0000000
--- a/dev-lang/python/files/2.6/82_all_new_plan__just_remove_typecasts__closes__20374_.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1390581856 18000
-# Fri Jan 24 11:44:16 2014 -0500
-# Branch 2.7
-# Node ID 5e42e5764ac6277d61c0af231d402f59c223c91a
-# Parent 79b82ebc4fd17fda401c32840da1da0577e3c73e
-new plan: just remove typecasts (closes #20374)
-
-diff --git a/Modules/readline.c b/Modules/readline.c
---- a/Modules/readline.c
-+++ b/Modules/readline.c
-@@ -852,7 +852,7 @@
- * before calling the normal completer */
-
- static char **
--flex_complete(char *text, int start, int end)
-+flex_complete(const char *text, int start, int end)
- {
- #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
- rl_completion_append_character ='\0';
-@@ -911,12 +911,12 @@
- rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
- rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
- /* Set our hook functions */
-- rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
-+ rl_startup_hook = on_startup_hook;
- #ifdef HAVE_RL_PRE_INPUT_HOOK
-- rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
-+ rl_pre_input_hook = on_pre_input_hook;
- #endif
- /* Set our completion function */
-- rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
-+ rl_attempted_completion_function = flex_complete;
- /* Set Python word break characters */
- completer_word_break_characters =
- rl_completer_word_break_characters =
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
deleted file mode 100644
index 9934b80..0000000
--- a/dev-lang/python/files/2.6/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-# HG changeset patch
-# User Ned Deily <nad@acm.org>
-# Date 1391647946 28800
-# Wed Feb 05 16:52:26 2014 -0800
-# Branch 2.7
-# Node ID 0b5b0bfcc7b1dba77ee70ec6abba9037abf93acb
-# Parent 48c5c18110ae810c09b176f4cedf228cc3487451
-Issue #20374: Avoid compiler warnings when compiling readline with libedit.
-
-diff --git a/Modules/readline.c b/Modules/readline.c
---- a/Modules/readline.c
-+++ b/Modules/readline.c
-@@ -749,15 +749,24 @@
- return result;
- }
-
-+
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_startup_hook(void)
-+#else
-+on_startup_hook()
-+#endif
- {
- return on_hook(startup_hook);
- }
-
- #ifdef HAVE_RL_PRE_INPUT_HOOK
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_pre_input_hook(void)
-+#else
-+on_pre_input_hook()
-+#endif
- {
- return on_hook(pre_input_hook);
- }
diff --git a/dev-lang/python/files/2.6/99_all_tcl86.patch b/dev-lang/python/files/2.6/99_all_tcl86.patch
deleted file mode 100644
index 2362e98..0000000
--- a/dev-lang/python/files/2.6/99_all_tcl86.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -1518,7 +1518,7 @@
- # The versions with dots are used on Unix, and the versions without
- # dots on Windows, for detection by cygwin.
- tcllib = tklib = tcl_includes = tk_includes = None
-- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
-+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83', '8.2',
- '82', '8.1', '81', '8.0', '80']:
- tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
- tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
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
deleted file mode 100644
index 82ee2cd..0000000
--- a/dev-lang/python/files/3.2/01_all_static_library_location.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Install libpythonX.Y.a in /usr/lib instead of /usr/lib/pythonX.Y/config.
-https://bugs.gentoo.org/show_bug.cgi?id=252372
-http://bugs.python.org/issue6103
-
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -901,6 +901,19 @@
- fi; \
- else true; \
- fi
-+ @if test -f $(LIBRARY) && test $(LIBRARY) != $(LDLIBRARY); then \
-+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
-+ if test "$(SHLIB_SUFFIX)" = .dll; then \
-+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR); \
-+ else \
-+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR); \
-+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY); \
-+ fi; \
-+ else \
-+ echo "Skipped install of $(LIBRARY) - use make frameworkinstall"; \
-+ fi; \
-+ else true; \
-+ fi
-
- bininstall: altbininstall
- -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \
-@@ -1103,18 +1116,6 @@
- else true; \
- fi; \
- done
-- @if test -d $(LIBRARY); then :; else \
-- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
-- if test "$(SHLIB_SUFFIX)" = .dll; then \
-- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
-- else \
-- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- fi; \
-- else \
-- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
-- fi; \
-- fi
- $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
- $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
- $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
---- Misc/python-config.in
-+++ Misc/python-config.in
-@@ -47,11 +47,7 @@
- elif opt in ('--libs', '--ldflags'):
- libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
- libs.append('-lpython' + pyver + sys.abiflags)
-- # add the prefix/lib/pythonX.Y/config dir, but only if there is no
-- # shared library in prefix/lib/.
- if opt == '--ldflags':
-- if not getvar('Py_ENABLE_SHARED'):
-- libs.insert(0, '-L' + getvar('LIBPL'))
- if not getvar('PYTHONFRAMEWORK'):
- libs.extend(getvar('LINKFORSHARED').split())
- print(' '.join(libs))
---- Modules/makesetup
-+++ Modules/makesetup
-@@ -89,7 +89,7 @@
- then
- ExtraLibDir=.
- else
-- ExtraLibDir='$(LIBPL)'
-+ ExtraLibDir='$(LIBDIR)'
- fi
- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
- esac
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
deleted file mode 100644
index 51bc0da..0000000
--- a/dev-lang/python/files/3.2/02_all_disable_modules_and_ssl.patch
+++ /dev/null
@@ -1,89 +0,0 @@
---- setup.py
-+++ setup.py
-@@ -21,7 +21,17 @@
- COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
-
- # This global variable is used to hold the list of modules to be disabled.
--disabled_module_list = []
-+pdm_env = "PYTHON_DISABLE_MODULES"
-+if pdm_env in os.environ:
-+ disabled_module_list = os.environ[pdm_env].split()
-+else:
-+ disabled_module_list = []
-+
-+pds_env = "PYTHON_DISABLE_SSL"
-+if pds_env in os.environ:
-+ disable_ssl = os.environ[pds_env]
-+else:
-+ disable_ssl = 0
-
- # File which contains the directory for shared mods (for sys.path fixup
- # when running from the build dir, see Modules/getpath.c)
-@@ -410,6 +420,7 @@
- os.unlink(tmpfile)
-
- def detect_modules(self):
-+ global disable_ssl
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
-@@ -699,7 +710,7 @@
- ssl_incs = find_file('openssl/ssl.h', inc_dirs,
- search_for_ssl_incs_in
- )
-- if ssl_incs is not None:
-+ if ssl_incs is not None and not disable_ssl:
- krb5_h = find_file('krb5.h', inc_dirs,
- ['/usr/kerberos/include'])
- if krb5_h:
-@@ -710,7 +721,8 @@
- ] )
-
- if (ssl_incs is not None and
-- ssl_libs is not None):
-+ ssl_libs is not None and
-+ not disable_ssl):
- exts.append( Extension('_ssl', ['_ssl.c'],
- include_dirs = ssl_incs,
- library_dirs = ssl_libs,
-@@ -743,7 +755,7 @@
-
- #print('openssl_ver = 0x%08x' % openssl_ver)
- min_openssl_ver = 0x00907000
-- have_any_openssl = ssl_incs is not None and ssl_libs is not None
-+ have_any_openssl = ssl_incs is not None and ssl_libs is not None and not disable_ssl
- have_usable_openssl = (have_any_openssl and
- openssl_ver >= min_openssl_ver)
-
-@@ -761,20 +773,17 @@
- openssl_ver)
- missing.append('_hashlib')
-
-- min_sha2_openssl_ver = 0x00908000
-- if COMPILED_WITH_PYDEBUG or openssl_ver < min_sha2_openssl_ver:
-- # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
-- exts.append( Extension('_sha256', ['sha256module.c'],
-- depends=['hashlib.h']) )
-- exts.append( Extension('_sha512', ['sha512module.c'],
-- depends=['hashlib.h']) )
--
-- if COMPILED_WITH_PYDEBUG or not have_usable_openssl:
-- # no openssl at all, use our own md5 and sha1
-- exts.append( Extension('_md5', ['md5module.c'],
-- depends=['hashlib.h']) )
-- exts.append( Extension('_sha1', ['sha1module.c'],
-- depends=['hashlib.h']) )
-+ ### Build these unconditionally so emerge won't fail
-+ ### when openssl is dropped/broken etc.
-+ exts.append( Extension('_sha256', ['sha256module.c'],
-+ depends=['hashlib.h']) )
-+ exts.append( Extension('_sha512', ['sha512module.c'],
-+ depends=['hashlib.h']) )
-+
-+ exts.append( Extension('_md5', ['md5module.c'],
-+ depends=['hashlib.h']) )
-+ exts.append( Extension('_sha1', ['sha1module.c'],
-+ depends=['hashlib.h']) )
-
- # Modules that provide persistent dictionary-like semantics. You will
- # probably want to arrange for at least one of them to be available on
diff --git a/dev-lang/python/files/3.2/03_all_libdir.patch b/dev-lang/python/files/3.2/03_all_libdir.patch
deleted file mode 100644
index 613114a..0000000
--- a/dev-lang/python/files/3.2/03_all_libdir.patch
+++ /dev/null
@@ -1,174 +0,0 @@
---- Lib/distutils/command/install.py
-+++ Lib/distutils/command/install.py
-@@ -44,8 +44,8 @@
-
- INSTALL_SCHEMES = {
- 'unix_prefix': {
-- 'purelib': '$base/lib/python$py_version_short/site-packages',
-- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
-+ 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
-+ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
- 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
- 'scripts': '$base/bin',
- 'data' : '$base',
---- Lib/distutils/sysconfig.py
-+++ Lib/distutils/sysconfig.py
-@@ -123,7 +123,7 @@
-
- if os.name == "posix":
- libpython = os.path.join(prefix,
-- "lib", "python" + get_python_version())
-+ "@@GENTOO_LIBDIR@@", "python" + get_python_version())
- if standard_lib:
- return libpython
- else:
---- Lib/site.py
-+++ Lib/site.py
-@@ -285,10 +285,10 @@
- if sys.platform in ('os2emx', 'riscos'):
- sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
- elif os.sep == '/':
-- sitepackages.append(os.path.join(prefix, "lib",
-+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@",
- "python" + sys.version[:3],
- "site-packages"))
-- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python"))
- else:
- sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
---- Lib/sysconfig.py
-+++ Lib/sysconfig.py
-@@ -21,10 +21,10 @@
-
- _INSTALL_SCHEMES = {
- 'posix_prefix': {
-- 'stdlib': '{base}/lib/python{py_version_short}',
-- 'platstdlib': '{platbase}/lib/python{py_version_short}',
-- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
-+ 'stdlib': '{base}/@@GENTOO_LIBDIR@@/python{py_version_short}',
-+ 'platstdlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
-+ 'purelib': '{base}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
-+ 'platlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
- 'include':
- '{base}/include/python{py_version_short}{abiflags}',
- 'platinclude':
-@@ -81,10 +81,10 @@
- 'data' : '{userbase}',
- },
- 'posix_user': {
-- 'stdlib': '{userbase}/lib/python{py_version_short}',
-- 'platstdlib': '{userbase}/lib/python{py_version_short}',
-- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
-+ 'stdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
-+ 'platstdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
-+ 'purelib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
-+ 'platlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
- 'include': '{userbase}/include/python{py_version_short}',
- 'scripts': '{userbase}/bin',
- 'data' : '{userbase}',
---- Lib/test/test_site.py
-+++ Lib/test/test_site.py
-@@ -237,10 +237,10 @@
- elif os.sep == '/':
- # OS X non-framwework builds, Linux, FreeBSD, etc
- self.assertEqual(len(dirs), 2)
-- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
-+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'python' + sys.version[:3],
- 'site-packages')
- self.assertEqual(dirs[0], wanted)
-- wanted = os.path.join('xoxo', 'lib', 'site-python')
-+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'site-python')
- self.assertEqual(dirs[1], wanted)
- else:
- # other platforms
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -115,7 +115,7 @@
- MANDIR= @mandir@
- INCLUDEDIR= @includedir@
- CONFINCLUDEDIR= $(exec_prefix)/include
--SCRIPTDIR= $(prefix)/lib
-+SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@
- ABIFLAGS= @ABIFLAGS@
-
- # Detailed destination directories
---- Modules/getpath.c
-+++ Modules/getpath.c
-@@ -122,8 +122,8 @@
- #endif
-
- #ifndef PYTHONPATH
--#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
-- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
-+#define PYTHONPATH PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION ":" \
-+ EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload"
- #endif
-
- #ifndef LANDMARK
-@@ -135,7 +135,7 @@
- static wchar_t progpath[MAXPATHLEN+1];
- static wchar_t *module_search_path = NULL;
- static int module_search_path_malloced = 0;
--static wchar_t *lib_python = L"lib/python" VERSION;
-+static wchar_t *lib_python = L"@@GENTOO_LIBDIR@@/python" VERSION;
-
- static void
- reduce(wchar_t *dir)
-@@ -583,7 +583,7 @@
- }
- else
- wcsncpy(zip_path, _prefix, MAXPATHLEN);
-- joinpath(zip_path, L"lib/python00.zip");
-+ joinpath(zip_path, L"@@GENTOO_LIBDIR@@/python00.zip");
- bufsz = wcslen(zip_path); /* Replace "00" with version */
- zip_path[bufsz - 6] = VERSION[0];
- zip_path[bufsz - 5] = VERSION[2];
-@@ -593,7 +593,7 @@
- fprintf(stderr,
- "Could not find platform dependent libraries <exec_prefix>\n");
- wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
-- joinpath(exec_prefix, L"lib/lib-dynload");
-+ joinpath(exec_prefix, L"@@GENTOO_LIBDIR@@/lib-dynload");
- }
- /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
-
---- Modules/Setup.dist
-+++ Modules/Setup.dist
-@@ -352,7 +352,7 @@
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.gzip.org/zlib/
--#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
-
- # Interface to the Expat XML parser
- #
---- setup.py
-+++ setup.py
-@@ -477,8 +477,7 @@
- # if a file is found in one of those directories, it can
- # be assumed that no additional -I,-L directives are needed.
- lib_dirs = self.compiler.library_dirs + [
-- '/lib64', '/usr/lib64',
-- '/lib', '/usr/lib',
-+ '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
- ]
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
- exts = []
-@@ -675,11 +674,11 @@
- elif curses_library:
- readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
-+ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
- 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
-- library_dirs=['/usr/lib/termcap'],
-+ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
- extra_link_args=readline_extra_link_args,
- libraries=readline_libs) )
- else:
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
deleted file mode 100644
index 8b7ccd8..0000000
--- a/dev-lang/python/files/3.2/04_all_non-zero_exit_status_on_failure.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=281968
-http://bugs.python.org/issue6731
-
---- setup.py
-+++ setup.py
-@@ -37,6 +37,8 @@
- # when running from the build dir, see Modules/getpath.c)
- _BUILDDIR_COOKIE = "pybuilddir.txt"
-
-+exit_status = 0
-+
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (after any relative
- directories) if:
-@@ -284,6 +286,8 @@
- print()
-
- if self.failed:
-+ global exit_status
-+ exit_status = 1
- failed = self.failed[:]
- print()
- print("Failed to build these modules:")
-@@ -1946,6 +1950,7 @@
- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
- "Tools/scripts/2to3"]
- )
-+ sys.exit(exit_status)
-
- # --install-platlib
- if __name__ == '__main__':
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
deleted file mode 100644
index 0bc3fe6..0000000
--- a/dev-lang/python/files/3.2/05_all_regenerate_platform-specific_modules.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-http://bugs.python.org/issue12619
-
---- Lib/plat-aix4/regen
-+++ Lib/plat-aix4/regen
-@@ -5,4 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py.py -i '(u_long)' /usr/include/netinet/in.h
-+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
---- Lib/plat-linux2/regen
-+++ Lib/plat-linux2/regen
-@@ -5,4 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
-+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
---- Lib/plat-sunos5/regen
-+++ Lib/plat-sunos5/regen
-@@ -5,5 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
--
-+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
---- Lib/plat-unixware7/regen
-+++ Lib/plat-unixware7/regen
-@@ -5,5 +5,5 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/netinet/in.h
--h2py /usr/include/sys/stropts.h
-+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
-+python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -408,7 +408,7 @@
-
- # Default target
- all: build_all
--build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed
-+build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods gdbhooks Modules/_testembed
-
- # Compile a binary with gcc profile guided optimization.
- profile-opt:
-@@ -457,6 +457,27 @@
- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
- ./$(BUILDPYTHON) -E $(srcdir)/setup.py $$quiet build
-
-+# Build the platform-specific modules
-+platformspecificmods: $(BUILDPYTHON) sharedmods
-+ @PLATDIR=$(PLATDIR); \
-+ if test ! -f $(srcdir)/Lib/$(PLATDIR)/regen; then \
-+ $(INSTALL) -d $(srcdir)/Lib/$(PLATDIR); \
-+ if test -f $(srcdir)/Lib/$${PLATDIR%?}/regen; then \
-+ cp $(srcdir)/Lib/$${PLATDIR%?}/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
-+ else \
-+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
-+ fi \
-+ fi
-+ @EXE="$(BUILDEXE)"; export EXE; \
-+ PATH="`pwd`:$$PATH"; export PATH; \
-+ PYTHONPATH="`pwd`/Lib"; export PYTHONPATH; \
-+ if [ -n "$(MULTIARCH)" ]; then MULTIARCH=$(MULTIARCH); export MULTIARCH; fi; \
-+ cd $(srcdir)/Lib/$(PLATDIR); \
-+ $(RUNSHARED) ./regen || exit 1; \
-+ for module in *.py; do \
-+ $(RUNSHARED) $(BUILDPYTHON) -c "with open('$$module', 'rb') as module: compile(module.read(), '$$module', 'exec')" || exit 1; \
-+ done
-+
- # Build static library
- # avoid long command lines, same as LIBRARY_OBJS
- $(LIBRARY): $(LIBRARY_OBJS)
-@@ -983,7 +1004,7 @@
- multiprocessing multiprocessing/dummy \
- unittest unittest/test \
- curses pydoc_data $(MACHDEPS)
--libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
-+libinstall: build_all $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
- if test ! -d $(DESTDIR)$$i; then \
-@@ -1066,17 +1087,6 @@
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
-
--# Create the PLATDIR source directory, if one wasn't distributed..
--$(srcdir)/Lib/$(PLATDIR):
-- mkdir $(srcdir)/Lib/$(PLATDIR)
-- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
-- export PATH; PATH="`pwd`:$$PATH"; \
-- export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
-- export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
-- export EXE; EXE="$(BUILDEXE)"; \
-- if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
-- cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
--
- python-config: $(srcdir)/Misc/python-config.in
- # Substitution happens here, as the completely-expanded BINDIR
- # is not available in configure
-@@ -1373,7 +1383,7 @@
- Python/thread.o: @THREADHEADERS@
-
- # Declare targets that aren't real files
--.PHONY: all build_all sharedmods oldsharedmods test quicktest memtest
-+.PHONY: all build_all sharedmods oldsharedmods platformspecificmods test quicktest memtest
- .PHONY: install altinstall oldsharedinstall bininstall altbininstall
- .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
- .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
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
deleted file mode 100644
index c5aec72..0000000
--- a/dev-lang/python/files/3.2/21_all_distutils_c++.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-http://bugs.python.org/issue1222585
-
---- Lib/distutils/cygwinccompiler.py
-+++ Lib/distutils/cygwinccompiler.py
-@@ -136,9 +136,13 @@
- self.set_executables(compiler='gcc -mcygwin -O -Wall',
- compiler_so='gcc -mcygwin -mdll -O -Wall',
- compiler_cxx='g++ -mcygwin -O -Wall',
-+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
- linker_exe='gcc -mcygwin',
- linker_so=('%s -mcygwin %s' %
-- (self.linker_dll, shared_option)))
-+ (self.linker_dll, shared_option)),
-+ linker_exe_cxx='g++ -mcygwin',
-+ linker_so_cxx=('%s -mcygwin %s' %
-+ (self.linker_dll, shared_option)))
-
- # cygwin and mingw32 need different sets of libraries
- if self.gcc_version == "2.91.57":
-@@ -162,8 +166,12 @@
- raise CompileError(msg)
- else: # for other files use the C-compiler
- try:
-- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError as msg:
- raise CompileError(msg)
-
-@@ -294,10 +302,15 @@
- self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
- compiler_so='gcc -mno-cygwin -mdll -O -Wall',
- compiler_cxx='g++ -mno-cygwin -O -Wall',
-+ compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
- linker_exe='gcc -mno-cygwin',
- linker_so='%s -mno-cygwin %s %s'
- % (self.linker_dll, shared_option,
-- entry_point))
-+ entry_point),
-+ linker_exe_cxx='g++ -mno-cygwin',
-+ linker_so_cxx='%s -mno-cygwin %s %s'
-+ % (self.linker_dll, shared_option,
-+ entry_point))
- # Maybe we should also append -mthreads, but then the finished
- # dlls need another dll (mingwm10.dll see Mingw32 docs)
- # (-mthreads: Support thread-safe exception handling on `Mingw32')
---- Lib/distutils/emxccompiler.py
-+++ Lib/distutils/emxccompiler.py
-@@ -63,8 +63,12 @@
- # XXX optimization, warnings etc. should be customizable.
- self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
- compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
- linker_exe='gcc -Zomf -Zmt -Zcrtdll',
-- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
-+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
-+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
-+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
-
- # want the gcc library statically linked (so that we don't have
- # to distribute a version dependent on the compiler we have)
-@@ -81,8 +85,12 @@
- raise CompileError(msg)
- else: # for other files use the C-compiler
- try:
-- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError as msg:
- raise CompileError(msg)
-
---- Lib/distutils/sysconfig.py
-+++ Lib/distutils/sysconfig.py
-@@ -170,9 +170,12 @@
- _osx_support.customize_compiler(_config_vars)
- _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
-
-- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
-- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
-- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+ cflags = ''
-+ cxxflags = ''
-
- newcc = None
- if 'CC' in os.environ:
-@@ -181,19 +184,27 @@
- cxx = os.environ['CXX']
- if 'LDSHARED' in os.environ:
- ldshared = os.environ['LDSHARED']
-+ if 'LDCXXSHARED' in os.environ:
-+ ldcxxshared = os.environ['LDCXXSHARED']
- if 'CPP' in os.environ:
- cpp = os.environ['CPP']
- else:
- cpp = cc + " -E" # not always
- if 'LDFLAGS' in os.environ:
- ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
- if 'CFLAGS' in os.environ:
-- cflags = opt + ' ' + os.environ['CFLAGS']
-+ cflags = os.environ['CFLAGS']
- ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+ if 'CXXFLAGS' in os.environ:
-+ cxxflags = os.environ['CXXFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
- if 'CPPFLAGS' in os.environ:
- cpp = cpp + ' ' + os.environ['CPPFLAGS']
- cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
- ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
- if 'AR' in os.environ:
- ar = os.environ['AR']
- if 'ARFLAGS' in os.environ:
-@@ -202,13 +213,17 @@
- archiver = ar + ' ' + ar_flags
-
- cc_cmd = cc + ' ' + cflags
-+ cxx_cmd = cxx + ' ' + cxxflags
- compiler.set_executables(
- preprocessor=cpp,
- compiler=cc_cmd,
- compiler_so=cc_cmd + ' ' + ccshared,
-- compiler_cxx=cxx,
-+ compiler_cxx=cxx_cmd,
-+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
- linker_so=ldshared,
- linker_exe=cc,
-+ linker_so_cxx=ldcxxshared,
-+ linker_exe_cxx=cxx,
- archiver=archiver)
-
- compiler.shared_lib_extension = shlib_suffix
---- Lib/distutils/unixccompiler.py
-+++ Lib/distutils/unixccompiler.py
-@@ -52,14 +52,17 @@
- # are pretty generic; they will probably have to be set by an outsider
- # (eg. using information discovered by the sysconfig about building
- # Python extensions).
-- executables = {'preprocessor' : None,
-- 'compiler' : ["cc"],
-- 'compiler_so' : ["cc"],
-- 'compiler_cxx' : ["cc"],
-- 'linker_so' : ["cc", "-shared"],
-- 'linker_exe' : ["cc"],
-- 'archiver' : ["ar", "-cr"],
-- 'ranlib' : None,
-+ executables = {'preprocessor' : None,
-+ 'compiler' : ["cc"],
-+ 'compiler_so' : ["cc"],
-+ 'compiler_cxx' : ["c++"],
-+ 'compiler_so_cxx' : ["c++"],
-+ 'linker_so' : ["cc", "-shared"],
-+ 'linker_exe' : ["cc"],
-+ 'linker_so_cxx' : ["c++", "-shared"],
-+ 'linker_exe_cxx' : ["c++"],
-+ 'archiver' : ["ar", "-cr"],
-+ 'ranlib' : None,
- }
-
- if sys.platform[:6] == "darwin":
-@@ -108,12 +111,19 @@
-
- def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
- compiler_so = self.compiler_so
-+ compiler_so_cxx = self.compiler_so_cxx
- if sys.platform == 'darwin':
- compiler_so = _osx_support.compiler_fixup(compiler_so,
- cc_args + extra_postargs)
-+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
-+ cc_args + extra_postargs)
- try:
-- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError as msg:
- raise CompileError(msg)
-
-@@ -171,22 +181,16 @@
- ld_args.extend(extra_postargs)
- self.mkpath(os.path.dirname(output_filename))
- try:
-- if target_desc == CCompiler.EXECUTABLE:
-- linker = self.linker_exe[:]
-+ if target_lang == "c++":
-+ if target_desc == CCompiler.EXECUTABLE:
-+ linker = self.linker_exe_cxx[:]
-+ else:
-+ linker = self.linker_so_cxx[:]
- else:
-- linker = self.linker_so[:]
-- if target_lang == "c++" and self.compiler_cxx:
-- # skip over environment variable settings if /usr/bin/env
-- # is used to set up the linker's environment.
-- # This is needed on OSX. Note: this assumes that the
-- # normal and C++ compiler have the same environment
-- # settings.
-- i = 0
-- if os.path.basename(linker[0]) == "env":
-- i = 1
-- while '=' in linker[i]:
-- i += 1
-- linker[i] = self.compiler_cxx[i]
-+ if target_desc == CCompiler.EXECUTABLE:
-+ linker = self.linker_exe[:]
-+ else:
-+ linker = self.linker_so[:]
-
- if sys.platform == 'darwin':
- linker = _osx_support.compiler_fixup(linker, ld_args)
---- Lib/_osx_support.py
-+++ Lib/_osx_support.py
-@@ -14,13 +14,13 @@
- # configuration variables that may contain universal build flags,
- # like "-arch" or "-isdkroot", that may need customization for
- # the user environment
--_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
-- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
-- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
-- 'PY_CORE_CFLAGS')
-+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
-+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
-+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
-+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
-
- # configuration variables that may contain compiler calls
--_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
-+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
-
- # prefix added to original configuration variable names
- _INITPRE = '_OSX_SUPPORT_INITIAL_'
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -454,7 +454,7 @@
- *\ -s*|s*) quiet="-q";; \
- *) quiet="";; \
- esac; \
-- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
-+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \
- ./$(BUILDPYTHON) -E $(srcdir)/setup.py $$quiet build
-
- # Build the platform-specific modules
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
deleted file mode 100644
index c3b990c..0000000
--- a/dev-lang/python/files/3.2/22_all_tests_environment.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-http://bugs.python.org/issue1674555
-
---- Lib/site.py
-+++ Lib/site.py
-@@ -514,8 +514,9 @@
- known_paths = removeduppaths()
- if ENABLE_USER_SITE is None:
- ENABLE_USER_SITE = check_enableusersite()
-- known_paths = addusersitepackages(known_paths)
-- known_paths = addsitepackages(known_paths)
-+ if os.environ.get("_PYTHONNOSITEPACKAGES") is None:
-+ known_paths = addusersitepackages(known_paths)
-+ known_paths = addsitepackages(known_paths)
- if sys.platform == 'os2emx':
- setBEGINLIBPATH()
- setquit()
---- Lib/test/regrtest.py
-+++ Lib/test/regrtest.py
-@@ -174,6 +174,7 @@
- import unittest
- import warnings
- from inspect import isabstract
-+from subprocess import Popen, PIPE
-
- try:
- import threading
-@@ -510,6 +511,57 @@
- support.use_resources = use_resources
- save_modules = sys.modules.keys()
-
-+ opt_args = support.args_from_interpreter_flags()
-+ base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
-+ debug_output_pat = re.compile(r"\[\d+ refs\]$")
-+
-+ def get_args_tuple(test, verbose, quiet, huntrleaks, debug, use_resources,
-+ output_on_failure, failfast, match_tests):
-+ return (
-+ (test, verbose, quiet),
-+ dict(huntrleaks=huntrleaks, debug=debug,
-+ use_resources=use_resources,
-+ output_on_failure=output_on_failure, failfast=failfast,
-+ match_tests=match_tests)
-+ )
-+
-+ def _runtest(test, verbose, quiet, huntrleaks=False, debug=False,
-+ use_resources=None, output_on_failure=False, failfast=False,
-+ match_tests=None):
-+ if test == "test_site":
-+ args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks, debug,
-+ use_resources, output_on_failure,
-+ failfast, match_tests)
-+ env = os.environ.copy()
-+ try:
-+ del env["_PYTHONNOSITEPACKAGES"]
-+ except KeyError:
-+ pass
-+ popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)],
-+ stdout=PIPE, stderr=PIPE,
-+ universal_newlines=True,
-+ close_fds=(os.name != 'nt'),
-+ env=env)
-+ stdout, stderr = popen.communicate()
-+ # Strip last refcount output line if it exists, since it
-+ # comes from the shutdown of the interpreter in the subcommand.
-+ stderr = debug_output_pat.sub("", stderr)
-+ stdout, _, result = stdout.strip().rpartition("\n")
-+ result = json.loads(result)
-+ if stdout:
-+ print(stdout)
-+ if stderr:
-+ print(stderr, file=sys.stderr)
-+ if result[0] == INTERRUPTED:
-+ assert result[1] == 'KeyboardInterrupt'
-+ raise KeyboardInterrupt
-+ return result
-+ else:
-+ return runtest(test, verbose, quiet, huntrleaks=huntrleaks,
-+ debug=debug, use_resources=use_resources,
-+ output_on_failure=output_on_failure,
-+ failfast=failfast, match_tests=match_tests)
-+
- def accumulate_result(test, result):
- ok, test_time = result
- test_times.append((test_time, test))
-@@ -547,12 +599,8 @@
- print("Multiprocess option requires thread support")
- sys.exit(2)
- from queue import Queue
-- from subprocess import Popen, PIPE
-- debug_output_pat = re.compile(r"\[\d+ refs\]$")
- output = Queue()
- pending = MultiprocessTests(tests)
-- opt_args = support.args_from_interpreter_flags()
-- base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
- def work():
- # A worker thread.
- try:
-@@ -562,12 +610,9 @@
- except StopIteration:
- output.put((None, None, None, None))
- return
-- args_tuple = (
-- (test, verbose, quiet),
-- dict(huntrleaks=huntrleaks, use_resources=use_resources,
-- debug=debug, output_on_failure=verbose3,
-- failfast=failfast, match_tests=match_tests)
-- )
-+ args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks,
-+ debug, use_resources, verbose3,
-+ failfast, match_tests)
- # -E is needed by some tests, e.g. test_import
- # Running the child from the same working directory ensures
- # that TEMPDIR for the child is the same when
-@@ -632,13 +677,13 @@
- if trace:
- # If we're tracing code coverage, then we don't exit with status
- # if on a false return value from main.
-- tracer.runctx('runtest(test, verbose, quiet)',
-+ tracer.runctx('_runtest(test, verbose, quiet)',
- globals=globals(), locals=vars())
- else:
- try:
-- result = runtest(test, verbose, quiet, huntrleaks, debug,
-- output_on_failure=verbose3,
-- failfast=failfast, match_tests=match_tests)
-+ result = _runtest(test, verbose, quiet, huntrleaks, debug,
-+ output_on_failure=verbose3,
-+ failfast=failfast, match_tests=match_tests)
- accumulate_result(test, result)
- except KeyboardInterrupt:
- interrupted = True
-@@ -709,7 +754,7 @@
- sys.stdout.flush()
- try:
- verbose = True
-- ok = runtest(test, True, quiet, huntrleaks, debug)
-+ ok = _runtest(test, True, quiet, huntrleaks, debug)
- except KeyboardInterrupt:
- # print a newline separate from the ^C
- print()
-@@ -1077,8 +1122,9 @@
- for name, get, restore in self.resource_info():
- current = get()
- original = saved_values.pop(name)
-- # Check for changes to the resource's value
-- if current != original:
-+ # Check for changes to the resource's value. test_site is always run
-+ # in a subprocess and is allowed to change os.environ and sys.path.
-+ if current != original and self.testname != "test_site":
- self.changed = True
- restore(original)
- if not self.quiet:
---- Lib/test/test_site.py
-+++ Lib/test/test_site.py
-@@ -8,6 +8,7 @@
- from test.support import run_unittest, TESTFN, EnvironmentVarGuard
- from test.support import captured_stderr
- import builtins
-+import imp
- import os
- import sys
- import re
-@@ -21,6 +22,9 @@
- # already.
- if "site" in sys.modules:
- import site
-+ if "_PYTHONNOSITEPACKAGES" in os.environ:
-+ del os.environ["_PYTHONNOSITEPACKAGES"]
-+ imp.reload(site)
- else:
- raise unittest.SkipTest("importation of site.py suppressed")
-
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -814,7 +814,7 @@
-
- TESTOPTS= -l $(EXTRATESTOPTS)
- TESTPROG= $(srcdir)/Lib/test/regrtest.py
--TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -E -R -bb $(TESTPYTHONOPTS)
-+TESTPYTHON= _PYTHONNOSITEPACKAGES=1 $(RUNSHARED) ./$(BUILDPYTHON) -Wd -E -R -bb $(TESTPYTHONOPTS)
- test: all platform
- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
- -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
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
deleted file mode 100644
index d594f56..0000000
--- a/dev-lang/python/files/3.2/23_all_h2py_encoding.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-http://bugs.python.org/issue13032
-
---- Tools/scripts/h2py.py
-+++ Tools/scripts/h2py.py
-@@ -23,36 +23,36 @@
-
- import sys, re, getopt, os
-
--p_define = re.compile('^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
-+p_define = re.compile(b'^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
-
- p_macro = re.compile(
-- '^[\t ]*#[\t ]*define[\t ]+'
-- '([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
-+ b'^[\t ]*#[\t ]*define[\t ]+'
-+ b'([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
-
--p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
-+p_include = re.compile(b'^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
-
--p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
--p_cpp_comment = re.compile('//.*')
-+p_comment = re.compile(br'/\*([^*]+|\*+[^/])*(\*+/)?')
-+p_cpp_comment = re.compile(b'//.*')
-
- ignores = [p_comment, p_cpp_comment]
-
--p_char = re.compile(r"'(\\.[^\\]*|[^\\])'")
-+p_char = re.compile(br"'(\\.[^\\]*|[^\\])'")
-
--p_hex = re.compile(r"0x([0-9a-fA-F]+)L?")
-+p_hex = re.compile(br"0x([0-9a-fA-F]+)L?")
-
- filedict = {}
- importable = {}
-
- try:
-- searchdirs=os.environ['include'].split(';')
-+ searchdirs=os.environb[b'include'].split(b';')
- except KeyError:
- try:
-- searchdirs=os.environ['INCLUDE'].split(';')
-+ searchdirs=os.environb[b'INCLUDE'].split(b';')
- except KeyError:
-- searchdirs=['/usr/include']
-+ searchdirs=[b'/usr/include']
- try:
-- searchdirs.insert(0, os.path.join('/usr/include',
-- os.environ['MULTIARCH']))
-+ searchdirs.insert(0, os.path.join(b'/usr/include',
-+ os.environb[b'MULTIARCH']))
- except KeyError:
- pass
-
-@@ -61,22 +61,23 @@
- opts, args = getopt.getopt(sys.argv[1:], 'i:')
- for o, a in opts:
- if o == '-i':
-- ignores.append(re.compile(a))
-+ ignores.append(re.compile(a.encode()))
- if not args:
- args = ['-']
- for filename in args:
- if filename == '-':
- sys.stdout.write('# Generated by h2py from stdin\n')
-- process(sys.stdin, sys.stdout)
-+ process(sys.stdin.buffer, sys.stdout.buffer)
- else:
-- fp = open(filename, 'r')
-+ filename = filename.encode()
-+ fp = open(filename, 'rb')
- outfile = os.path.basename(filename)
-- i = outfile.rfind('.')
-+ i = outfile.rfind(b'.')
- if i > 0: outfile = outfile[:i]
- modname = outfile.upper()
-- outfile = modname + '.py'
-- outfp = open(outfile, 'w')
-- outfp.write('# Generated by h2py from %s\n' % filename)
-+ outfile = modname + b'.py'
-+ outfp = open(outfile, 'wb')
-+ outfp.write(b'# Generated by h2py from ' + filename + b'\n')
- filedict = {}
- for dir in searchdirs:
- if filename[:len(dir)] == dir:
-@@ -90,9 +91,9 @@
- def pytify(body):
- # replace ignored patterns by spaces
- for p in ignores:
-- body = p.sub(' ', body)
-+ body = p.sub(b' ', body)
- # replace char literals by ord(...)
-- body = p_char.sub("ord('\\1')", body)
-+ body = p_char.sub(b"ord('\\1')", body)
- # Compute negative hexadecimal constants
- start = 0
- UMAX = 2*(sys.maxsize+1)
-@@ -103,7 +104,7 @@
- val = int(body[slice(*m.span(1))], 16)
- if val > sys.maxsize:
- val -= UMAX
-- body = body[:s] + "(" + str(val) + ")" + body[e:]
-+ body = body[:s] + b"(" + str(val).encode() + b")" + body[e:]
- start = s + 1
- return body
-
-@@ -116,7 +117,7 @@
- match = p_define.match(line)
- if match:
- # gobble up continuation lines
-- while line[-2:] == '\\\n':
-+ while line[-2:] == b'\\\n':
- nextline = fp.readline()
- if not nextline: break
- lineno = lineno + 1
-@@ -125,11 +126,11 @@
- body = line[match.end():]
- body = pytify(body)
- ok = 0
-- stmt = '%s = %s\n' % (name, body.strip())
-+ stmt = name + b' = ' + body.strip() + b'\n'
- try:
- exec(stmt, env)
- except:
-- sys.stderr.write('Skipping: %s' % stmt)
-+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
- else:
- outfp.write(stmt)
- match = p_macro.match(line)
-@@ -137,11 +138,11 @@
- macro, arg = match.group(1, 2)
- body = line[match.end():]
- body = pytify(body)
-- stmt = 'def %s(%s): return %s\n' % (macro, arg, body)
-+ stmt = b'def ' + macro + b'(' + arg + b'): return ' + body + b'\n'
- try:
- exec(stmt, env)
- except:
-- sys.stderr.write('Skipping: %s' % stmt)
-+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
- else:
- outfp.write(stmt)
- match = p_include.match(line)
-@@ -150,23 +151,24 @@
- a, b = regs[1]
- filename = line[a:b]
- if filename in importable:
-- outfp.write('from %s import *\n' % importable[filename])
-+ outfp.write(b'from ' + importable[filename] + b' import *\n')
- elif filename not in filedict:
- filedict[filename] = None
- inclfp = None
- for dir in searchdirs:
- try:
-- inclfp = open(dir + '/' + filename)
-+ inclfp = open(dir + b'/' + filename, 'rb')
- break
- except IOError:
- pass
- if inclfp:
- outfp.write(
-- '\n# Included from %s\n' % filename)
-+ b'\n# Included from ' + filename + b'\n')
- process(inclfp, outfp, env)
-+ inclfp.close()
- else:
-- sys.stderr.write('Warning - could not find file %s\n' %
-- filename)
-+ sys.stderr.buffer.write(b'Warning - could not find file ' +
-+ filename + b'\n')
-
- if __name__ == '__main__':
- main()
diff --git a/dev-lang/python/files/3.2/41_all_crosscompile.patch b/dev-lang/python/files/3.2/41_all_crosscompile.patch
deleted file mode 100644
index c35d2ba..0000000
--- a/dev-lang/python/files/3.2/41_all_crosscompile.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-Crosscompile
-
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -202,6 +202,7 @@
-
- PYTHON= python$(EXE)
- BUILDPYTHON= python$(BUILDEXE)
-+HOSTPYTHON= $(BUILDPYTHON)
-
- # The task to run while instrument when building the profile-opt target
- PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-@@ -244,6 +245,7 @@
- ##########################################################################
- # Parser
- PGEN= Parser/pgen$(EXE)
-+HOSTPGEN= $(PGEN)
-
- POBJS= \
- Parser/acceler.o \
-@@ -455,7 +457,7 @@
- *) quiet="";; \
- esac; \
- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \
-- ./$(BUILDPYTHON) -E $(srcdir)/setup.py $$quiet build
-+ ./$(HOSTPYTHON) -E $(srcdir)/setup.py $$quiet build
-
- # Build the platform-specific modules
- platformspecificmods: $(BUILDPYTHON) sharedmods
-@@ -635,9 +637,9 @@
-
- # Use a stamp file to prevent make -j invoking pgen twice
- $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
--Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
-+Parser/pgen.stamp: $(HOSTPGEN) $(GRAMMAR_INPUT)
- -@$(INSTALL) -d Include
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- -touch Parser/pgen.stamp
-
- $(PGEN): $(PGENOBJS)
-@@ -1065,27 +1067,27 @@
- $(DESTDIR)$(LIBDEST)/distutils/tests ; \
- fi
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-+ ./$(HOSTPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ ./$(HOSTPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-+ ./$(HOSTPYTHON) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ ./$(HOSTPYTHON) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-+ ./$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
-+ ./$(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
-
- python-config: $(srcdir)/Misc/python-config.in
- # Substitution happens here, as the completely-expanded BINDIR
-@@ -1157,7 +1159,7 @@
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall: sharedmods
-- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
-+ $(RUNSHARED) ./$(HOSTPYTHON) -E $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
---- setup.py
-+++ setup.py
-@@ -345,6 +345,7 @@
- try:
- imp.load_dynamic(ext.name, ext_filename)
- except ImportError as why:
-+ return
- self.failed.append(ext.name)
- self.announce('*** WARNING: renaming "%s" since importing it'
- ' failed: %s' % (ext.name, why), level=3)
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
deleted file mode 100644
index 419f7a0..0000000
--- a/dev-lang/python/files/3.2/81_all_use_new_readline_function_types__closes__20374_.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1390541532 18000
-# Fri Jan 24 00:32:12 2014 -0500
-# Branch 3.3
-# Node ID fb2259d9f6b4104be0015068e3293b3abb68dce7
-# Parent fed5d501a179138e3b214e463a0bc13943de7ce5
-use new readline function types (closes #20374)
-
-diff --git a/Modules/readline.c b/Modules/readline.c
---- a/Modules/readline.c
-+++ b/Modules/readline.c
-@@ -936,12 +936,12 @@
- rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
- rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
- /* Set our hook functions */
-- rl_startup_hook = (Function *)on_startup_hook;
-+ rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
- #ifdef HAVE_RL_PRE_INPUT_HOOK
-- rl_pre_input_hook = (Function *)on_pre_input_hook;
-+ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
- #endif
- /* Set our completion function */
-- rl_attempted_completion_function = (CPPFunction *)flex_complete;
-+ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
- /* Set Python word break characters */
- completer_word_break_characters =
- rl_completer_word_break_characters =
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
deleted file mode 100644
index d0716f9..0000000
--- a/dev-lang/python/files/3.2/82_all_new_plan__just_remove_typecasts__closes__20374_.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1390581856 18000
-# Fri Jan 24 11:44:16 2014 -0500
-# Branch 3.3
-# Node ID fc62fcd8e990d80b15177716437f20da49b9dccf
-# Parent b3eaeb4bdf84a8f89afaf24c0308bd0d13987844
-new plan: just remove typecasts (closes #20374)
-
-diff --git a/Modules/readline.c b/Modules/readline.c
---- a/Modules/readline.c
-+++ b/Modules/readline.c
-@@ -877,7 +877,7 @@
- * before calling the normal completer */
-
- static char **
--flex_complete(char *text, int start, int end)
-+flex_complete(const char *text, int start, int end)
- {
- #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
- rl_completion_append_character ='\0';
-@@ -936,12 +936,12 @@
- rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
- rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
- /* Set our hook functions */
-- rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
-+ rl_startup_hook = on_startup_hook;
- #ifdef HAVE_RL_PRE_INPUT_HOOK
-- rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
-+ rl_pre_input_hook = on_pre_input_hook;
- #endif
- /* Set our completion function */
-- rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
-+ rl_attempted_completion_function = flex_complete;
- /* Set Python word break characters */
- completer_word_break_characters =
- rl_completer_word_break_characters =
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
deleted file mode 100644
index 232e666..0000000
--- a/dev-lang/python/files/3.2/83_all_Issue__20374__Avoid_compiler_warnings_when_compiling_readline_with_libedit_.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-# HG changeset patch
-# User Ned Deily <nad@acm.org>
-# Date 1391647990 28800
-# Wed Feb 05 16:53:10 2014 -0800
-# Branch 3.3
-# Node ID 9131a9edcac4880b2759c82fb38f13f6f871a73e
-# Parent b5fe07d39e163240aed04f71ae7862c7cf36c1e7
-Issue #20374: Avoid compiler warnings when compiling readline with libedit.
-
-diff --git a/Modules/readline.c b/Modules/readline.c
---- a/Modules/readline.c
-+++ b/Modules/readline.c
-@@ -773,15 +773,24 @@
- return result;
- }
-
-+
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_startup_hook(void)
-+#else
-+on_startup_hook()
-+#endif
- {
- return on_hook(startup_hook);
- }
-
- #ifdef HAVE_RL_PRE_INPUT_HOOK
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_pre_input_hook(void)
-+#else
-+on_pre_input_hook()
-+#endif
- {
- return on_hook(pre_input_hook);
- }
diff --git a/dev-lang/python/files/3.3/.gitattributes b/dev-lang/python/files/3.3/.gitattributes
deleted file mode 100644
index 5e5a56d..0000000
--- a/dev-lang/python/files/3.3/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-Makefile export-ignore
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
deleted file mode 100644
index 36ac67a..0000000
--- a/dev-lang/python/files/3.3/01_all_static_library_location.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Install libpythonX.Y.a in /usr/lib instead of /usr/lib/pythonX.Y/config.
-https://bugs.gentoo.org/show_bug.cgi?id=252372
-http://bugs.python.org/issue6103
-
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -965,6 +965,19 @@
- fi; \
- else true; \
- fi
-+ @if test -f $(LIBRARY) && test $(LIBRARY) != $(LDLIBRARY); then \
-+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
-+ if test "$(SHLIB_SUFFIX)" = .dll; then \
-+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR); \
-+ else \
-+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR); \
-+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY); \
-+ fi; \
-+ else \
-+ echo "Skipped install of $(LIBRARY) - use make frameworkinstall"; \
-+ fi; \
-+ else true; \
-+ fi
-
- bininstall: altbininstall
- -if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \
-@@ -1200,18 +1213,6 @@
- else true; \
- fi; \
- done
-- @if test -d $(LIBRARY); then :; else \
-- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
-- if test "$(SHLIB_SUFFIX)" = .dll; then \
-- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
-- else \
-- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- fi; \
-- else \
-- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
-- fi; \
-- fi
- $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
- $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
- $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
---- Misc/python-config.in
-+++ Misc/python-config.in
-@@ -47,11 +47,7 @@
- elif opt in ('--libs', '--ldflags'):
- libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
- libs.append('-lpython' + pyver + sys.abiflags)
-- # add the prefix/lib/pythonX.Y/config dir, but only if there is no
-- # shared library in prefix/lib/.
- if opt == '--ldflags':
-- if not getvar('Py_ENABLE_SHARED'):
-- libs.insert(0, '-L' + getvar('LIBPL'))
- if not getvar('PYTHONFRAMEWORK'):
- libs.extend(getvar('LINKFORSHARED').split())
- print(' '.join(libs))
---- Modules/makesetup
-+++ Modules/makesetup
-@@ -89,7 +89,7 @@
- then
- ExtraLibDir=.
- else
-- ExtraLibDir='$(LIBPL)'
-+ ExtraLibDir='$(LIBDIR)'
- fi
- ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
- esac
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
deleted file mode 100644
index af735be..0000000
--- a/dev-lang/python/files/3.3/02_all_disable_modules_and_ssl.patch
+++ /dev/null
@@ -1,57 +0,0 @@
---- setup.py
-+++ setup.py
-@@ -31,7 +31,17 @@
- COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
-
- # This global variable is used to hold the list of modules to be disabled.
--disabled_module_list = []
-+pdm_env = "PYTHON_DISABLE_MODULES"
-+if pdm_env in os.environ:
-+ disabled_module_list = os.environ[pdm_env].split()
-+else:
-+ disabled_module_list = []
-+
-+pds_env = "PYTHON_DISABLE_SSL"
-+if pds_env in os.environ:
-+ disable_ssl = os.environ[pds_env]
-+else:
-+ disable_ssl = 0
-
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (after any relative
-@@ -435,6 +445,7 @@
- os.unlink(tmpfile)
-
- def detect_modules(self):
-+ global disable_ssl
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
-@@ -747,7 +758,7 @@
- ssl_incs = find_file('openssl/ssl.h', inc_dirs,
- search_for_ssl_incs_in
- )
-- if ssl_incs is not None:
-+ if ssl_incs is not None and not disable_ssl:
- krb5_h = find_file('krb5.h', inc_dirs,
- ['/usr/kerberos/include'])
- if krb5_h:
-@@ -758,7 +769,8 @@
- ] )
-
- if (ssl_incs is not None and
-- ssl_libs is not None):
-+ ssl_libs is not None and
-+ not disable_ssl):
- exts.append( Extension('_ssl', ['_ssl.c'],
- include_dirs = ssl_incs,
- library_dirs = ssl_libs,
-@@ -791,7 +803,7 @@
-
- #print('openssl_ver = 0x%08x' % openssl_ver)
- min_openssl_ver = 0x00907000
-- have_any_openssl = ssl_incs is not None and ssl_libs is not None
-+ have_any_openssl = ssl_incs is not None and ssl_libs is not None and not disable_ssl
- have_usable_openssl = (have_any_openssl and
- openssl_ver >= min_openssl_ver)
-
diff --git a/dev-lang/python/files/3.3/03_all_libdir.patch b/dev-lang/python/files/3.3/03_all_libdir.patch
deleted file mode 100644
index 052c51d..0000000
--- a/dev-lang/python/files/3.3/03_all_libdir.patch
+++ /dev/null
@@ -1,174 +0,0 @@
---- Lib/distutils/command/install.py
-+++ Lib/distutils/command/install.py
-@@ -44,8 +44,8 @@
-
- INSTALL_SCHEMES = {
- 'unix_prefix': {
-- 'purelib': '$base/lib/python$py_version_short/site-packages',
-- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
-+ 'purelib': '$base/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
-+ 'platlib': '$platbase/@@GENTOO_LIBDIR@@/python$py_version_short/site-packages',
- 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
- 'scripts': '$base/bin',
- 'data' : '$base',
---- Lib/distutils/sysconfig.py
-+++ Lib/distutils/sysconfig.py
-@@ -144,7 +144,7 @@
-
- if os.name == "posix":
- libpython = os.path.join(prefix,
-- "lib", "python" + get_python_version())
-+ "@@GENTOO_LIBDIR@@", "python" + get_python_version())
- if standard_lib:
- return libpython
- else:
---- Lib/site.py
-+++ Lib/site.py
-@@ -303,10 +303,10 @@
- if sys.platform in ('os2emx', 'riscos'):
- sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
- elif os.sep == '/':
-- sitepackages.append(os.path.join(prefix, "lib",
-+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@",
- "python" + sys.version[:3],
- "site-packages"))
-- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python"))
- else:
- sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
---- Lib/sysconfig.py
-+++ Lib/sysconfig.py
-@@ -21,10 +21,10 @@
-
- _INSTALL_SCHEMES = {
- 'posix_prefix': {
-- 'stdlib': '{installed_base}/lib/python{py_version_short}',
-- 'platstdlib': '{platbase}/lib/python{py_version_short}',
-- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
-+ 'stdlib': '{installed_base}/@@GENTOO_LIBDIR@@/python{py_version_short}',
-+ 'platstdlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
-+ 'purelib': '{base}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
-+ 'platlib': '{platbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
- 'include':
- '{installed_base}/include/python{py_version_short}{abiflags}',
- 'platinclude':
-@@ -81,10 +81,10 @@
- 'data': '{userbase}',
- },
- 'posix_user': {
-- 'stdlib': '{userbase}/lib/python{py_version_short}',
-- 'platstdlib': '{userbase}/lib/python{py_version_short}',
-- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
-- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
-+ 'stdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
-+ 'platstdlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}',
-+ 'purelib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
-+ 'platlib': '{userbase}/@@GENTOO_LIBDIR@@/python{py_version_short}/site-packages',
- 'include': '{userbase}/include/python{py_version_short}',
- 'scripts': '{userbase}/bin',
- 'data': '{userbase}',
---- Lib/test/test_site.py
-+++ Lib/test/test_site.py
-@@ -248,10 +248,10 @@
- elif os.sep == '/':
- # OS X non-framwework builds, Linux, FreeBSD, etc
- self.assertEqual(len(dirs), 2)
-- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
-+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'python' + sys.version[:3],
- 'site-packages')
- self.assertEqual(dirs[0], wanted)
-- wanted = os.path.join('xoxo', 'lib', 'site-python')
-+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'site-python')
- self.assertEqual(dirs[1], wanted)
- else:
- # other platforms
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -115,7 +115,7 @@
- MANDIR= @mandir@
- INCLUDEDIR= @includedir@
- CONFINCLUDEDIR= $(exec_prefix)/include
--SCRIPTDIR= $(prefix)/lib
-+SCRIPTDIR= $(prefix)/@@GENTOO_LIBDIR@@
- ABIFLAGS= @ABIFLAGS@
-
- # Detailed destination directories
---- Modules/getpath.c
-+++ Modules/getpath.c
-@@ -122,8 +122,8 @@
- #endif
-
- #ifndef PYTHONPATH
--#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
-- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
-+#define PYTHONPATH PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION ":" \
-+ EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload"
- #endif
-
- #ifndef LANDMARK
-@@ -135,7 +135,7 @@
- static wchar_t progpath[MAXPATHLEN+1];
- static wchar_t *module_search_path = NULL;
- static int module_search_path_malloced = 0;
--static wchar_t *lib_python = L"lib/python" VERSION;
-+static wchar_t *lib_python = L"@@GENTOO_LIBDIR@@/python" VERSION;
-
- static void
- reduce(wchar_t *dir)
-@@ -685,7 +685,7 @@
- }
- else
- wcsncpy(zip_path, _prefix, MAXPATHLEN);
-- joinpath(zip_path, L"lib/python00.zip");
-+ joinpath(zip_path, L"@@GENTOO_LIBDIR@@/python00.zip");
- bufsz = wcslen(zip_path); /* Replace "00" with version */
- zip_path[bufsz - 6] = VERSION[0];
- zip_path[bufsz - 5] = VERSION[2];
-@@ -695,7 +695,7 @@
- fprintf(stderr,
- "Could not find platform dependent libraries <exec_prefix>\n");
- wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
-- joinpath(exec_prefix, L"lib/lib-dynload");
-+ joinpath(exec_prefix, L"@@GENTOO_LIBDIR@@/lib-dynload");
- }
- /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
-
---- Modules/Setup.dist
-+++ Modules/Setup.dist
-@@ -354,7 +354,7 @@
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.gzip.org/zlib/
--#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
-
- # Interface to the Expat XML parser
- #
---- setup.py
-+++ setup.py
-@@ -507,8 +507,7 @@
- # be assumed that no additional -I,-L directives are needed.
- if not cross_compiling:
- lib_dirs = self.compiler.library_dirs + [
-- '/lib64', '/usr/lib64',
-- '/lib', '/usr/lib',
-+ '/@@GENTOO_LIBDIR@@', '/usr/@@GENTOO_LIBDIR@@',
- ]
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
- else:
-@@ -723,11 +722,11 @@
- elif curses_library:
- readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
-+ ['/usr/@@GENTOO_LIBDIR@@/termcap'],
- 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
-- library_dirs=['/usr/lib/termcap'],
-+ library_dirs=['/usr/@@GENTOO_LIBDIR@@/termcap'],
- extra_link_args=readline_extra_link_args,
- libraries=readline_libs) )
- else:
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
deleted file mode 100644
index 58b839f..0000000
--- a/dev-lang/python/files/3.3/04_all_non-zero_exit_status_on_failure.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=281968
-http://bugs.python.org/issue6731
-
---- setup.py
-+++ setup.py
-@@ -43,6 +43,8 @@
- else:
- disable_ssl = 0
-
-+exit_status = 0
-+
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (after any relative
- directories) if:
-@@ -277,6 +279,8 @@
- print()
-
- if self.failed:
-+ global exit_status
-+ exit_status = 1
- failed = self.failed[:]
- print()
- print("Failed to build these modules:")
-@@ -2213,6 +2217,7 @@
- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
- "Tools/scripts/2to3", "Tools/scripts/pyvenv"]
- )
-+ sys.exit(exit_status)
-
- # --install-platlib
- if __name__ == '__main__':
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
deleted file mode 100644
index 68f33f7..0000000
--- a/dev-lang/python/files/3.3/05_all_regenerate_platform-specific_modules.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-http://bugs.python.org/issue12619
-
---- Lib/plat-aix4/regen
-+++ Lib/plat-aix4/regen
-@@ -5,4 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py.py -i '(u_long)' /usr/include/netinet/in.h
-+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
---- Lib/plat-linux/regen
-+++ Lib/plat-linux/regen
-@@ -5,4 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
-+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
---- Lib/plat-sunos5/regen
-+++ Lib/plat-sunos5/regen
-@@ -5,5 +5,4 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/sys/stropts.h /usr/include/dlfcn.h
--
-+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
---- Lib/plat-unixware7/regen
-+++ Lib/plat-unixware7/regen
-@@ -5,5 +5,5 @@
- exit 1;;
- esac
- set -v
--h2py -i '(u_long)' /usr/include/netinet/in.h
--h2py /usr/include/sys/stropts.h
-+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
-+python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -444,7 +444,7 @@
-
- # Default target
- all: build_all
--build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed
-+build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods gdbhooks Modules/_testembed
-
- # Compile a binary with gcc profile guided optimization.
- profile-opt:
-@@ -500,6 +500,32 @@
- _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-
-+# Build the platform-specific modules
-+platformspecificmods: $(BUILDPYTHON) sharedmods
-+ @PLATDIR=$(PLATDIR); \
-+ if test ! -f $(srcdir)/Lib/$(PLATDIR)/regen; then \
-+ $(INSTALL) -d $(srcdir)/Lib/$(PLATDIR); \
-+ if test -f $(srcdir)/Lib/$${PLATDIR%?}/regen; then \
-+ cp $(srcdir)/Lib/$${PLATDIR%?}/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
-+ else \
-+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
-+ fi \
-+ fi
-+ @EXE="$(BUILDEXE)"; export EXE; \
-+ PATH="`pwd`:$$PATH"; export PATH; \
-+ PYTHONPATH="`pwd`/Lib"; export PYTHONPATH; \
-+ if [ -n "$(MULTIARCH)" ]; then MULTIARCH=$(MULTIARCH); export MULTIARCH; fi; \
-+ if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
-+ PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
-+ else \
-+ PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
-+ fi; export PYTHON_FOR_BUILD; \
-+ cd $(srcdir)/Lib/$(PLATDIR); \
-+ $(RUNSHARED) ./regen || exit 1; \
-+ for module in *.py; do \
-+ $(RUNSHARED) $(BUILDPYTHON) -c "with open('$$module', 'rb') as module: compile(module.read(), '$$module', 'exec')" || exit 1; \
-+ done
-+
- # Build static library
- # avoid long command lines, same as LIBRARY_OBJS
- $(LIBRARY): $(LIBRARY_OBJS)
-@@ -1074,7 +1100,7 @@
- unittest unittest/test unittest/test/testmock \
- venv venv/scripts venv/scripts/posix \
- curses pydoc_data $(MACHDEPS)
--libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
-+libinstall: build_all $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
- if test ! -d $(DESTDIR)$$i; then \
-@@ -1157,23 +1183,6 @@
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
-
--# Create the PLATDIR source directory, if one wasn't distributed..
--$(srcdir)/Lib/$(PLATDIR):
-- mkdir $(srcdir)/Lib/$(PLATDIR)
-- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
-- export PATH; PATH="`pwd`:$$PATH"; \
-- export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
-- export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
-- export EXE; EXE="$(BUILDEXE)"; \
-- if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
-- export PYTHON_FOR_BUILD; \
-- if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
-- PYTHON_FOR_BUILD="$(BUILDPYTHON)"; \
-- else \
-- PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
-- fi; \
-- cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
--
- python-config: $(srcdir)/Misc/python-config.in
- # Substitution happens here, as the completely-expanded BINDIR
- # is not available in configure
-@@ -1476,7 +1485,7 @@
- Python/thread.o: @THREADHEADERS@
-
- # Declare targets that aren't real files
--.PHONY: all build_all sharedmods oldsharedmods test quicktest
-+.PHONY: all build_all sharedmods oldsharedmods platformspecificmods test quicktest
- .PHONY: install altinstall oldsharedinstall bininstall altbininstall
- .PHONY: maninstall libinstall inclinstall libainstall sharedinstall
- .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
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
deleted file mode 100644
index 1f6c19a..0000000
--- a/dev-lang/python/files/3.3/21_all_distutils_c++.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-http://bugs.python.org/issue1222585
-
---- Lib/distutils/cygwinccompiler.py
-+++ Lib/distutils/cygwinccompiler.py
-@@ -124,8 +124,10 @@
- # dllwrap 2.10.90 is buggy
- if self.ld_version >= "2.10.90":
- self.linker_dll = "gcc"
-+ self.linker_dll_cxx = "g++"
- else:
- self.linker_dll = "dllwrap"
-+ self.linker_dll_cxx = "dllwrap"
-
- # ld_version >= "2.13" support -shared so use it instead of
- # -mdll -static
-@@ -139,9 +141,13 @@
- self.set_executables(compiler='gcc -mcygwin -O -Wall',
- compiler_so='gcc -mcygwin -mdll -O -Wall',
- compiler_cxx='g++ -mcygwin -O -Wall',
-+ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
- linker_exe='gcc -mcygwin',
- linker_so=('%s -mcygwin %s' %
-- (self.linker_dll, shared_option)))
-+ (self.linker_dll, shared_option)),
-+ linker_exe_cxx='g++ -mcygwin',
-+ linker_so_cxx=('%s -mcygwin %s' %
-+ (self.linker_dll_cxx, shared_option)))
-
- # cygwin and mingw32 need different sets of libraries
- if self.gcc_version == "2.91.57":
-@@ -165,8 +171,12 @@
- raise CompileError(msg)
- else: # for other files use the C-compiler
- try:
-- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError as msg:
- raise CompileError(msg)
-
-@@ -302,9 +312,14 @@
- self.set_executables(compiler='gcc%s -O -Wall' % no_cygwin,
- compiler_so='gcc%s -mdll -O -Wall' % no_cygwin,
- compiler_cxx='g++%s -O -Wall' % no_cygwin,
-+ compiler_so_cxx='g++%s -mdll -O -Wall' % no_cygwin,
- linker_exe='gcc%s' % no_cygwin,
- linker_so='%s%s %s %s'
- % (self.linker_dll, no_cygwin,
-+ shared_option, entry_point),
-+ linker_exe_cxx='g++%s' % no_cygwin,
-+ linker_so_cxx='%s%s %s %s'
-+ % (self.linker_dll_cxx, no_cygwin,
- shared_option, entry_point))
- # Maybe we should also append -mthreads, but then the finished
- # dlls need another dll (mingwm10.dll see Mingw32 docs)
---- Lib/distutils/emxccompiler.py
-+++ Lib/distutils/emxccompiler.py
-@@ -63,8 +63,12 @@
- # XXX optimization, warnings etc. should be customizable.
- self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
- compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-+ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
-+ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
- linker_exe='gcc -Zomf -Zmt -Zcrtdll',
-- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
-+ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
-+ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
-+ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
-
- # want the gcc library statically linked (so that we don't have
- # to distribute a version dependent on the compiler we have)
-@@ -81,8 +85,12 @@
- raise CompileError(msg)
- else: # for other files use the C-compiler
- try:
-- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError as msg:
- raise CompileError(msg)
-
---- Lib/distutils/sysconfig.py
-+++ Lib/distutils/sysconfig.py
-@@ -191,9 +191,12 @@
- _osx_support.customize_compiler(_config_vars)
- _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
-
-- (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
-- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
-- 'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+ (cc, cxx, ccshared, ldshared, ldcxxshared, shlib_suffix, ar, ar_flags) = \
-+ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
-+ 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
-+
-+ cflags = ''
-+ cxxflags = ''
-
- if 'CC' in os.environ:
- newcc = os.environ['CC']
-@@ -208,19 +211,27 @@
- cxx = os.environ['CXX']
- if 'LDSHARED' in os.environ:
- ldshared = os.environ['LDSHARED']
-+ if 'LDCXXSHARED' in os.environ:
-+ ldcxxshared = os.environ['LDCXXSHARED']
- if 'CPP' in os.environ:
- cpp = os.environ['CPP']
- else:
- cpp = cc + " -E" # not always
- if 'LDFLAGS' in os.environ:
- ldshared = ldshared + ' ' + os.environ['LDFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
- if 'CFLAGS' in os.environ:
-- cflags = opt + ' ' + os.environ['CFLAGS']
-+ cflags = os.environ['CFLAGS']
- ldshared = ldshared + ' ' + os.environ['CFLAGS']
-+ if 'CXXFLAGS' in os.environ:
-+ cxxflags = os.environ['CXXFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
- if 'CPPFLAGS' in os.environ:
- cpp = cpp + ' ' + os.environ['CPPFLAGS']
- cflags = cflags + ' ' + os.environ['CPPFLAGS']
-+ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
- ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
-+ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
- if 'AR' in os.environ:
- ar = os.environ['AR']
- if 'ARFLAGS' in os.environ:
-@@ -229,13 +240,17 @@
- archiver = ar + ' ' + ar_flags
-
- cc_cmd = cc + ' ' + cflags
-+ cxx_cmd = cxx + ' ' + cxxflags
- compiler.set_executables(
- preprocessor=cpp,
- compiler=cc_cmd,
- compiler_so=cc_cmd + ' ' + ccshared,
-- compiler_cxx=cxx,
-+ compiler_cxx=cxx_cmd,
-+ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
- linker_so=ldshared,
- linker_exe=cc,
-+ linker_so_cxx=ldcxxshared,
-+ linker_exe_cxx=cxx,
- archiver=archiver)
-
- compiler.shared_lib_extension = shlib_suffix
---- Lib/distutils/unixccompiler.py
-+++ Lib/distutils/unixccompiler.py
-@@ -52,14 +52,17 @@
- # are pretty generic; they will probably have to be set by an outsider
- # (eg. using information discovered by the sysconfig about building
- # Python extensions).
-- executables = {'preprocessor' : None,
-- 'compiler' : ["cc"],
-- 'compiler_so' : ["cc"],
-- 'compiler_cxx' : ["cc"],
-- 'linker_so' : ["cc", "-shared"],
-- 'linker_exe' : ["cc"],
-- 'archiver' : ["ar", "-cr"],
-- 'ranlib' : None,
-+ executables = {'preprocessor' : None,
-+ 'compiler' : ["cc"],
-+ 'compiler_so' : ["cc"],
-+ 'compiler_cxx' : ["c++"],
-+ 'compiler_so_cxx' : ["c++"],
-+ 'linker_so' : ["cc", "-shared"],
-+ 'linker_exe' : ["cc"],
-+ 'linker_so_cxx' : ["c++", "-shared"],
-+ 'linker_exe_cxx' : ["c++"],
-+ 'archiver' : ["ar", "-cr"],
-+ 'ranlib' : None,
- }
-
- if sys.platform[:6] == "darwin":
-@@ -108,12 +111,19 @@
-
- def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
- compiler_so = self.compiler_so
-+ compiler_so_cxx = self.compiler_so_cxx
- if sys.platform == 'darwin':
- compiler_so = _osx_support.compiler_fixup(compiler_so,
- cc_args + extra_postargs)
-+ compiler_so_cxx = _osx_support.compiler_fixup(compiler_so_cxx,
-+ cc_args + extra_postargs)
- try:
-- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-- extra_postargs)
-+ if self.detect_language(src) == 'c++':
-+ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
-+ extra_postargs)
-+ else:
-+ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
-+ extra_postargs)
- except DistutilsExecError as msg:
- raise CompileError(msg)
-
-@@ -171,22 +181,16 @@
- ld_args.extend(extra_postargs)
- self.mkpath(os.path.dirname(output_filename))
- try:
-- if target_desc == CCompiler.EXECUTABLE:
-- linker = self.linker_exe[:]
-+ if target_lang == "c++":
-+ if target_desc == CCompiler.EXECUTABLE:
-+ linker = self.linker_exe_cxx[:]
-+ else:
-+ linker = self.linker_so_cxx[:]
- else:
-- linker = self.linker_so[:]
-- if target_lang == "c++" and self.compiler_cxx:
-- # skip over environment variable settings if /usr/bin/env
-- # is used to set up the linker's environment.
-- # This is needed on OSX. Note: this assumes that the
-- # normal and C++ compiler have the same environment
-- # settings.
-- i = 0
-- if os.path.basename(linker[0]) == "env":
-- i = 1
-- while '=' in linker[i]:
-- i += 1
-- linker[i] = self.compiler_cxx[i]
-+ if target_desc == CCompiler.EXECUTABLE:
-+ linker = self.linker_exe[:]
-+ else:
-+ linker = self.linker_so[:]
-
- if sys.platform == 'darwin':
- linker = _osx_support.compiler_fixup(linker, ld_args)
---- Lib/_osx_support.py
-+++ Lib/_osx_support.py
-@@ -14,13 +14,13 @@
- # configuration variables that may contain universal build flags,
- # like "-arch" or "-isdkroot", that may need customization for
- # the user environment
--_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
-- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
-- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS',
-- 'PY_CORE_CFLAGS')
-+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS',
-+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED',
-+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS',
-+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS')
-
- # configuration variables that may contain compiler calls
--_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX')
-+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX')
-
- # prefix added to original configuration variable names
- _INITPRE = '_OSX_SUPPORT_INITIAL_'
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -496,7 +496,7 @@
- *\ -s*|s*) quiet="-q";; \
- *) quiet="";; \
- esac; \
-- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
-+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' CFLAGS='$(PY_CFLAGS)' \
- _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-
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
deleted file mode 100644
index edb3351..0000000
--- a/dev-lang/python/files/3.3/22_all_tests_environment.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-http://bugs.python.org/issue1674555
-
---- Lib/site.py
-+++ Lib/site.py
-@@ -587,8 +587,9 @@
- known_paths = venv(known_paths)
- if ENABLE_USER_SITE is None:
- ENABLE_USER_SITE = check_enableusersite()
-- known_paths = addusersitepackages(known_paths)
-- known_paths = addsitepackages(known_paths)
-+ if os.environ.get("_PYTHONNOSITEPACKAGES") is None:
-+ known_paths = addusersitepackages(known_paths)
-+ known_paths = addsitepackages(known_paths)
- if sys.platform == 'os2emx':
- setBEGINLIBPATH()
- setquit()
---- Lib/test/regrtest.py
-+++ Lib/test/regrtest.py
-@@ -188,6 +188,7 @@
- import unittest
- import warnings
- from inspect import isabstract
-+from subprocess import Popen, PIPE
-
- try:
- import threading
-@@ -578,6 +579,62 @@
- support.use_resources = use_resources
- save_modules = sys.modules.keys()
-
-+ opt_args = support.args_from_interpreter_flags()
-+ base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
-+ debug_output_pat = re.compile(r"\[\d+ refs\]$")
-+
-+ def get_args_tuple(test, verbose, quiet, huntrleaks, debug, use_resources,
-+ output_on_failure, failfast, match_tests, timeout):
-+ return (
-+ (test, verbose, quiet),
-+ dict(huntrleaks=huntrleaks, debug=debug,
-+ use_resources=use_resources,
-+ output_on_failure=output_on_failure, failfast=failfast,
-+ match_tests=match_tests, timeout=timeout)
-+ )
-+
-+ def _runtest(test, verbose, quiet, huntrleaks=False, debug=False,
-+ use_resources=None, output_on_failure=False, failfast=False,
-+ match_tests=None, timeout=None):
-+ if test == "test_site":
-+ args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks, debug,
-+ use_resources, output_on_failure,
-+ failfast, match_tests, timeout)
-+ env = os.environ.copy()
-+ try:
-+ del env["_PYTHONNOSITEPACKAGES"]
-+ except KeyError:
-+ pass
-+ popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)],
-+ stdout=PIPE, stderr=PIPE,
-+ universal_newlines=True,
-+ close_fds=(os.name != 'nt'),
-+ env=env)
-+ stdout, stderr = popen.communicate()
-+ retcode = popen.wait()
-+ # Strip last refcount output line if it exists, since it
-+ # comes from the shutdown of the interpreter in the subcommand.
-+ stderr = debug_output_pat.sub("", stderr)
-+ stdout, _, result = stdout.strip().rpartition("\n")
-+ if retcode != 0:
-+ result = (CHILD_ERROR, "Exit code %s" % retcode)
-+ else:
-+ result = json.loads(result)
-+ if stdout:
-+ print(stdout)
-+ if stderr:
-+ print(stderr, file=sys.stderr)
-+ if result[0] == INTERRUPTED:
-+ assert result[1] == 'KeyboardInterrupt'
-+ raise KeyboardInterrupt
-+ return result
-+ else:
-+ return runtest(test, verbose, quiet, huntrleaks=huntrleaks,
-+ debug=debug, use_resources=use_resources,
-+ output_on_failure=output_on_failure,
-+ failfast=failfast, match_tests=match_tests,
-+ timeout=timeout)
-+
- def accumulate_result(test, result):
- ok, test_time = result
- test_times.append((test_time, test))
-@@ -615,12 +672,8 @@
- print("Multiprocess option requires thread support")
- sys.exit(2)
- from queue import Queue
-- from subprocess import Popen, PIPE
-- debug_output_pat = re.compile(r"\[\d+ refs\]$")
- output = Queue()
- pending = MultiprocessTests(tests)
-- opt_args = support.args_from_interpreter_flags()
-- base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
- def work():
- # A worker thread.
- try:
-@@ -630,13 +683,9 @@
- except StopIteration:
- output.put((None, None, None, None))
- return
-- args_tuple = (
-- (test, verbose, quiet),
-- dict(huntrleaks=huntrleaks, use_resources=use_resources,
-- debug=debug, output_on_failure=verbose3,
-- timeout=timeout, failfast=failfast,
-- match_tests=match_tests)
-- )
-+ args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks,
-+ debug, use_resources, verbose3,
-+ failfast, match_tests, timeout)
- # -E is needed by some tests, e.g. test_import
- # Running the child from the same working directory ensures
- # that TEMPDIR for the child is the same when
-@@ -707,14 +756,14 @@
- if trace:
- # If we're tracing code coverage, then we don't exit with status
- # if on a false return value from main.
-- tracer.runctx('runtest(test, verbose, quiet, timeout=timeout)',
-+ tracer.runctx('_runtest(test, verbose, quiet, timeout=timeout)',
- globals=globals(), locals=vars())
- else:
- try:
-- result = runtest(test, verbose, quiet, huntrleaks, debug,
-- output_on_failure=verbose3,
-- timeout=timeout, failfast=failfast,
-- match_tests=match_tests)
-+ result = _runtest(test, verbose, quiet, huntrleaks, debug,
-+ output_on_failure=verbose3,
-+ timeout=timeout, failfast=failfast,
-+ match_tests=match_tests)
- accumulate_result(test, result)
- except KeyboardInterrupt:
- interrupted = True
-@@ -785,7 +834,7 @@
- sys.stdout.flush()
- try:
- verbose = True
-- ok = runtest(test, True, quiet, huntrleaks, debug, timeout=timeout)
-+ ok = _runtest(test, True, quiet, huntrleaks, debug, timeout=timeout)
- except KeyboardInterrupt:
- # print a newline separate from the ^C
- print()
-@@ -1182,8 +1231,9 @@
- for name, get, restore in self.resource_info():
- current = get()
- original = saved_values.pop(name)
-- # Check for changes to the resource's value
-- if current != original:
-+ # Check for changes to the resource's value. test_site is always run
-+ # in a subprocess and is allowed to change os.environ and sys.path.
-+ if current != original and self.testname != "test_site":
- self.changed = True
- restore(original)
- if not self.quiet:
---- Lib/test/test_site.py
-+++ Lib/test/test_site.py
-@@ -8,6 +8,7 @@
- import test.support
- from test.support import captured_stderr, TESTFN, EnvironmentVarGuard
- import builtins
-+import imp
- import os
- import sys
- import re
-@@ -26,6 +27,10 @@
-
- import site
-
-+if "_PYTHONNOSITEPACKAGES" in os.environ:
-+ del os.environ["_PYTHONNOSITEPACKAGES"]
-+ imp.reload(site)
-+
- if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
- # need to add user site directory for tests
- os.makedirs(site.USER_SITE)
---- Makefile.pre.in
-+++ Makefile.pre.in
-@@ -883,7 +883,7 @@
- ######################################################################
-
- TESTOPTS= $(EXTRATESTOPTS)
--TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
-+TESTPYTHON= _PYTHONNOSITEPACKAGES=1 $(RUNSHARED) ./$(BUILDPYTHON) $(TESTPYTHONOPTS)
- TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
- TESTTIMEOUT= 3600
-
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
deleted file mode 100644
index d594f56..0000000
--- a/dev-lang/python/files/3.3/23_all_h2py_encoding.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-http://bugs.python.org/issue13032
-
---- Tools/scripts/h2py.py
-+++ Tools/scripts/h2py.py
-@@ -23,36 +23,36 @@
-
- import sys, re, getopt, os
-
--p_define = re.compile('^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
-+p_define = re.compile(b'^[\t ]*#[\t ]*define[\t ]+([a-zA-Z0-9_]+)[\t ]+')
-
- p_macro = re.compile(
-- '^[\t ]*#[\t ]*define[\t ]+'
-- '([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
-+ b'^[\t ]*#[\t ]*define[\t ]+'
-+ b'([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
-
--p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
-+p_include = re.compile(b'^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
-
--p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
--p_cpp_comment = re.compile('//.*')
-+p_comment = re.compile(br'/\*([^*]+|\*+[^/])*(\*+/)?')
-+p_cpp_comment = re.compile(b'//.*')
-
- ignores = [p_comment, p_cpp_comment]
-
--p_char = re.compile(r"'(\\.[^\\]*|[^\\])'")
-+p_char = re.compile(br"'(\\.[^\\]*|[^\\])'")
-
--p_hex = re.compile(r"0x([0-9a-fA-F]+)L?")
-+p_hex = re.compile(br"0x([0-9a-fA-F]+)L?")
-
- filedict = {}
- importable = {}
-
- try:
-- searchdirs=os.environ['include'].split(';')
-+ searchdirs=os.environb[b'include'].split(b';')
- except KeyError:
- try:
-- searchdirs=os.environ['INCLUDE'].split(';')
-+ searchdirs=os.environb[b'INCLUDE'].split(b';')
- except KeyError:
-- searchdirs=['/usr/include']
-+ searchdirs=[b'/usr/include']
- try:
-- searchdirs.insert(0, os.path.join('/usr/include',
-- os.environ['MULTIARCH']))
-+ searchdirs.insert(0, os.path.join(b'/usr/include',
-+ os.environb[b'MULTIARCH']))
- except KeyError:
- pass
-
-@@ -61,22 +61,23 @@
- opts, args = getopt.getopt(sys.argv[1:], 'i:')
- for o, a in opts:
- if o == '-i':
-- ignores.append(re.compile(a))
-+ ignores.append(re.compile(a.encode()))
- if not args:
- args = ['-']
- for filename in args:
- if filename == '-':
- sys.stdout.write('# Generated by h2py from stdin\n')
-- process(sys.stdin, sys.stdout)
-+ process(sys.stdin.buffer, sys.stdout.buffer)
- else:
-- fp = open(filename, 'r')
-+ filename = filename.encode()
-+ fp = open(filename, 'rb')
- outfile = os.path.basename(filename)
-- i = outfile.rfind('.')
-+ i = outfile.rfind(b'.')
- if i > 0: outfile = outfile[:i]
- modname = outfile.upper()
-- outfile = modname + '.py'
-- outfp = open(outfile, 'w')
-- outfp.write('# Generated by h2py from %s\n' % filename)
-+ outfile = modname + b'.py'
-+ outfp = open(outfile, 'wb')
-+ outfp.write(b'# Generated by h2py from ' + filename + b'\n')
- filedict = {}
- for dir in searchdirs:
- if filename[:len(dir)] == dir:
-@@ -90,9 +91,9 @@
- def pytify(body):
- # replace ignored patterns by spaces
- for p in ignores:
-- body = p.sub(' ', body)
-+ body = p.sub(b' ', body)
- # replace char literals by ord(...)
-- body = p_char.sub("ord('\\1')", body)
-+ body = p_char.sub(b"ord('\\1')", body)
- # Compute negative hexadecimal constants
- start = 0
- UMAX = 2*(sys.maxsize+1)
-@@ -103,7 +104,7 @@
- val = int(body[slice(*m.span(1))], 16)
- if val > sys.maxsize:
- val -= UMAX
-- body = body[:s] + "(" + str(val) + ")" + body[e:]
-+ body = body[:s] + b"(" + str(val).encode() + b")" + body[e:]
- start = s + 1
- return body
-
-@@ -116,7 +117,7 @@
- match = p_define.match(line)
- if match:
- # gobble up continuation lines
-- while line[-2:] == '\\\n':
-+ while line[-2:] == b'\\\n':
- nextline = fp.readline()
- if not nextline: break
- lineno = lineno + 1
-@@ -125,11 +126,11 @@
- body = line[match.end():]
- body = pytify(body)
- ok = 0
-- stmt = '%s = %s\n' % (name, body.strip())
-+ stmt = name + b' = ' + body.strip() + b'\n'
- try:
- exec(stmt, env)
- except:
-- sys.stderr.write('Skipping: %s' % stmt)
-+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
- else:
- outfp.write(stmt)
- match = p_macro.match(line)
-@@ -137,11 +138,11 @@
- macro, arg = match.group(1, 2)
- body = line[match.end():]
- body = pytify(body)
-- stmt = 'def %s(%s): return %s\n' % (macro, arg, body)
-+ stmt = b'def ' + macro + b'(' + arg + b'): return ' + body + b'\n'
- try:
- exec(stmt, env)
- except:
-- sys.stderr.write('Skipping: %s' % stmt)
-+ sys.stderr.buffer.write(b'Skipping: ' + stmt)
- else:
- outfp.write(stmt)
- match = p_include.match(line)
-@@ -150,23 +151,24 @@
- a, b = regs[1]
- filename = line[a:b]
- if filename in importable:
-- outfp.write('from %s import *\n' % importable[filename])
-+ outfp.write(b'from ' + importable[filename] + b' import *\n')
- elif filename not in filedict:
- filedict[filename] = None
- inclfp = None
- for dir in searchdirs:
- try:
-- inclfp = open(dir + '/' + filename)
-+ inclfp = open(dir + b'/' + filename, 'rb')
- break
- except IOError:
- pass
- if inclfp:
- outfp.write(
-- '\n# Included from %s\n' % filename)
-+ b'\n# Included from ' + filename + b'\n')
- process(inclfp, outfp, env)
-+ inclfp.close()
- else:
-- sys.stderr.write('Warning - could not find file %s\n' %
-- filename)
-+ sys.stderr.buffer.write(b'Warning - could not find file ' +
-+ filename + b'\n')
-
- if __name__ == '__main__':
- main()
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
deleted file mode 100644
index d6af2eb..0000000
--- a/dev-lang/python/files/3.3/24_all_sqlite-3.8.4.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-http://bugs.python.org/issue20901
-http://hg.python.org/cpython/rev/dbc9e3ed5e9f
-
---- Lib/sqlite3/test/hooks.py
-+++ Lib/sqlite3/test/hooks.py
-@@ -162,7 +162,7 @@
- create table bar (a, b)
- """)
- second_count = len(progress_calls)
-- self.assertGreater(first_count, second_count)
-+ self.assertGreaterEqual(first_count, second_count)
-
- def CheckCancelOperation(self):
- """
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
deleted file mode 100644
index b7738c7..0000000
--- a/dev-lang/python/files/3.3/61_all_process_data.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-GENTOO_PYTHON_PROCESS_NAME environmental variable is set by python-wrapper and wrapper scripts generated by
-python_generate_wrapper_scripts() and specifies process name.
-GENTOO_PYTHON_WRAPPER_SCRIPT_PATH environmental variable is set by wrapper scripts generated by
-python_generate_wrapper_scripts() and specifies sys.argv[0] in target executables.
-GENTOO_PYTHON_TARGET_SCRIPT_PATH environmental variable is set by wrapper scripts generated by
-python_generate_wrapper_scripts() and specifies paths to actually executed scripts.
-GENTOO_PYTHON_TARGET_SCRIPT_PATH_VERIFICATION environmental variable is used by wrapper scripts generated by
-python_generate_wrapper_scripts() to check if Python supports GENTOO_PYTHON_TARGET_SCRIPT_PATH environmental variable.
-
---- Modules/main.c
-+++ Modules/main.c
-@@ -331,6 +331,7 @@
- int version = 0;
- int saw_unbuffered_flag = 0;
- PyCompilerFlags cf;
-+ char *target_script_name = getenv("GENTOO_PYTHON_TARGET_SCRIPT_PATH");
-
- cf.cf_flags = 0;
-
-@@ -551,7 +552,17 @@
- filename = argv[_PyOS_optind];
-
- #else
-- filename = argv[_PyOS_optind];
-+ if (target_script_name != NULL && *target_script_name != '\0') {
-+ size_t length = strlen(target_script_name);
-+ wchar_t *wcs_target_script_name = (wchar_t *) calloc(length + 1, sizeof(wchar_t));
-+ char *old_locale = setlocale(LC_CTYPE, NULL);
-+ setlocale(LC_CTYPE, "");
-+ if (mbstowcs(wcs_target_script_name, target_script_name, length) >= 0)
-+ filename = wcs_target_script_name;
-+ setlocale(LC_CTYPE, old_locale);
-+ }
-+ if (filename == NULL)
-+ filename = argv[_PyOS_optind];
- #endif
- }
-
---- Modules/posixmodule.c
-+++ Modules/posixmodule.c
-@@ -1157,6 +1157,10 @@
- char *p = strchr(*e, '=');
- if (p == NULL)
- continue;
-+ if ((strlen("GENTOO_PYTHON_PROCESS_NAME") == (int)(p-*e) && strncmp("GENTOO_PYTHON_PROCESS_NAME", *e, (int)(p-*e)) == 0) ||
-+ (strlen("GENTOO_PYTHON_TARGET_SCRIPT_PATH") == (int)(p-*e) && strncmp("GENTOO_PYTHON_TARGET_SCRIPT_PATH", *e, (int)(p-*e)) == 0) ||
-+ (strlen("GENTOO_PYTHON_WRAPPER_SCRIPT_PATH") == (int)(p-*e) && strncmp("GENTOO_PYTHON_WRAPPER_SCRIPT_PATH", *e, (int)(p-*e)) == 0))
-+ continue;
- k = PyBytes_FromStringAndSize(*e, (int)(p-*e));
- if (k == NULL) {
- PyErr_Clear();
---- Modules/python.c
-+++ Modules/python.c
-@@ -7,6 +7,14 @@
- #include <floatingpoint.h>
- #endif
-
-+#ifdef __linux__
-+#include <linux/prctl.h>
-+#include <sys/prctl.h>
-+#ifndef PR_SET_NAME
-+#define PR_SET_NAME 15
-+#endif
-+#endif
-+
- #ifdef MS_WINDOWS
- int
- wmain(int argc, wchar_t **argv)
-@@ -18,6 +26,11 @@
- int
- main(int argc, char **argv)
- {
-+ if (getenv("GENTOO_PYTHON_TARGET_SCRIPT_PATH_VERIFICATION")) {
-+ printf("GENTOO_PYTHON_TARGET_SCRIPT_PATH supported\n");
-+ return 0;
-+ }
-+
- wchar_t **argv_copy;
- /* We need a second copy, as Python might modify the first one. */
- wchar_t **argv_copy2;
-@@ -59,6 +72,16 @@
-
- setlocale(LC_ALL, oldloc);
- free(oldloc);
-+
-+#ifdef __linux__
-+ char *process_name = getenv("GENTOO_PYTHON_PROCESS_NAME");
-+#ifdef HAVE_UNSETENV
-+ unsetenv("GENTOO_PYTHON_PROCESS_NAME");
-+#endif
-+ if (process_name != NULL && *process_name != '\0')
-+ prctl(PR_SET_NAME, process_name);
-+#endif
-+
- res = Py_Main(argc, argv_copy);
- for (i = 0; i < argc; i++) {
- PyMem_Free(argv_copy2[i]);
---- Python/sysmodule.c
-+++ Python/sysmodule.c
-@@ -1778,6 +1778,10 @@
- makeargvobject(int argc, wchar_t **argv)
- {
- PyObject *av;
-+ char *wrapper_script_name = getenv("GENTOO_PYTHON_WRAPPER_SCRIPT_PATH");
-+#ifdef HAVE_UNSETENV
-+ unsetenv("GENTOO_PYTHON_WRAPPER_SCRIPT_PATH");
-+#endif
- if (argc <= 0 || argv == NULL) {
- /* Ensure at least one (empty) argument is seen */
- static wchar_t *empty_argv[1] = {L""};
-@@ -1802,7 +1806,16 @@
- } else
- v = PyUnicode_FromString(argv[i]);
- #else
-- PyObject *v = PyUnicode_FromWideChar(argv[i], -1);
-+ PyObject *v = NULL;
-+ if (i == 0 && wrapper_script_name != NULL && *wrapper_script_name != '\0') {
-+ size_t length = strlen(wrapper_script_name);
-+ wchar_t *wcs_wrapper_script_name = (wchar_t *) calloc(length + 1, sizeof(wchar_t));
-+ if (mbstowcs(wcs_wrapper_script_name, wrapper_script_name, length) >= 0)
-+ v = PyUnicode_FromWideChar(wcs_wrapper_script_name, -1);
-+ free(wcs_wrapper_script_name);
-+ }
-+ if (v == NULL)
-+ v = PyUnicode_FromWideChar(argv[i], -1);
- #endif
- if (v == NULL) {
- Py_DECREF(av);
-@@ -1822,7 +1835,12 @@
- static void
- sys_update_path(int argc, wchar_t **argv)
- {
-- wchar_t *argv0;
-+ char *target_script_name = getenv("GENTOO_PYTHON_TARGET_SCRIPT_PATH");
-+#ifdef HAVE_UNSETENV
-+ unsetenv("GENTOO_PYTHON_TARGET_SCRIPT_PATH");
-+#endif
-+ wchar_t *wcs_target_script_name = NULL;
-+ wchar_t *argv0 = NULL;
- wchar_t *p = NULL;
- Py_ssize_t n = 0;
- PyObject *a;
-@@ -1842,7 +1860,14 @@
- if (path == NULL)
- return;
-
-- argv0 = argv[0];
-+ if (target_script_name != NULL && *target_script_name != '\0') {
-+ size_t length = strlen(target_script_name);
-+ wcs_target_script_name = (wchar_t *) calloc(length + 1, sizeof(wchar_t));
-+ if (mbstowcs(wcs_target_script_name, target_script_name, length) >= 0)
-+ argv0 = wcs_target_script_name;
-+ }
-+ if (argv0 == NULL)
-+ argv0 = argv[0];
-
- #ifdef HAVE_READLINK
- if (_HAVE_SCRIPT_ARGUMENT(argc, argv))
-@@ -1919,6 +1944,7 @@
- if (PyList_Insert(path, 0, a) < 0)
- Py_FatalError("sys.path.insert(0) failed");
- Py_DECREF(a);
-+ free(wcs_target_script_name);
- }
-
- void
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
deleted file mode 100644
index c67b2e5..0000000
--- a/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1397441438 14400
-# Node ID 50c07ed1743da9cd4540d83de0c30bd17aeb41b0
-# Parent 218e28a935ab4494d05215c243e2129625a71893
-in scan_once, prevent the reading of arbitrary memory when passed a negative index
-
-Bug reported by Guido Vranken.
-
-Index: Python-3.3.5/Lib/json/tests/test_decode.py
-===================================================================
---- Python-3.3.5.orig/Lib/test/test_json/test_decode.py 2014-06-26 18:40:10.825269130 +0200
-+++ Python-3.3.5/Lib/test/test_json/test_decode.py 2014-06-26 18:40:21.962323035 +0200
-@@ -60,5 +60,10 @@
- msg = 'escape'
- self.assertRaisesRegexp(ValueError, msg, self.loads, s)
-
-+ def test_negative_index(self):
-+ d = self.json.JSONDecoder()
-+ self.assertRaises(ValueError, d.raw_decode, 'a'*42, -50000)
-+ self.assertRaises(ValueError, d.raw_decode, u'a'*42, -50000)
-+
- class TestPyDecode(TestDecode, PyTest): pass
- class TestCDecode(TestDecode, CTest): pass
-Index: Python-3.3.5/Misc/ACKS
-===================================================================
---- Python-3.3.5.orig/Misc/ACKS 2014-06-26 18:40:10.826269135 +0200
-+++ Python-3.3.5/Misc/ACKS 2014-06-26 18:40:21.962323035 +0200
-@@ -1085,6 +1085,7 @@
- Frank Visser
- Johannes Vogel
- Alex Volkov
-+Guido Vranken
- Martijn Vries
- Niki W. Waibel
- Wojtek Walczak
-Index: Python-3.3.5/Modules/_json.c
-===================================================================
---- a/Modules/_json.c
-+++ b/Modules/_json.c
-@@ -975,7 +975,10 @@ scan_once_unicode(PyScannerObject *s, Py
- kind = PyUnicode_KIND(pystr);
- length = PyUnicode_GET_LENGTH(pystr);
-
-- if (idx >= length) {
-+ if (idx < 0)
-+ /* Compatibility with Python version. */
-+ idx += length;
-+ if (idx < 0 || idx >= length) {
- PyErr_SetNone(PyExc_StopIteration);
- return NULL;
- }
diff --git a/dev-lang/python/files/python-3.3-libressl.patch b/dev-lang/python/files/python-3.3-libressl.patch
deleted file mode 100644
index 816704e..0000000
--- a/dev-lang/python/files/python-3.3-libressl.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From eed8d3b553e00e04c1f97c87ea02723630fb15a4 Mon Sep 17 00:00:00 2001
-From: hasufell <hasufell@gentoo.org>
-Date: Sun, 20 Sep 2015 14:25:43 +0200
-Subject: [PATCH] Backport upstream libressl patches to python-3.3
-
-https://hg.python.org/cpython/raw-rev/7f82f50fdad0
-https://hg.python.org/cpython/raw-rev/4dac45f88d45
----
- Lib/ssl.py | 7 ++++++-
- Lib/test/test_ssl.py | 21 +++++++++++++--------
- Modules/_ssl.c | 4 ++++
- configure | 42 ++++++++++++++++++++++++++++++++++++++++++
- configure.ac | 3 +++
- pyconfig.h.in | 3 +++
- 6 files changed, 71 insertions(+), 9 deletions(-)
-
-diff --git a/Lib/ssl.py b/Lib/ssl.py
-index cd8d6b4..445ae87 100644
---- a/Lib/ssl.py
-+++ b/Lib/ssl.py
-@@ -78,7 +78,12 @@ try:
- from _ssl import OP_SINGLE_ECDH_USE
- except ImportError:
- pass
--from _ssl import RAND_status, RAND_egd, RAND_add, RAND_bytes, RAND_pseudo_bytes
-+from _ssl import RAND_status, RAND_add, RAND_bytes, RAND_pseudo_bytes
-+try:
-+ from _ssl import RAND_egd
-+except ImportError:
-+ # LibreSSL does not provide RAND_egd
-+ pass
- from _ssl import (
- SSL_ERROR_ZERO_RETURN,
- SSL_ERROR_WANT_READ,
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
-index 9fc6027..879f791 100644
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -130,8 +130,9 @@ class BasicSocketTests(unittest.TestCase):
- self.assertRaises(ValueError, ssl.RAND_bytes, -5)
- self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
-
-- self.assertRaises(TypeError, ssl.RAND_egd, 1)
-- self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
-+ if hasattr(ssl, 'RAND_egd'):
-+ self.assertRaises(TypeError, ssl.RAND_egd, 1)
-+ self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
- ssl.RAND_add("this is a random string", 75.0)
-
- @unittest.skipUnless(os.name == 'posix', 'requires posix')
-@@ -250,11 +251,11 @@ class BasicSocketTests(unittest.TestCase):
- # Some sanity checks follow
- # >= 0.9
- self.assertGreaterEqual(n, 0x900000)
-- # < 2.0
-- self.assertLess(n, 0x20000000)
-+ # < 3.0
-+ self.assertLess(n, 0x30000000)
- major, minor, fix, patch, status = t
- self.assertGreaterEqual(major, 0)
-- self.assertLess(major, 2)
-+ self.assertLess(major, 3)
- self.assertGreaterEqual(minor, 0)
- self.assertLess(minor, 256)
- self.assertGreaterEqual(fix, 0)
-@@ -263,9 +264,13 @@ class BasicSocketTests(unittest.TestCase):
- self.assertLessEqual(patch, 26)
- self.assertGreaterEqual(status, 0)
- self.assertLessEqual(status, 15)
-- # Version string as returned by OpenSSL, the format might change
-- self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
-- (s, t))
-+ # Version string as returned by {Open,Libre}SSL, the format might change
-+ if "LibreSSL" in s:
-+ self.assertTrue(s.startswith("LibreSSL {:d}.{:d}".format(major, minor)),
-+ (s, t))
-+ else:
-+ self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
-+ (s, t))
-
- @support.cpython_only
- def test_refcycle(self):
-diff --git a/Modules/_ssl.c b/Modules/_ssl.c
-index 499e8ba..cb151ba 100644
---- a/Modules/_ssl.c
-+++ b/Modules/_ssl.c
-@@ -2559,6 +2559,7 @@ Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n\
- It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
- using the ssl() function.");
-
-+#ifdef HAVE_RAND_EGD
- static PyObject *
- PySSL_RAND_egd(PyObject *self, PyObject *args)
- {
-@@ -2586,6 +2587,7 @@ PyDoc_STRVAR(PySSL_RAND_egd_doc,
- Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
- Returns number of bytes read. Raises SSLError if connection to EGD\n\
- fails or if it does not provide enough data to seed PRNG.");
-+#endif /* HAVE_RAND_EGD */
-
- #endif /* HAVE_OPENSSL_RAND */
-
-@@ -2604,8 +2606,10 @@ static PyMethodDef PySSL_methods[] = {
- PySSL_RAND_bytes_doc},
- {"RAND_pseudo_bytes", PySSL_RAND_pseudo_bytes, METH_VARARGS,
- PySSL_RAND_pseudo_bytes_doc},
-+#ifdef HAVE_RAND_EGD
- {"RAND_egd", PySSL_RAND_egd, METH_VARARGS,
- PySSL_RAND_egd_doc},
-+#endif
- {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS,
- PySSL_RAND_status_doc},
- #endif
-diff --git a/configure.ac b/configure.ac
-index 6a64bff..90f315a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2181,6 +2181,9 @@ AC_MSG_RESULT($SHLIBS)
- AC_CHECK_LIB(sendfile, sendfile)
- AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
- AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
-+AC_CHECK_LIB(crypto, RAND_egd,
-+ AC_DEFINE(HAVE_RAND_EGD, 1,
-+ [Define if the libcrypto has RAND_egd]))
-
- # only check for sem_init if thread support is requested
- if test "$with_threads" = "yes" -o -z "$with_threads"; then
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
deleted file mode 100644
index d963b9e..0000000
--- a/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-do not hardcode /usr/include paths
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -668,6 +668,8 @@ AC_ARG_WITH(cxx_main,
- ])
- AC_MSG_RESULT($with_cxx_main)
-
-+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-+
- preset_cxx="$CXX"
- if test -z "$CXX"
- then
-@@ -1513,7 +1515,7 @@ dnl AC_MSG_RESULT($cpp_type)
- # checks for header files
- AC_HEADER_STDC
- ac_save_cppflags="$CPPFLAGS"
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
- AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
- fcntl.h grp.h \
- ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
-@@ -2225,8 +2227,6 @@ LIBS="$withval $LIBS"
- ],
- [AC_MSG_RESULT(no)])
-
--AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
--
- # Check for use of the system expat library
- AC_MSG_CHECKING(for --with-system-expat)
- AC_ARG_WITH(system_expat,
-@@ -4273,7 +4273,7 @@ then
- fi
-
- ac_save_cppflags="$CPPFLAGS"
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
- # On HP/UX 11.0, mvwdelch is a block with a return statement
- AC_MSG_CHECKING(whether mvwdelch is an expression)
- AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
diff --git a/dev-lang/python/files/python-3.4-gcc-5.patch b/dev-lang/python/files/python-3.4-gcc-5.patch
deleted file mode 100644
index 80afbd1..0000000
--- a/dev-lang/python/files/python-3.4-gcc-5.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-changeset: 94583:689092296ad3
-branch: 3.4
-parent: 94579:645f3d750be1
-user: Victor Stinner <victor.stinner@gmail.com>
-date: Wed Feb 11 14:23:35 2015 +0100
-summary: Issue #23433: Fix faulthandler._stack_overflow()
-
-diff -r 645f3d750be1 -r 689092296ad3 Modules/faulthandler.c
---- a/Modules/faulthandler.c Tue Feb 10 14:49:32 2015 +0100
-+++ b/Modules/faulthandler.c Wed Feb 11 14:23:35 2015 +0100
-@@ -911,12 +911,12 @@
- }
-
- #if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION)
--static void*
--stack_overflow(void *min_sp, void *max_sp, size_t *depth)
-+static Py_uintptr_t
-+stack_overflow(Py_uintptr_t min_sp, Py_uintptr_t max_sp, size_t *depth)
- {
- /* allocate 4096 bytes on the stack at each call */
- unsigned char buffer[4096];
-- void *sp = &buffer;
-+ Py_uintptr_t sp = (Py_uintptr_t)&buffer;
- *depth += 1;
- if (sp < min_sp || max_sp < sp)
- return sp;
-@@ -929,7 +929,8 @@
- faulthandler_stack_overflow(PyObject *self)
- {
- size_t depth, size;
-- char *sp = (char *)&depth, *stop;
-+ Py_uintptr_t sp = (Py_uintptr_t)&depth;
-+ Py_uintptr_t stop;
-
- depth = 0;
- stop = stack_overflow(sp - STACK_OVERFLOW_MAX_SIZE,
-
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
deleted file mode 100644
index 8bfad11..0000000
--- a/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-do not hardcode /usr/include paths
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -4402,7 +4402,7 @@ fi
-
- # first curses header check
- ac_save_cppflags="$CPPFLAGS"
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
-
- AC_CHECK_HEADERS(curses.h ncurses.h)
-
diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
index 6a4ebd8..dfcbe08 100644
--- a/dev-lang/python/metadata.xml
+++ b/dev-lang/python/metadata.xml
@@ -7,7 +7,6 @@
</maintainer>
<use>
<flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
- <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>
<flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag>
</use>
</pkgmetadata>
diff --git a/dev-lang/python/python-2.6.9.ebuild b/dev-lang/python/python-2.6.9.ebuild
deleted file mode 100644
index 4fab57d..0000000
--- a/dev-lang/python/python-2.6.9.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-WANT_AUTOMAKE="none"
-WANT_LIBTOOL="none"
-
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
-
-MY_P="Python-${PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="http://www.python.org/"
-SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="2.6"
-KEYWORDS=""
-IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="app-arch/bzip2
- >=sys-libs/zlib-1.1.3
- virtual/libffi
- virtual/libintl
- !build? (
- berkdb? ( || (
- sys-libs/db:4.7
- sys-libs/db:4.6
- sys-libs/db:4.5
- sys-libs/db:4.4
- sys-libs/db:4.3
- sys-libs/db:4.2
- ) )
- gdbm? ( sys-libs/gdbm[berkdb] )
- ncurses? (
- >=sys-libs/ncurses-5.2
- readline? ( >=sys-libs/readline-4.1 )
- )
- sqlite? ( >=dev-db/sqlite-3.3.3:3 )
- ssl? ( dev-libs/openssl )
- tk? (
- >=dev-lang/tk-8.0
- dev-tcltk/blt
- )
- xml? ( >=dev-libs/expat-2.1 )
- )
- !!<sys-apps/portage-2.1.9"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- >=sys-devel/autoconf-2.61
- !sys-devel/gcc[libffi]"
-RDEPEND+=" !build? ( app-misc/mime-types )
- doc? ( dev-python/python-docs:${SLOT} )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- if use berkdb; then
- ewarn "'bsddb' module is out-of-date and no longer maintained inside"
- ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
- ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
- ewarn "is provided by dev-python/bsddb3."
- else
- if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
- ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
- ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
- ewarn "You might need to migrate your databases."
- fi
- fi
-}
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -r Modules/expat || die
- rm -r Modules/_ctypes/libffi* || die
- rm -r Modules/zlib || die
-
- local excluded_patches
- if ! tc-is-cross-compiler; then
- excluded_patches="*_all_crosscompile.patch"
- fi
-
- EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
- epatch "${FILESDIR}/${SLOT}"
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- Lib/distutils/command/install.py \
- Lib/distutils/sysconfig.py \
- Lib/site.py \
- Makefile.pre.in \
- Modules/Setup.dist \
- Modules/getpath.c \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- epatch_user
-
- eautoconf
- eautoheader
-}
-
-src_configure() {
- if use build; then
- # Disable extraneous modules with extra dependencies.
- export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
- export PYTHON_DISABLE_SSL="1"
- else
- # dbm module can be linked against berkdb or gdbm.
- # Defaults to gdbm when both are enabled, #204343.
- local disable
- use berkdb || use gdbm || disable+=" dbm"
- use berkdb || disable+=" _bsddb"
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # Run the configure scripts in parallel.
- multijob_init
-
- mkdir -p "${WORKDIR}"/{${CBUILD},${CHOST}} || die
-
- if tc-is-cross-compiler; then
- (
- multijob_child_init
- cd "${WORKDIR}"/${CBUILD} >/dev/null || die
- OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \
- "${S}"/configure \
- --{build,host}=${CBUILD} \
- || die "cross-configure failed"
- ) &
- multijob_post_fork
- fi
-
- # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
- tc-export CXX
- # The configure script fails to use pkg-config correctly.
- # http://bugs.python.org/issue15506
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
-
- # Set LDFLAGS so we link modules with -lpython2.6 correctly.
- # Needed on FreeBSD unless Python 2.6 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- cd "${WORKDIR}"/${CHOST} || die
- ECONF_SOURCE=${S} OPT="" \
- econf \
- --with-fpectl \
- --enable-shared \
- $(use_enable ipv6) \
- $(use_with threads) \
- $(usex wide-unicode "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2" "") \
- --infodir='${prefix}/share/info' \
- --mandir='${prefix}/share/man' \
- --with-libc="" \
- --with-system-ffi
-
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
- eerror "configure has detected that the sem_open function is broken."
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
- die "Broken sem_open function (bug 496328)"
- fi
-
- if tc-is-cross-compiler; then
- # Modify the Makefile.pre so we don't regen for the host/ one.
- # We need to link the host python programs into $PWD and run
- # them from here because the distutils sysconfig module will
- # parse Makefile/etc... from argv[0], and we need it to pick
- # up the target settings, not the host ones.
- sed -i \
- -e '1iHOSTPYTHONPATH = ./hostpythonpath:' \
- -e '/^HOSTPYTHON/s:=.*:= ./hostpython:' \
- -e '/^HOSTPGEN/s:=.*:= ./Parser/hostpgen:' \
- Makefile{.pre,} || die "sed failed"
- fi
-
- multijob_finish
-}
-
-src_compile() {
- if tc-is-cross-compiler; then
- cd "${WORKDIR}"/${CBUILD}
- # Disable as many modules as possible -- but we need a few to install.
- PYTHON_DISABLE_MODULES=$(
- sed -n "/Extension('/{s:^.*Extension('::;s:'.*::;p}" "${S}"/setup.py | \
- egrep -v '(unicodedata|time|cStringIO|_struct|binascii)'
- ) \
- PTHON_DISABLE_SSL="1" \
- SYSROOT= \
- emake
- # See comment in src_configure about these.
- ln python ../${CHOST}/hostpython || die
- ln Parser/pgen ../${CHOST}/Parser/hostpgen || die
- ln -s ../${CBUILD}/build/lib.*/ ../${CHOST}/hostpythonpath || die
- fi
-
- cd "${WORKDIR}"/${CHOST} || die
- default
-
- # Work around bug 329499. See also bug 413751.
- pax-mark m python
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- cd "${WORKDIR}/${CHOST}" || die
-
- # Skip failing tests.
- local skipped_tests="distutils tcl"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # Rerun failed tests in verbose mode (regrtest -w).
- PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-w" < /dev/tty
- local result="$?"
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test || die
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
- elog "and run the tests separately."
-
- if [[ "${result}" -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
-
- cd "${WORKDIR}"/${CHOST} || die
- emake DESTDIR="${D}" altinstall maninstall
-
- # Fix collisions between different slots of Python.
- mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" || die
- mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" || die
- mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" || die
- mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1" || die
- rm -f "${ED}usr/bin/smtpd.py" || die
-
- if use build; then
- rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} || die
- else
- use elibc_uclibc && { rm -fr "${libdir}/"{bsddb/test,test} || die; }
- use berkdb || { rm -fr "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die; }
- use sqlite || { rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} || die; }
- use tk || { rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die; }
- fi
-
- use threads || { rm -fr "${libdir}/multiprocessing" || die; }
- use wininst || { rm -f "${libdir}/distutils/command/"wininst-*.exe || die; }
-
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- dodoc -r "${S}"/Tools/.
- fi
-
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
- newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${SLOT}:" \
- -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
-
- # for python-exec
- python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
-
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local PYTHON=./python \
- LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
- export LD_LIBRARY_PATH
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py
- python_domodule epython.py
-}
-
-pkg_postinst() {
- ewarn "Please note that Python ${SLOT} is no longer supported in Gentoo."
- ewarn "The interpreter is not maintained, and may contain security"
- ewarn "vulnerabilities. Gentoo ebuilds will no longer be built with support"
- ewarn "for Python ${SLOT}."
- ewarn
- ewarn "If you wish to use Python ${SLOT} for your own purposes (development,"
- ewarn "testing), we suggest establishing a virtualenv for this interpreter,"
- ewarn "and installing the necessary dependencies inside it. However, we also"
- ewarn "strongly discourage using Python ${SLOT} on production systems."
-}
diff --git a/dev-lang/python/python-3.2.6.ebuild b/dev-lang/python/python-3.2.6.ebuild
deleted file mode 100644
index 456ac47..0000000
--- a/dev-lang/python/python-3.2.6.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $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 $
-
-EAPI=5
-WANT_AUTOMAKE="none"
-WANT_LIBTOOL="none"
-
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
-
-MY_P="Python-${PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="http://www.python.org/"
-SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="3.2"
-KEYWORDS=""
-IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="app-arch/bzip2
- >=sys-libs/zlib-1.1.3
- virtual/libffi
- virtual/libintl
- !build? (
- gdbm? ( sys-libs/gdbm[berkdb] )
- ncurses? (
- >=sys-libs/ncurses-5.2
- readline? ( >=sys-libs/readline-4.1 )
- )
- sqlite? ( >=dev-db/sqlite-3.3.8:3 )
- ssl? ( dev-libs/openssl )
- tk? (
- >=dev-lang/tk-8.0
- dev-tcltk/blt
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1 )
- )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- >=sys-devel/autoconf-2.65
- !sys-devel/gcc[libffi]"
-RDEPEND+=" !build? ( app-misc/mime-types )
- doc? ( dev-python/python-docs:${SLOT} )"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -r Modules/expat || die
- rm -r Modules/_ctypes/libffi* || die
- rm -r Modules/zlib || die
-
- local excluded_patches
- if ! tc-is-cross-compiler; then
- excluded_patches="*_all_crosscompile.patch"
- fi
-
- EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
- epatch "${FILESDIR}/${SLOT}"
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- Lib/distutils/command/install.py \
- Lib/distutils/sysconfig.py \
- Lib/site.py \
- Lib/sysconfig.py \
- Lib/test/test_site.py \
- Makefile.pre.in \
- Modules/Setup.dist \
- Modules/getpath.c \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # Disable ABI flags.
- sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
-
- epatch_user
-
- eautoconf
- eautoheader
-}
-
-src_configure() {
- if use build; then
- # Disable extraneous modules with extra dependencies.
- export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
- export PYTHON_DISABLE_SSL="1"
- else
- local disable
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # Run the configure scripts in parallel.
- multijob_init
-
- mkdir -p "${WORKDIR}"/{${CBUILD},${CHOST}} || die
-
- if tc-is-cross-compiler; then
- (
- multijob_child_init
- cd "${WORKDIR}"/${CBUILD} >/dev/null || die
- OPT="-O1" CFLAGS="" CPPFLAGS="" LDFLAGS="" CC="" \
- "${S}"/configure \
- --{build,host}=${CBUILD} \
- || die "cross-configure failed"
- ) &
- multijob_post_fork
-
- # The configure script assumes it's buggy when cross-compiling.
- export ac_cv_buggy_getaddrinfo=no
- export ac_cv_have_long_long_format=yes
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
- # The configure script fails to use pkg-config correctly.
- # http://bugs.python.org/issue15506
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
-
- # Set LDFLAGS so we link modules with -lpython3.2 correctly.
- # Needed on FreeBSD unless Python 3.2 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- cd "${WORKDIR}"/${CHOST} || die
- ECONF_SOURCE=${S} OPT="" \
- econf \
- --with-fpectl \
- --enable-shared \
- $(use_enable ipv6) \
- $(use_with threads) \
- $(use_with wide-unicode) \
- --infodir='${prefix}/share/info' \
- --mandir='${prefix}/share/man' \
- --with-computed-gotos \
- --with-dbmliborder="${dbmliborder}" \
- --with-libc="" \
- --enable-loadable-sqlite-extensions \
- --with-system-expat \
- --with-system-ffi
-
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
- eerror "configure has detected that the sem_open function is broken."
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
- die "Broken sem_open function (bug 496328)"
- fi
-
- if tc-is-cross-compiler; then
- # Modify the Makefile.pre so we don't regen for the host/ one.
- # We need to link the host python programs into $PWD and run
- # them from here because the distutils sysconfig module will
- # parse Makefile/etc... from argv[0], and we need it to pick
- # up the target settings, not the host ones.
- sed -i \
- -e '1iHOSTPYTHONPATH = ./hostpythonpath:' \
- -e '/^HOSTPYTHON/s:=.*:= ./hostpython:' \
- -e '/^HOSTPGEN/s:=.*:= ./Parser/hostpgen:' \
- Makefile{.pre,} || die "sed failed"
- fi
-
- multijob_finish
-}
-
-src_compile() {
- if tc-is-cross-compiler; then
- cd "${WORKDIR}"/${CBUILD}
- # Disable as many modules as possible -- but we need a few to install.
- PYTHON_DISABLE_MODULES=$(
- sed -n "/Extension('/{s:^.*Extension('::;s:'.*::;p}" "${S}"/setup.py | \
- egrep -v '(unicodedata|time|cStringIO|_struct|binascii)'
- ) \
- PTHON_DISABLE_SSL="1" \
- SYSROOT= \
- emake
- # See comment in src_configure about these.
- ln python ../${CHOST}/hostpython || die
- ln Parser/pgen ../${CHOST}/Parser/hostpgen || die
- ln -s ../${CBUILD}/build/lib.*/ ../${CHOST}/hostpythonpath || die
- fi
-
- cd "${WORKDIR}"/${CHOST} || die
- emake CPPFLAGS="" CFLAGS="" LDFLAGS=""
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version "dev-libs/libffi[pax_kernel]"; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- cd "${WORKDIR}/${CHOST}" || die
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- # Rerun failed tests in verbose mode (regrtest -w).
- PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-w" CPPFLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty
- local result="$?"
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test || die
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
- elog "and run the tests separately."
-
- if [[ "${result}" -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
-
- cd "${WORKDIR}"/${CHOST} || die
- emake DESTDIR="${D}" altinstall
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm "${ED}usr/$(get_libdir)/libpython3.so" || die
-
- if use build; then
- rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter} || die
- else
- use elibc_uclibc && { rm -fr "${libdir}/test" || die; }
- use sqlite || { rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} || die; }
- use tk || { rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die; }
- fi
-
- use threads || { rm -fr "${libdir}/multiprocessing" || die; }
- use wininst || { rm -f "${libdir}/distutils/command/"wininst-*.exe || die; }
-
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- docinto examples
- find "${S}"/Tools -name __pycache__ -exec rm -fr {} + || die
- dodoc -r "${S}"/Tools/.
- fi
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${SLOT}:" \
- -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
-
- # for python-exec
- python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
-
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local PYTHON=./python \
- LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
- export LD_LIBRARY_PATH
- fi
-
- echo "EPYTHON='${EPYTHON}'" > epython.py
- python_domodule epython.py
-}
-
-pkg_postinst() {
- ewarn "Please note that Python ${SLOT} is no longer supported in Gentoo."
- ewarn "The interpreter is not well maintained, and may contain security"
- ewarn "vulnerabilities. Gentoo ebuilds will no longer be built with support"
- ewarn "for Python ${SLOT}."
- ewarn
- ewarn "If you wish to use Python ${SLOT} for your own purposes (development,"
- ewarn "testing), we suggest establishing a virtualenv for this interpreter,"
- ewarn "and installing the necessary dependencies inside it. However, we also"
- ewarn "strongly discourage using Python ${SLOT} on production systems."
-}
diff --git a/dev-lang/python/python-3.3.5.ebuild b/dev-lang/python/python-3.3.5.ebuild
deleted file mode 100644
index 896721e..0000000
--- a/dev-lang/python/python-3.3.5.ebuild
+++ /dev/null
@@ -1,368 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-WANT_AUTOMAKE="none"
-WANT_LIBTOOL="none"
-
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
-
-MY_P="Python-${PV}"
-PATCHSET_VERSION="${PV}-0"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="http://www.python.org/"
-SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="3.3/3.3m"
-KEYWORDS=""
-IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-PYVER=${SLOT%/*}
-
-RDEPEND="app-arch/bzip2:0=
- app-arch/xz-utils:0=
- >=sys-libs/zlib-1.1.3:0=
- virtual/libffi
- virtual/libintl
- !build? (
- gdbm? ( sys-libs/gdbm:0=[berkdb] )
- ncurses? (
- >=sys-libs/ncurses-5.2:0=
- readline? ( >=sys-libs/readline-4.1:0= )
- )
- sqlite? ( >=dev-db/sqlite-3.3.8:3= )
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )
- )
- tk? (
- >=dev-lang/tcl-8.0:0=
- >=dev-lang/tk-8.0:0=
- dev-tcltk/blt:0=
- dev-tcltk/tix
- )
- xml? ( >=dev-libs/expat-2.1:0= )
- )
- !!<sys-apps/sandbox-2.6-r1"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- >=sys-devel/autoconf-2.65
- !sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )
- doc? ( dev-python/python-docs:${PYVER} )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
- # Ensure that internal copies of expat, libffi and zlib are not used.
- rm -fr Modules/expat
- rm -fr Modules/_ctypes/libffi*
- rm -fr Modules/zlib
-
- if tc-is-cross-compiler; then
- # Invokes BUILDPYTHON, which is built for the host arch
- local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
- fi
-
- EPATCH_SUFFIX="patch" EPATCH_EXCLUDE="61_all_process_data.patch" \
- epatch "${FILESDIR}/3.3"
- epatch "${FILESDIR}/${PN}-3.3.5-ncurses-pkg-config.patch"
- epatch "${FILESDIR}/${PN}-3.4-gcc-5.patch" #547626
-
- sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
- Lib/distutils/command/install.py \
- Lib/distutils/sysconfig.py \
- Lib/site.py \
- Lib/sysconfig.py \
- Lib/test/test_site.py \
- Makefile.pre.in \
- Modules/Setup.dist \
- Modules/getpath.c \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
- # bug #514686
- epatch "${FILESDIR}/${PN}-3.3-CVE-2014-4616.patch"
-
- epatch "${FILESDIR}"/${PN}-3.3-libressl.patch
-
- epatch_user
-
- eautoconf
- eautoheader
-}
-
-src_configure() {
- if use build; then
- # Disable extraneous modules with extra dependencies.
- export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
- export PYTHON_DISABLE_SSL="1"
- else
- local disable
- use gdbm || disable+=" gdbm"
- use ncurses || disable+=" _curses _curses_panel"
- use readline || disable+=" readline"
- use sqlite || disable+=" _sqlite3"
- use ssl || export PYTHON_DISABLE_SSL="1"
- use tk || disable+=" _tkinter"
- use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
- export PYTHON_DISABLE_MODULES="${disable}"
-
- if ! use xml; then
- ewarn "You have configured Python without XML support."
- ewarn "This is NOT a recommended configuration as you"
- ewarn "may face problems parsing any XML documents."
- fi
- fi
-
- if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
- einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
- fi
-
- if [[ "$(gcc-major-version)" -ge 4 ]]; then
- append-flags -fwrapv
- fi
-
- filter-flags -malign-double
-
- # https://bugs.gentoo.org/show_bug.cgi?id=50309
- if is-flagq -O3; then
- is-flagq -fstack-protector-all && replace-flags -O3 -O2
- use hardened && replace-flags -O3 -O2
- fi
-
- # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
- tc-export CXX
- # The configure script fails to use pkg-config correctly.
- # http://bugs.python.org/issue15506
- export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
-
- # Set LDFLAGS so we link modules with -lpython3.2 correctly.
- # Needed on FreeBSD unless Python 3.2 is already installed.
- # Please query BSD team before removing this!
- append-ldflags "-L."
-
- local dbmliborder
- if use gdbm; then
- dbmliborder+="${dbmliborder:+:}gdbm"
- fi
-
- BUILD_DIR="${WORKDIR}/${CHOST}"
- mkdir -p "${BUILD_DIR}" || die
- cd "${BUILD_DIR}" || die
-
- ECONF_SOURCE="${S}" OPT="" \
- econf \
- --with-fpectl \
- --enable-shared \
- $(use_enable ipv6) \
- $(use_with threads) \
- --infodir='${prefix}/share/info' \
- --mandir='${prefix}/share/man' \
- --with-computed-gotos \
- --with-dbmliborder="${dbmliborder}" \
- --with-libc="" \
- --enable-loadable-sqlite-extensions \
- --with-system-expat \
- --with-system-ffi
-
- if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
- eerror "configure has detected that the sem_open function is broken."
- eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
- die "Broken sem_open function (bug 496328)"
- fi
-}
-
-src_compile() {
- # Avoid invoking pgen for cross-compiles.
- touch Include/graminit.h Python/graminit.c || die
-
- cd "${BUILD_DIR}" || die
- emake CPPFLAGS="" CFLAGS="" LDFLAGS=""
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- cd "${BUILD_DIR}" || die
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty
- local result="$?"
-
- for test in ${skipped_tests}; do
- mv "${T}/test_${test}.py" "${S}"/Lib/test
- done
-
- elog "The following tests have been skipped:"
- for test in ${skipped_tests}; do
- elog "test_${test}.py"
- done
-
- elog "If you would like to run them, you may:"
- elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
- elog "and run the tests separately."
-
- if [[ "${result}" -ne 0 ]]; then
- die "emake test failed"
- fi
-}
-
-src_install() {
- local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
-
- cd "${BUILD_DIR}" || die
-
- emake DESTDIR="${D}" altinstall
-
- sed \
- -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
- -e "s/\(PY_LDFLAGS=\).*/\1/" \
- -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
-
- # Fix collisions between different slots of Python.
- rm -f "${ED}usr/$(get_libdir)/libpython3.so"
-
- # Cheap hack to get version with ABIFLAGS
- local abiver=$(cd "${ED}usr/include"; echo python*)
- if [[ ${abiver} != python${PYVER} ]]; then
- # Replace python3.X with a symlink to python3.Xm
- rm "${ED}usr/bin/python${PYVER}" || die
- dosym "${abiver}" "/usr/bin/python${PYVER}"
- # Create python3.X-config symlink
- dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
- # Create python-3.5m.pc symlink
- dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
- fi
-
- if use build; then
- rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
- else
- use elibc_uclibc && rm -fr "${libdir}/test"
- use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
- use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
- fi
-
- use threads || rm -fr "${libdir}/multiprocessing"
- use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
-
- dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
- doins -r "${S}"/Tools
- fi
- insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
- local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
- emake --no-print-directory -s -f - 2>/dev/null)
- newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
- newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
- newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
- sed \
- -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
- -e "s:@PYDOC@:pydoc${PYVER}:" \
- -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
-
- # for python-exec
- local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
-
- # if not using a cross-compiler, use the fresh binary
- if ! tc-is-cross-compiler; then
- local -x PYTHON=./python
- local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
- else
- vars=( PYTHON "${vars[@]}" )
- fi
-
- python_export "python${PYVER}" "${vars[@]}"
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-
- # python-exec wrapping support
- local pymajor=${PYVER%.*}
- mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
- # python and pythonX
- ln -s "../../../bin/${abiver}" \
- "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
- ln -s "python${pymajor}" \
- "${D}${PYTHON_SCRIPTDIR}/python" || die
- # python-config and pythonX-config
- # note: we need to create a wrapper rather than symlinking it due
- # to some random dirname(argv[0]) magic performed by python-config
- cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
- #!/bin/sh
- exec "${abiver}-config" "\${@}"
- EOF
- chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
- ln -s "python${pymajor}-config" \
- "${D}${PYTHON_SCRIPTDIR}/python-config" || die
- # 2to3, pydoc, pyvenv
- ln -s "../../../bin/2to3-${PYVER}" \
- "${D}${PYTHON_SCRIPTDIR}/2to3" || die
- ln -s "../../../bin/pydoc${PYVER}" \
- "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
- ln -s "../../../bin/pyvenv-${PYVER}" \
- "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
- # idle
- if use tk; then
- ln -s "../../../bin/idle${PYVER}" \
- "${D}${PYTHON_SCRIPTDIR}/idle" || die
- fi
-}
-
-pkg_preinst() {
- if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
- python_updater_warning="1"
- fi
-}
-
-eselect_python_update() {
- if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
- eselect python update
- fi
-
- if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
- eselect python update --python${PV%%.*}
- fi
-}
-
-pkg_postinst() {
- eselect_python_update
-
- if [[ "${python_updater_warning}" == "1" ]]; then
- ewarn "You have just upgraded from an older version of Python."
- ewarn
- ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
- fi
-}
-
-pkg_postrm() {
- eselect_python_update
-}