public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2020-04-12 11:29 Michał Górny
  0 siblings, 0 replies; 12+ messages in thread
From: Michał Górny @ 2020-04-12 11:29 UTC (permalink / raw
  To: gentoo-commits

commit:     1aafbb4cdaf3067e41a772660b28dc1843ae4e8d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 12 10:34:41 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Apr 12 11:29:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1aafbb4c

dev-lang/python: Fix test failure due to importing numpy in 3.8+

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-lang/python/files/test-__all__-numpy.patch | 13 +++++++++++++
 dev-lang/python/python-3.8.2-r1.ebuild         |  2 ++
 dev-lang/python/python-3.9.0_alpha5.ebuild     |  2 ++
 3 files changed, 17 insertions(+)

diff --git a/dev-lang/python/files/test-__all__-numpy.patch b/dev-lang/python/files/test-__all__-numpy.patch
new file mode 100644
index 00000000000..1b91abbf6f6
--- /dev/null
+++ b/dev-lang/python/files/test-__all__-numpy.patch
@@ -0,0 +1,13 @@
+diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py
+index c077881511..0728bef6c4 100644
+--- a/Lib/test/test___all__.py
++++ b/Lib/test/test___all__.py
+@@ -71,6 +71,8 @@ class AllTest(unittest.TestCase):
+         blacklist = set([
+             # Will raise a SyntaxError when compiling the exec statement
+             '__future__',
++            # imports numpy which causes warnings
++            'test.test_pickletools',
+         ])
+ 
+         if not sys.platform.startswith('java'):

diff --git a/dev-lang/python/python-3.8.2-r1.ebuild b/dev-lang/python/python-3.8.2-r1.ebuild
index 35d43534599..d6b9c2e9ec3 100644
--- a/dev-lang/python/python-3.8.2-r1.ebuild
+++ b/dev-lang/python/python-3.8.2-r1.ebuild
@@ -67,6 +67,8 @@ src_prepare() {
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
 		"${FILESDIR}/test.support.unlink-ignore-PermissionError.patch"
+		# add module importing numpy to blacklist
+		"${FILESDIR}/test-__all__-numpy.patch"
 	)
 
 	default

diff --git a/dev-lang/python/python-3.9.0_alpha5.ebuild b/dev-lang/python/python-3.9.0_alpha5.ebuild
index 49d4c9d5f87..2e9353ebaf6 100644
--- a/dev-lang/python/python-3.9.0_alpha5.ebuild
+++ b/dev-lang/python/python-3.9.0_alpha5.ebuild
@@ -83,6 +83,8 @@ src_prepare() {
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
 		"${FILESDIR}/test.support.unlink-ignore-PermissionError.patch"
+		# add module importing numpy to blacklist
+		"${FILESDIR}/test-__all__-numpy.patch"
 	)
 
 	default


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2020-04-04 18:22 Mike Gilbert
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2020-04-04 18:22 UTC (permalink / raw
  To: gentoo-commits

commit:     4ddeacea98c15971264056972cd6d03631c73aca
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  4 18:21:50 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Apr  4 18:22:49 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ddeacea

dev-lang/python: ignore EACCES instead of EPERM

Fixes: 212bc8ce91237d28de326e84ff8607863602d1f7
Closes: https://bugs.gentoo.org/679628
Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 ...ore-EPERM.patch => test.support.unlink-ignore-EACCES.patch} | 10 +++++-----
 dev-lang/python/python-2.7.17-r2.ebuild                        |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch b/dev-lang/python/files/test.support.unlink-ignore-EACCES.patch
similarity index 76%
rename from dev-lang/python/files/test.support.unlink-ignore-EPERM.patch
rename to dev-lang/python/files/test.support.unlink-ignore-EACCES.patch
index 291398137c7..865a914b410 100644
--- a/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch
+++ b/dev-lang/python/files/test.support.unlink-ignore-EACCES.patch
@@ -1,7 +1,7 @@
-From 789c61e1a1966241d274012cdbd5fb9716448952 Mon Sep 17 00:00:00 2001
+From b8dc49c87f29fa875bd24fe47c741d11962a33b6 Mon Sep 17 00:00:00 2001
 From: Mike Gilbert <floppym@gentoo.org>
-Date: Fri, 3 Apr 2020 10:37:56 -0400
-Subject: [PATCH] test.support.unlink: ignore EPERM
+Date: Sat, 4 Apr 2020 14:11:25 -0400
+Subject: [PATCH] test.support.unlink: ignore EACCES
 
 Resolves test errors when running in the Gentoo sandbox environment.
 
@@ -11,7 +11,7 @@ Bug: https://bugs.gentoo.org/679628
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
-index ccc11c1b4b0..c5ec06bb420 100644
+index ccc11c1b4b0..d47bdebda5c 100644
 --- a/Lib/test/support/__init__.py
 +++ b/Lib/test/support/__init__.py
 @@ -291,7 +291,7 @@ def unlink(filename):
@@ -19,7 +19,7 @@ index ccc11c1b4b0..c5ec06bb420 100644
          _unlink(filename)
      except OSError as exc:
 -        if exc.errno not in (errno.ENOENT, errno.ENOTDIR):
-+        if exc.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EPERM):
++        if exc.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EACCES):
              raise
  
  def rmdir(dirname):

diff --git a/dev-lang/python/python-2.7.17-r2.ebuild b/dev-lang/python/python-2.7.17-r2.ebuild
index c38022f956b..7cb8c9b155e 100644
--- a/dev-lang/python/python-2.7.17-r2.ebuild
+++ b/dev-lang/python/python-2.7.17-r2.ebuild
@@ -88,7 +88,7 @@ src_prepare() {
 
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
-		"${FILESDIR}/test.support.unlink-ignore-EPERM.patch"
+		"${FILESDIR}/test.support.unlink-ignore-EACCES.patch"
 	)
 
 	default


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2020-04-03 14:55 Mike Gilbert
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2020-04-03 14:55 UTC (permalink / raw
  To: gentoo-commits

commit:     212bc8ce91237d28de326e84ff8607863602d1f7
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  3 14:54:43 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr  3 14:55:52 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=212bc8ce

dev-lang/python: ignore EPERM in test.support.unlink()

Closes: https://bugs.gentoo.org/679628
Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/test.support.unlink-ignore-EPERM.patch   | 28 ++++++++++++++++++++++
 ...est.support.unlink-ignore-PermissionError.patch | 28 ++++++++++++++++++++++
 dev-lang/python/python-2.7.17-r1.ebuild            |  1 +
 dev-lang/python/python-3.6.10.ebuild               |  1 +
 dev-lang/python/python-3.7.6.ebuild                |  1 +
 dev-lang/python/python-3.7.7.ebuild                |  1 +
 dev-lang/python/python-3.8.2.ebuild                |  1 +
 dev-lang/python/python-3.9.0_alpha4.ebuild         |  1 +
 dev-lang/python/python-3.9.0_alpha5.ebuild         |  1 +
 9 files changed, 63 insertions(+)

diff --git a/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch b/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch
new file mode 100644
index 00000000000..291398137c7
--- /dev/null
+++ b/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch
@@ -0,0 +1,28 @@
+From 789c61e1a1966241d274012cdbd5fb9716448952 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 3 Apr 2020 10:37:56 -0400
+Subject: [PATCH] test.support.unlink: ignore EPERM
+
+Resolves test errors when running in the Gentoo sandbox environment.
+
+Bug: https://bugs.gentoo.org/679628
+---
+ Lib/test/support/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
+index ccc11c1b4b0..c5ec06bb420 100644
+--- a/Lib/test/support/__init__.py
++++ b/Lib/test/support/__init__.py
+@@ -291,7 +291,7 @@ def unlink(filename):
+     try:
+         _unlink(filename)
+     except OSError as exc:
+-        if exc.errno not in (errno.ENOENT, errno.ENOTDIR):
++        if exc.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EPERM):
+             raise
+ 
+ def rmdir(dirname):
+-- 
+2.26.0
+

diff --git a/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch b/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch
new file mode 100644
index 00000000000..6cae17b5518
--- /dev/null
+++ b/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch
@@ -0,0 +1,28 @@
+From 6e6402caa7962a9c9f7c5327f3c802545824f7f9 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 3 Apr 2020 10:37:56 -0400
+Subject: [PATCH] test.support.unlink: ignore PermissionError
+
+Resolves test errors when running in the Gentoo sandbox environment.
+
+Bug: https://bugs.gentoo.org/679628
+---
+ Lib/test/support/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
+index 1f792d8514d..a0772480eb4 100644
+--- a/Lib/test/support/__init__.py
++++ b/Lib/test/support/__init__.py
+@@ -488,7 +488,7 @@ else:
+ def unlink(filename):
+     try:
+         _unlink(filename)
+-    except (FileNotFoundError, NotADirectoryError):
++    except (FileNotFoundError, NotADirectoryError, PermissionError):
+         pass
+ 
+ def rmdir(dirname):
+-- 
+2.26.0
+

diff --git a/dev-lang/python/python-2.7.17-r1.ebuild b/dev-lang/python/python-2.7.17-r1.ebuild
index 87a23fa5fb6..f38156d7d51 100644
--- a/dev-lang/python/python-2.7.17-r1.ebuild
+++ b/dev-lang/python/python-2.7.17-r1.ebuild
@@ -88,6 +88,7 @@ src_prepare() {
 
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
+		"${FILESDIR}/test.support.unlink-ignore-EPERM.patch"
 	)
 
 	default

diff --git a/dev-lang/python/python-3.6.10.ebuild b/dev-lang/python/python-3.6.10.ebuild
index fabe76bc113..c572c8146d0 100644
--- a/dev-lang/python/python-3.6.10.ebuild
+++ b/dev-lang/python/python-3.6.10.ebuild
@@ -65,6 +65,7 @@ src_prepare() {
 
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
+		"${FILESDIR}/test.support.unlink-ignore-PermissionError.patch"
 	)
 
 	default

diff --git a/dev-lang/python/python-3.7.6.ebuild b/dev-lang/python/python-3.7.6.ebuild
index 35666215d46..8f29c79414d 100644
--- a/dev-lang/python/python-3.7.6.ebuild
+++ b/dev-lang/python/python-3.7.6.ebuild
@@ -66,6 +66,7 @@ src_prepare() {
 
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
+		"${FILESDIR}/test.support.unlink-ignore-PermissionError.patch"
 	)
 
 	default

diff --git a/dev-lang/python/python-3.7.7.ebuild b/dev-lang/python/python-3.7.7.ebuild
index 07492f4fb2a..d57ddee45e6 100644
--- a/dev-lang/python/python-3.7.7.ebuild
+++ b/dev-lang/python/python-3.7.7.ebuild
@@ -66,6 +66,7 @@ src_prepare() {
 
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
+		"${FILESDIR}/test.support.unlink-ignore-PermissionError.patch"
 	)
 
 	default

diff --git a/dev-lang/python/python-3.8.2.ebuild b/dev-lang/python/python-3.8.2.ebuild
index edf2079cfe5..35d43534599 100644
--- a/dev-lang/python/python-3.8.2.ebuild
+++ b/dev-lang/python/python-3.8.2.ebuild
@@ -66,6 +66,7 @@ src_prepare() {
 
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
+		"${FILESDIR}/test.support.unlink-ignore-PermissionError.patch"
 	)
 
 	default

diff --git a/dev-lang/python/python-3.9.0_alpha4.ebuild b/dev-lang/python/python-3.9.0_alpha4.ebuild
index c0e9c0256eb..49d4c9d5f87 100644
--- a/dev-lang/python/python-3.9.0_alpha4.ebuild
+++ b/dev-lang/python/python-3.9.0_alpha4.ebuild
@@ -82,6 +82,7 @@ src_prepare() {
 
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
+		"${FILESDIR}/test.support.unlink-ignore-PermissionError.patch"
 	)
 
 	default

diff --git a/dev-lang/python/python-3.9.0_alpha5.ebuild b/dev-lang/python/python-3.9.0_alpha5.ebuild
index c0e9c0256eb..49d4c9d5f87 100644
--- a/dev-lang/python/python-3.9.0_alpha5.ebuild
+++ b/dev-lang/python/python-3.9.0_alpha5.ebuild
@@ -82,6 +82,7 @@ src_prepare() {
 
 	local PATCHES=(
 		"${WORKDIR}/${PATCHSET}"
+		"${FILESDIR}/test.support.unlink-ignore-PermissionError.patch"
 	)
 
 	default


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2020-03-07 15:45 Michał Górny
  0 siblings, 0 replies; 12+ messages in thread
From: Michał Górny @ 2020-03-07 15:45 UTC (permalink / raw
  To: gentoo-commits

commit:     7fc5957ee0cb88e607f4c1988d91a07cebaf6d96
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  7 15:39:28 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Mar  7 15:39:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fc5957e

dev-lang/python: Remove redundant versions

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-lang/python/Manifest                           |   7 -
 .../python-2.7.10-cross-compile-warn-test.patch    |  24 --
 .../python/files/python-2.7.10-system-libffi.patch |  36 --
 .../files/python-2.7.5-nonfatal-compileall.patch   |  18 -
 .../files/python-2.7.9-ncurses-pkg-config.patch    |  13 -
 dev-lang/python/files/python-3.7.5-hashlib.patch   |  25 --
 dev-lang/python/python-2.7.17.ebuild               | 361 ---------------------
 dev-lang/python/python-3.6.9.ebuild                | 348 --------------------
 dev-lang/python/python-3.7.5-r1.ebuild             | 328 -------------------
 dev-lang/python/python-3.8.1.ebuild                | 343 --------------------
 dev-lang/python/python-3.9.0_alpha2.ebuild         | 324 ------------------
 11 files changed, 1827 deletions(-)

diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index d98cd07888d..84e356a15b4 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,17 +1,10 @@
 DIST Python-2.7.17.tar.xz 12855568 BLAKE2B 6d09214a51d6595fe5253a279ee556d7510dcb9a0e8ad71e9cf73b4fb00c3abd3680e2429f4f87d9387d1fc16d4887f5f33fc600b24b0ca2c70f36bf34df2157 SHA512 2dc19a0b0d818c71429dae94783e58b2aac0fa31f5faa1e840cac06245a59932ecc4658d913515736601bcf70a78c9ec60367aed75f4567d1e41ff3bb104da9a
 DIST Python-3.6.10.tar.xz 17212220 BLAKE2B 822e231cf2755e6477e49e9128a983185a4f1e30e9d6c221f1b5720891c0de345e8c5402af458d3627eba124e75fea4b5daa94e01b0eaddc116dc3281263ecbe SHA512 26147099e1f1a0ffc85febad26e18e991f019599a150887ea0b925e34663fad8e03b3c2a941e2770c1a63960695e173ef32709572c9361e7f2cb862ccf75b28a
-DIST Python-3.6.9.tar.xz 17212164 BLAKE2B ef33dbc1ea3bbeaf92092de867279d759e3a204ca4e8bf0e5c6a1adbb17a9220d8829245fa9f067ec6497a5789a4f60b8db8c727bb2bd8126df470921d552a53 SHA512 05de9c6f44d96a52bfce10ede4312de892573edaf8bece65926d19973a3a800d65eed7a857af945f69efcfb25efa3788e7a54016b03d80b611eb51c3ea074819
-DIST Python-3.7.5.tar.xz 17236432 BLAKE2B fb49a3bfd9b1944d567a45682f789ef840e63ed610e0dddb5695da7a84a0bcb50a6fa52097722f09b57d6fc15a5f89aeaa46a061125219e597897086f3dffe40 SHA512 f4f3879881f260f58dbb041fb0f2f210d4b70b02a739e41e50e6fea67d31855a7a29ce4ebef66bfde3d0edf54b946a48f78490f986da965357b835d4dbb3f414
 DIST Python-3.7.6.tar.xz 17246360 BLAKE2B b83a440a1ad5b1a2210e03be0522d39f53778774ea725fa41aaaab28cccfcdf007996f1a1d3cb95f8040b71b692189e28db67ba6ec136af82158363a1aadbba6 SHA512 5be022c384728b0c6709d165486f66226d126c521b466ed24d0c4c3c5910ec786a734f4c2c916ac409213c54a492b9fb230fb721c41e3de281676a7e9d8f3171
-DIST Python-3.8.1.tar.xz 17828408 BLAKE2B db1841625de89b812cadcd538a990401a4e49d43968dce733c289121e9de9749eaf39e1c772a32e10ed2b40bef215b19ae9c7d88e0ec9e99cd3d467406ea063c SHA512 d41381848cc1ec8009643b71875f395a9ac2c8e12a5b1efef33caf8a9e99a337c790d4354695c85352d11b62092ae372b5af62f78724363fcbf3504ff9a6ddca
 DIST Python-3.8.2.tar.xz 17869888 BLAKE2B f42b35bea5e65f1f0a3fa6f1fd3d749fba3fa46d958608a314c1a98d0e3ca890e856da4d40ee489fe546fc02ce0fc9fa2daaaba96a8928d92ae7eb3d2dda3fe4 SHA512 ca37ad0e7c5845f5f228566aa8ff654a8f428c7d4a5aaabff29baebb0ca3219b31ba8bb2607f89e37cf3fc564f023b8407e53a4f2c47bd99122c1cc222613e37
-DIST Python-3.9.0a2.tar.xz 17988748 BLAKE2B 3d6a6facacb49d8eeaf01c3194bad8e6c920bd03a8f50ac171016fd61288120dfa06af50583c647e5850b5965fc41e03515042ef1594ec4dcbf39794e999b61a SHA512 3f17869f3ca4db423f66e145e67c9fb4935d8c908c5362de585898343190edb901861701e27ab9187a287880ee42bbb4897aa298967c1862f44b12dbab19d412
 DIST Python-3.9.0a4.tar.xz 18032300 BLAKE2B 1c9ad55c7c055c3a704c4062e092d44b8d778e334e05589e7166777da328df54ef257aeb2e203416710bb9f9f1571d7700c2c12aed5b8e63adf7a1b3aedb08b5 SHA512 8f7ca0a891fb7e7868dfe5f040e9ceb7ce14d036bc5d9eae1493570c5a9631832e796a1972590c444d2347c585b0c8216345375dd1476b4da7bd47e187591afc
 DIST python-gentoo-patches-2.7.17-r1.tar.xz 14708 BLAKE2B f6e25236a471649de122d0f29506f7a4f34044a568ead47a68980411d9722b761fe1f9d653d5edccb6978b65c8c1eecbef55f403b94f32b37c0ad68e061505a8 SHA512 ecdde5e38c6fe5e69691fb3a68c8f4f43da7857d4abaff763d3cf6ad864ba43c769c03b186b60f2736a1ffb1e3e4c9982715d1b8a99ff3f5740096153bb8a90f
-DIST python-gentoo-patches-2.7.17.tar.xz 13476 BLAKE2B 788688e2941d2d6d4f768168881b2c3639213a97e214557b3a93f8db44d81e2b6d70be847b7462e54e3786660ebee4ee331402081d92167d74ad149279c3f389 SHA512 1641737635d33607a77ed2ee2462854cec603be39737de3f81abb188702aaf46f039d1616f9dcd413da1f4a8040175c66a2883e496132c2e4ebe8f860b36f9f1
 DIST python-gentoo-patches-3.6.10.tar.xz 10964 BLAKE2B e32c8cb3050c7324ee234f585be7fc40cfacc6ad87759eaa300e57289e6dc6cbaed3913f33ad632b8754638e8d71983d8364ceeaad8ef325cfa6d4d2dfb56df0 SHA512 71fea7306c876c63888c4547eaf14dc2e0413dec343609d748cd1b5888e4605d47888758ebc5120a287ce833b69dd538073f91989460da7c40462b53eefca7ce
-DIST python-gentoo-patches-3.6.8.tar.xz 11224 BLAKE2B 5fe38282bcf28df18e0bd37756c880ae191ea738dc92f1cf83f682cfdc52525b9c44287dc99191a73d75c90672ab501b56adf49515b35ff1fdee88c8dc07b175 SHA512 89e700663db25d6d78eee1d4bfdab686c5341a794062f3a63df3485ac0b58deb4b4885d24701f3ae138d06ca783be92e310e1100c6d633910c33732f3cb0d7df
-DIST python-gentoo-patches-3.7.4-1.tar.xz 10100 BLAKE2B 63e8fada89b64b59ba083745626a1e8a07bec0cf93b7b6ab405c33a0f2932cbe497a331c52895a07f10434b230c438f27c9582efecdd57f3bad15d9aa604d157 SHA512 11b0e811a9890a1235c85426061b35f9964eba64cac0536f4c9e0498b1cc66eb005f14aed34eead735b43e91c2b5babced60e3310f5329231a1706871b95b547
 DIST python-gentoo-patches-3.7.6.tar.xz 10084 BLAKE2B 220869e85bdaf9c21b1b05e13803bdb6ecc22ac0f69da77e57fd7c1cd93ef45ec43401b62732842e1bb3467feb6d65c8204120e2741e9eb6f4cab673fd3a8d62 SHA512 4c04b0cf7da55fa7973ab178e3ac2c59bc2142924bdced5954c058053280b6c663d7c39912286d10fe0e82ca30af6a0dd6a56fa85433f836217ca3dcbb284def
 DIST python-gentoo-patches-3.8.1-r2.tar.xz 10108 BLAKE2B 02d3e2ae95b5cfa67c0ba4ff618fbee51d2342955d0a064b80575beda73902bd72462e4f6dba63743bf9fc031d92c69153ef8bd8a0ab5d6e17bfdf8ed0152da5 SHA512 757f7cf6b0cb6c1493d8ed8e5780780efcb32860a9aeba4f933a3a3fb22c412bebde8854e34609465d8a12cb9545a7b19e5d5dbe87d772bb83acd9fe829b75cc
 DIST python-gentoo-patches-3.9.0_alpha2.tar.xz 8340 BLAKE2B b93edca01fa46c8eb4e18e0d92c72a3e4ef8dcebf26c0e1c0fab4c82201645ed4c358cf2311c9eb454f6a261ab514985302f81fc86284d3714d662037928963c SHA512 58b0a64d8747f187e6cc4749dc660a443c066e43f509ecc2976b6406bbfb3851a03f686adc36bd58c7c3142a707a387ac25431ca078980914d2219c49a0f2202

diff --git a/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch b/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch
deleted file mode 100644
index 38433de925e..00000000000
--- a/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://bugs.python.org/issue25397
-
-improve the cross-compile tests to be more focused
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -1339,7 +1339,7 @@ if test "$GCC" = "yes"
- then
-   AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
-   save_CFLAGS=$CFLAGS
--  CFLAGS="$CFLAGS -Werror -Wformat"
-+  CFLAGS="$CFLAGS -Werror=format"
-   AC_COMPILE_IFELSE([
-     AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
-   ],[
-@@ -4458,7 +4458,7 @@ then
-   [ac_cv_have_long_long_format="cross -- assuming no"
-    if test x$GCC = xyes; then
-     save_CFLAGS=$CFLAGS
--    CFLAGS="$CFLAGS -Werror -Wformat"
-+    CFLAGS="$CFLAGS -Werror=format"
-     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-         #include <stdio.h>
-         #include <stddef.h>

diff --git a/dev-lang/python/files/python-2.7.10-system-libffi.patch b/dev-lang/python/files/python-2.7.10-system-libffi.patch
deleted file mode 100644
index 0b49b794bd8..00000000000
--- a/dev-lang/python/files/python-2.7.10-system-libffi.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-make sure we respect the system libffi setting in our build config.
-the compiler probing is fragile and can break in some situations.
-
---- a/setup.py
-+++ b/setup.py
-@@ -2069,7 +2069,7 @@ class PyBuildExt(build_ext):
-         return True
- 
-     def detect_ctypes(self, inc_dirs, lib_dirs):
--        self.use_system_libffi = False
-+        self.use_system_libffi = ('--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"))
-         include_dirs = []
-         extra_compile_args = []
-         extra_link_args = []
-@@ -2113,7 +2113,7 @@ class PyBuildExt(build_ext):
-                              sources=['_ctypes/_ctypes_test.c'])
-         self.extensions.extend([ext, ext_test])
- 
--        if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
-+        if not self.use_system_libffi:
-             return
- 
-         if host_platform == 'darwin':
-@@ -2141,10 +2141,10 @@ class PyBuildExt(build_ext):
-                     ffi_lib = lib_name
-                     break
- 
--        if ffi_inc and ffi_lib:
-+        if ffi_inc:
-             ext.include_dirs.extend(ffi_inc)
-+        if ffi_lib:
-             ext.libraries.append(ffi_lib)
--            self.use_system_libffi = True
- 
- 
- class PyBuildInstall(install):

diff --git a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch b/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch
deleted file mode 100644
index a762dfb1088..00000000000
--- a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/Makefile.pre.in b/Makefile.pre.in
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1000,12 +1000,12 @@
- 		$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
- 			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
- 	fi
--	PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
-+	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
- 		$(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST) -f \
- 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- 		$(DESTDIR)$(LIBDEST)
--	PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-+	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- 		$(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
- 		-d $(LIBDEST) -f \
- 		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \

diff --git a/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch b/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch
deleted file mode 100644
index 38ce6f78b91..00000000000
--- a/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-do not hardcode /usr/include paths
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -4316,7 +4316,7 @@ fi
- 
- # first curses configure 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/files/python-3.7.5-hashlib.patch b/dev-lang/python/files/python-3.7.5-hashlib.patch
deleted file mode 100644
index a70a4796310..00000000000
--- a/dev-lang/python/files/python-3.7.5-hashlib.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 2c0c356ca109d1550bfb09b0da7dec3f80db77a3 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Fri, 18 Oct 2019 16:39:16 -0400
-Subject: [PATCH] Call OPENSSL_init_crypto for openssl >= 1.1.0
-
----
- Modules/_hashopenssl.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
-index b13ade60496..8abbde5120f 100644
---- a/Modules/_hashopenssl.c
-+++ b/Modules/_hashopenssl.c
-@@ -1077,6 +1077,8 @@ PyInit__hashlib(void)
-     /* Load all digest algorithms and initialize cpuid */
-     OPENSSL_add_all_algorithms_noconf();
-     ERR_load_crypto_strings();
-+#else
-+    OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS|OPENSSL_INIT_ADD_ALL_DIGESTS, NULL);
- #endif
- 
-     /* TODO build EVP_functions openssl_* entries dynamically based
--- 
-2.23.0
-

diff --git a/dev-lang/python/python-2.7.17.ebuild b/dev-lang/python/python-2.7.17.ebuild
deleted file mode 100644
index 52061f5125f..00000000000
--- a/dev-lang/python/python-2.7.17.ebuild
+++ /dev/null
@@ -1,361 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
-
-MY_P="Python-${PV}"
-PATCHSET_VERSION="2.7.17"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
-	https://dev.gentoo.org/~mgorny/dist/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="2.7"
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86"
-IUSE="-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +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:0=
-	dev-libs/libffi:=
-	>=sys-libs/zlib-1.1.3:0=
-	virtual/libintl
-	berkdb? ( || (
-		sys-libs/db:5.3
-		sys-libs/db:5.1
-		sys-libs/db:4.8
-		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: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:0= )
-	)
-	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 )
-	!!<sys-apps/portage-2.1.9"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
-	bluetooth? ( net-wireless/bluez )
-	virtual/pkgconfig
-	>=sys-devel/autoconf-2.65
-	!sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )
-	doc? ( dev-python/python-docs:${SLOT} )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-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
-
-	if tc-is-cross-compiler; then
-		rm "${WORKDIR}/patches/0006-Regenerate-platform-specific-modules.patch" || die
-	fi
-
-	local PATCHES=(
-		"${WORKDIR}/patches"
-		# Fix for cross-compiling.
-		"${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
-		"${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
-		"${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
-		"${FILESDIR}/python-2.7.10-system-libffi.patch"
-	)
-
-	default
-
-	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@@"
-
-	eautoreconf
-}
-
-src_configure() {
-		# 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"
-		# disable automagic bluetooth headers detection
-		use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
-		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
-
-	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
-
-	if tc-is-cross-compiler; then
-		# Force some tests that try to poke fs paths.
-		export ac_cv_file__dev_ptc=no
-		export ac_cv_file__dev_ptmx=yes
-	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.7 correctly.
-	# Needed on FreeBSD unless Python 2.7 is already installed.
-	# Please query BSD team before removing this!
-	append-ldflags "-L."
-
-	local dbmliborder
-	if use gdbm; then
-		dbmliborder+="${dbmliborder:+:}gdbm"
-	fi
-	if use berkdb; then
-		dbmliborder+="${dbmliborder:+:}bdb"
-	fi
-
-	local myeconfargs=(
-		# The check is broken on clang, and gives false positive:
-		# https://bugs.gentoo.org/596798
-		# (upstream dropped this flag in 3.2a4 anyway)
-		ac_cv_opt_olimit_ok=no
-
-		--with-fpectl
-		--enable-shared
-		$(use_enable ipv6)
-		$(use_with threads)
-		$(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2")
-		--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
-		--without-ensurepip
-	)
-
-	OPT= econf "${myeconfargs[@]}"
-
-	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
-
-	emake
-
-	# 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
-
-	# Skip failing tests.
-	local skipped_tests="distutils gdb"
-
-	for test in ${skipped_tests}; do
-		mv "${S}"/Lib/test/test_${test}.py "${T}"
-	done
-
-	# bug 660358
-	local -x COLUMNS=80
-
-	# Daylight saving time problem
-	# https://bugs.python.org/issue22067
-	# https://bugs.gentoo.org/610628
-	local -x TZ=UTC
-
-	# Rerun failed tests in verbose mode (regrtest -w).
-	emake test EXTRATESTOPTS="-w" < /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${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}
-
-	emake DESTDIR="${D}" altinstall
-
-	sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed"
-
-	# Fix collisions between different slots of Python.
-	mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
-	mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
-	mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
-	rm -f "${ED}usr/bin/smtpd.py"
-
-	use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
-	use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
-	use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die
-	use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
-
-	use threads || rm -r "${libdir}/multiprocessing" || die
-	use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die
-
-	dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
-
-	if use examples; then
-		docinto examples
-		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
-	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}:}${PWD}
-	else
-		vars=( PYTHON "${vars[@]}" )
-	fi
-
-	python_export "python${SLOT}" "${vars[@]}"
-	echo "EPYTHON='${EPYTHON}'" > epython.py || die
-	python_domodule epython.py
-
-	# python-exec wrapping support
-	local pymajor=${SLOT%.*}
-	mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
-	# python and pythonX
-	ln -s "../../../bin/python${SLOT}" "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
-	ln -s "python${pymajor}" "${D}${PYTHON_SCRIPTDIR}/python" || die
-	# python-config and pythonX-config
-	ln -s "../../../bin/python${SLOT}-config" "${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-${SLOT}" "${D}${PYTHON_SCRIPTDIR}/2to3" || die
-	ln -s "../../../bin/pydoc${SLOT}" "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
-	# idle
-	if use tk; then
-		ln -s "../../../bin/idle${SLOT}" "${D}${PYTHON_SCRIPTDIR}/idle" || die
-	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
-}
-
-pkg_postrm() {
-	eselect_python_update
-}

diff --git a/dev-lang/python/python-3.6.9.ebuild b/dev-lang/python/python-3.6.9.ebuild
deleted file mode 100644
index bd7684dfc7f..00000000000
--- a/dev-lang/python/python-3.6.9.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
-
-MY_P="Python-${PV}"
-PATCHSET_VERSION="3.6.8"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
-	https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="3.6/3.6m"
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:0=
-	app-arch/xz-utils:0=
-	dev-libs/libffi:=
-	>=sys-libs/zlib-1.1.3:0=
-	virtual/libintl
-	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:0= )
-	)
-	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= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
-	bluetooth? ( net-wireless/bluez )
-	test? ( app-arch/xz-utils[extra-filters(+)] )
-	virtual/pkgconfig
-	!sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-S="${WORKDIR}/${MY_P}"
-PYVER=${SLOT%/*}
-
-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
-
-	local PATCHES=(
-		"${WORKDIR}/patches"
-	)
-
-	default
-
-	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 \
-		configure.ac \
-		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
-	eautoreconf
-}
-
-src_configure() {
-	local disable
-	# disable automagic bluetooth headers detection
-	use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
-	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
-
-	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
-
-	# 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
-
-	local myeconfargs=(
-		--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
-		--without-ensurepip
-		--with-system-expat
-		--with-system-ffi
-	)
-
-	OPT="" econf "${myeconfargs[@]}"
-
-	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() {
-	# Ensure sed works as expected
-	# https://bugs.gentoo.org/594768
-	local -x LC_ALL=C
-
-	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
-
-	# Skip failing tests.
-	local skipped_tests="gdb"
-
-	for test in ${skipped_tests}; do
-		mv "${S}"/Lib/test/test_${test}.py "${T}"
-	done
-
-	# bug 660358
-	local -x COLUMNS=80
-
-	local -x PYTHONDONTWRITEBYTECODE=
-
-	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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}
-
-	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
-
-	# python seems to get rebuilt in src_install (bug 569908)
-	# Work around it for now.
-	if has_version dev-libs/libffi[pax_kernel]; then
-		pax-mark E "${ED}usr/bin/${abiver}"
-	else
-		pax-mark m "${ED}usr/bin/${abiver}"
-	fi
-
-	use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
-	use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
-	use threads || rm -r "${libdir}/multiprocessing" || die
-	use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
-	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}:}${PWD}
-	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
-}

diff --git a/dev-lang/python/python-3.7.5-r1.ebuild b/dev-lang/python/python-3.7.5-r1.ebuild
deleted file mode 100644
index 96894e93b7f..00000000000
--- a/dev-lang/python/python-3.7.5-r1.ebuild
+++ /dev/null
@@ -1,328 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
-
-MY_P="Python-${PV}"
-PATCHSET_VERSION="3.7.4-1"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
-	https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="3.7/3.7m"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:0=
-	app-arch/xz-utils:0=
-	dev-libs/libffi:=
-	sys-apps/util-linux:0=
-	>=sys-libs/zlib-1.1.3:0=
-	virtual/libintl
-	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:0= )
-	)
-	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= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
-	bluetooth? ( net-wireless/bluez )
-	test? ( app-arch/xz-utils[extra-filters(+)] )
-	virtual/pkgconfig
-	!sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-S="${WORKDIR}/${MY_P}"
-PYVER=${SLOT%/*}
-
-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
-
-	local PATCHES=(
-		"${FILESDIR}/python-3.7.5-hashlib.patch"
-		"${WORKDIR}/patches"
-	)
-
-	default
-
-	sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
-		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
-	eautoreconf
-}
-
-src_configure() {
-	local disable
-	# disable automagic bluetooth headers detection
-	use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
-	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
-
-	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
-
-	# 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."
-
-	# Fix implicit declarations on cross and prefix builds. Bug #674070.
-	use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
-	local dbmliborder
-	if use gdbm; then
-		dbmliborder+="${dbmliborder:+:}gdbm"
-	fi
-
-	local myeconfargs=(
-		--enable-shared
-		$(use_enable ipv6)
-		--infodir='${prefix}/share/info'
-		--mandir='${prefix}/share/man'
-		--with-computed-gotos
-		--with-dbmliborder="${dbmliborder}"
-		--with-libc=
-		--enable-loadable-sqlite-extensions
-		--without-ensurepip
-		--with-system-expat
-		--with-system-ffi
-	)
-
-	OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
-	# Ensure sed works as expected
-	# https://bugs.gentoo.org/594768
-	local -x LC_ALL=C
-
-	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
-
-	# Skip failing tests.
-	local skipped_tests="gdb"
-
-	for test in ${skipped_tests}; do
-		mv "${S}"/Lib/test/test_${test}.py "${T}"
-	done
-
-	# bug 660358
-	local -x COLUMNS=80
-
-	local -x PYTHONDONTWRITEBYTECODE=
-
-	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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/lib/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/lib/python${PYVER}
-
-	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
-
-	# python seems to get rebuilt in src_install (bug 569908)
-	# Work around it for now.
-	if has_version dev-libs/libffi[pax_kernel]; then
-		pax-mark E "${ED}/usr/bin/${abiver}"
-	else
-		pax-mark m "${ED}/usr/bin/${abiver}"
-	fi
-
-	use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
-	use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
-	use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
-	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}:}${PWD}
-	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
-}

diff --git a/dev-lang/python/python-3.8.1.ebuild b/dev-lang/python/python-3.8.1.ebuild
deleted file mode 100644
index b499fa145ea..00000000000
--- a/dev-lang/python/python-3.8.1.ebuild
+++ /dev/null
@@ -1,343 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
-
-MY_P="Python-${PV}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}-r2"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
-	https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
-	app-arch/xz-utils:=
-	dev-libs/libffi:=
-	sys-apps/util-linux:=
-	>=sys-libs/zlib-1.1.3:=
-	virtual/libcrypt:=
-	virtual/libintl
-	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? (
-		!libressl? ( dev-libs/openssl:= )
-		libressl? ( dev-libs/libressl:= )
-	)
-	tk? (
-		>=dev-lang/tcl-8.0:=
-		>=dev-lang/tk-8.0:=
-		dev-tcltk/blt:=
-		dev-tcltk/tix
-	)
-	xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
-	bluetooth? ( net-wireless/bluez )
-	test? ( app-arch/xz-utils[extra-filters(+)] )
-	virtual/pkgconfig
-	!sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-src_prepare() {
-	# Ensure that internal copies of expat, libffi and zlib are not used.
-	rm -fr Modules/expat || die
-	rm -fr Modules/_ctypes/libffi* || die
-	rm -fr Modules/zlib || die
-
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-
-	default
-
-	sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
-		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
-	eautoreconf
-}
-
-src_configure() {
-	local disable
-	# disable automagic bluetooth headers detection
-	use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
-	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
-
-	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
-
-	# https://bugs.gentoo.org/700012
-	if is-flagq -flto || is-flagq '-flto=*'; then
-		append-cflags $(test-flags-CC -ffat-lto-objects)
-	fi
-
-	# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
-	tc-export CXX
-
-	# 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."
-
-	# Fix implicit declarations on cross and prefix builds. Bug #674070.
-	use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
-	local dbmliborder
-	if use gdbm; then
-		dbmliborder+="${dbmliborder:+:}gdbm"
-	fi
-
-	local myeconfargs=(
-		--enable-shared
-		$(use_enable ipv6)
-		--infodir='${prefix}/share/info'
-		--mandir='${prefix}/share/man'
-		--with-computed-gotos
-		--with-dbmliborder="${dbmliborder}"
-		--with-libc=
-		--enable-loadable-sqlite-extensions
-		--without-ensurepip
-		--with-system-expat
-		--with-system-ffi
-	)
-
-	OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
-	# Ensure sed works as expected
-	# https://bugs.gentoo.org/594768
-	local -x LC_ALL=C
-
-	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
-
-	# Skip failing tests.
-	local skipped_tests="gdb"
-
-	for test in ${skipped_tests}; do
-		mv "${S}"/Lib/test/test_${test}.py "${T}"
-	done
-
-	# bug 660358
-	local -x COLUMNS=80
-
-	local -x PYTHONDONTWRITEBYTECODE=
-
-	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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/lib/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/lib/python${PYVER}
-
-	emake DESTDIR="${D}" altinstall
-
-	# Remove static library
-	rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
-	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 "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
-	# 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
-
-	# python seems to get rebuilt in src_install (bug 569908)
-	# Work around it for now.
-	if has_version dev-libs/libffi[pax_kernel]; then
-		pax-mark E "${ED}/usr/bin/${abiver}"
-	else
-		pax-mark m "${ED}/usr/bin/${abiver}"
-	fi
-
-	use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
-	use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
-	use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
-
-	dodoc Misc/{ACKS,HISTORY,NEWS}
-
-	if use examples; then
-		docinto examples
-		find Tools -name __pycache__ -exec rm -fr {} + || die
-		dodoc -r 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}:}${PWD}
-	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
-	ln -s "../../../bin/2to3-${PYVER}" \
-		"${D}${PYTHON_SCRIPTDIR}/2to3" || die
-	ln -s "../../../bin/pydoc${PYVER}" \
-		"${D}${PYTHON_SCRIPTDIR}/pydoc" || 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
-}

diff --git a/dev-lang/python/python-3.9.0_alpha2.ebuild b/dev-lang/python/python-3.9.0_alpha2.ebuild
deleted file mode 100644
index 008fa25cdf6..00000000000
--- a/dev-lang/python/python-3.9.0_alpha2.ebuild
+++ /dev/null
@@ -1,324 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-WANT_LIBTOOL="none"
-
-inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \
-	toolchain-funcs
-
-MY_P="Python-${PV/_alpha/a}"
-PYVER=$(ver_cut 1-2)
-PATCHSET="python-gentoo-patches-${PV}"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
-	https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="PSF-2"
-SLOT="${PYVER}"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:=
-	app-arch/xz-utils:=
-	dev-libs/libffi:=
-	sys-apps/util-linux:=
-	>=sys-libs/zlib-1.1.3:=
-	virtual/libcrypt:=
-	virtual/libintl
-	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? (
-		!libressl? ( dev-libs/openssl:= )
-		libressl? ( dev-libs/libressl:= )
-	)
-	tk? (
-		>=dev-lang/tcl-8.0:=
-		>=dev-lang/tk-8.0:=
-		dev-tcltk/blt:=
-		dev-tcltk/tix
-	)
-	xml? ( >=dev-libs/expat-2.1:= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
-	bluetooth? ( net-wireless/bluez )
-	test? ( app-arch/xz-utils[extra-filters(+)] )
-	virtual/pkgconfig
-	!sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-# large file tests involve a 2.5G file being copied (duplicated)
-CHECKREQS_DISK_BUILD=5500M
-
-pkg_pretend() {
-	use test && check-reqs_pkg_pretend
-
-	ewarn "This is an early developer preview of Python 3.9.  New features"
-	ewarn "can still be added up to 2020-05-18.  It's not suitable for production"
-	ewarn "use, and it is not supported for Gentoo packages."
-}
-
-pkg_setup() {
-	use test && check-reqs_pkg_setup
-}
-
-src_prepare() {
-	# Ensure that internal copies of expat, libffi and zlib are not used.
-	rm -fr Modules/expat || die
-	rm -fr Modules/_ctypes/libffi* || die
-	rm -fr Modules/zlib || die
-
-	local PATCHES=(
-		"${WORKDIR}/${PATCHSET}"
-	)
-
-	default
-
-	sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
-		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
-	eautoreconf
-}
-
-src_configure() {
-	local disable
-	# disable automagic bluetooth headers detection
-	use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
-	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
-
-	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
-
-	# https://bugs.gentoo.org/700012
-	if is-flagq -flto || is-flagq '-flto=*'; then
-		append-cflags $(test-flags-CC -ffat-lto-objects)
-	fi
-
-	# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
-	tc-export CXX
-
-	# 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."
-
-	# Fix implicit declarations on cross and prefix builds. Bug #674070.
-	use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
-
-	local dbmliborder
-	if use gdbm; then
-		dbmliborder+="${dbmliborder:+:}gdbm"
-	fi
-
-	local myeconfargs=(
-		--enable-shared
-		$(use_enable ipv6)
-		--infodir='${prefix}/share/info'
-		--mandir='${prefix}/share/man'
-		--with-computed-gotos
-		--with-dbmliborder="${dbmliborder}"
-		--with-libc=
-		--enable-loadable-sqlite-extensions
-		--without-ensurepip
-		--with-system-expat
-		--with-system-ffi
-	)
-
-	OPT="" econf "${myeconfargs[@]}"
-}
-
-src_compile() {
-	# Ensure sed works as expected
-	# https://bugs.gentoo.org/594768
-	local -x LC_ALL=C
-
-	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
-
-	# Skip failing tests.
-	local skipped_tests="gdb"
-
-	for test in ${skipped_tests}; do
-		mv "${S}"/Lib/test/test_${test}.py "${T}"
-	done
-
-	# bug 660358
-	local -x COLUMNS=80
-
-	local -x PYTHONDONTWRITEBYTECODE=
-
-	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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/lib/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/lib/python${PYVER}
-
-	emake DESTDIR="${D}" altinstall
-
-	# Remove static library
-	rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
-
-	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 "${ED}/usr/$(get_libdir)/libpython3.so" || die
-
-	# 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
-
-	# python seems to get rebuilt in src_install (bug 569908)
-	# Work around it for now.
-	if has_version dev-libs/libffi[pax_kernel]; then
-		pax-mark E "${ED}/usr/bin/${abiver}"
-	else
-		pax-mark m "${ED}/usr/bin/${abiver}"
-	fi
-
-	use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
-	use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
-
-	dodoc Misc/{ACKS,HISTORY,NEWS}
-
-	if use examples; then
-		docinto examples
-		find Tools -name __pycache__ -exec rm -fr {} + || die
-		dodoc -r 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}:}${PWD}
-	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
-	ln -s "../../../bin/2to3-${PYVER}" \
-		"${D}${PYTHON_SCRIPTDIR}/2to3" || die
-	ln -s "../../../bin/pydoc${PYVER}" \
-		"${D}${PYTHON_SCRIPTDIR}/pydoc" || die
-	# idle
-	if use tk; then
-		ln -s "../../../bin/idle${PYVER}" \
-			"${D}${PYTHON_SCRIPTDIR}/idle" || die
-	fi
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2020-01-03  8:27 Michał Górny
  0 siblings, 0 replies; 12+ messages in thread
From: Michał Górny @ 2020-01-03  8:27 UTC (permalink / raw
  To: gentoo-commits

commit:     752d072cccd6a048f78ed59eb1a45a07f6d22e8a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  3 08:13:35 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan  3 08:27:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=752d072c

dev-lang/python: Remove 3.5*

Python 3.5 is no longer supported.  A clean ebuild for the interpreter
now resides in ::python.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-lang/python/Manifest                           |   3 -
 dev-lang/python/files/3.6-disable-nis.patch        |  21 --
 .../files/python-3.4.3-ncurses-pkg-config.patch    |  13 -
 .../files/python-3.5-distutils-OO-build.patch      |  80 -----
 .../python/files/python-3.5.5-hash-unaligned.patch |  43 ---
 dev-lang/python/python-3.5.7.ebuild                | 367 ---------------------
 dev-lang/python/python-3.5.9.ebuild                | 367 ---------------------
 7 files changed, 894 deletions(-)

diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 5cce34e4461..9a8ed640988 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,7 +1,5 @@
 DIST Python-2.7.16.tar.xz 12752104 BLAKE2B 7d6b5b853f9974d44e04dd35ecdffaab87511e183b4b01dd4f8f4ee109c4b4ab208f045708f69717be9d3a706aa078b71438ed482c062c0b89c12730eae074ae SHA512 16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0
 DIST Python-2.7.17.tar.xz 12855568 BLAKE2B 6d09214a51d6595fe5253a279ee556d7510dcb9a0e8ad71e9cf73b4fb00c3abd3680e2429f4f87d9387d1fc16d4887f5f33fc600b24b0ca2c70f36bf34df2157 SHA512 2dc19a0b0d818c71429dae94783e58b2aac0fa31f5faa1e840cac06245a59932ecc4658d913515736601bcf70a78c9ec60367aed75f4567d1e41ff3bb104da9a
-DIST Python-3.5.7.tar.xz 15324736 BLAKE2B 0f1dd80584385b7f859652c85dc6b51bf71cd9f1d53fcf1716c54e8ffc3d2a36ef9969956e4429ac1ba878dad1e9acbb5f82ddb6a9923886bf3c84b3327dfecb SHA512 83f57451e1d7082bf19e4e49a0902e9257e381836d9a04154a6b276135fa49e5c96b6869eed9ec4475e06b76556c1ae89f5cca111b762eb8b2dee6f65373e0f4
-DIST Python-3.5.9.tar.xz 15388876 BLAKE2B 6086ed2350b6dce3203360f24c2fddf77df65a5815d6da019809796b30c2f43440a9e349c7defd0187cfc3a50a387352dfa63594c2ec513dd6bf585e7c34ec51 SHA512 58127793adef42ed57ae4d56338268866e14c2d084f09f57f26fc6b1c9454e70cc6d3dffc638f8d56f182acc0884021a4dbb578f312dd6fc01995fa85e31377e
 DIST Python-3.6.10.tar.xz 17212220 BLAKE2B 822e231cf2755e6477e49e9128a983185a4f1e30e9d6c221f1b5720891c0de345e8c5402af458d3627eba124e75fea4b5daa94e01b0eaddc116dc3281263ecbe SHA512 26147099e1f1a0ffc85febad26e18e991f019599a150887ea0b925e34663fad8e03b3c2a941e2770c1a63960695e173ef32709572c9361e7f2cb862ccf75b28a
 DIST Python-3.6.9.tar.xz 17212164 BLAKE2B ef33dbc1ea3bbeaf92092de867279d759e3a204ca4e8bf0e5c6a1adbb17a9220d8829245fa9f067ec6497a5789a4f60b8db8c727bb2bd8126df470921d552a53 SHA512 05de9c6f44d96a52bfce10ede4312de892573edaf8bece65926d19973a3a800d65eed7a857af945f69efcfb25efa3788e7a54016b03d80b611eb51c3ea074819
 DIST Python-3.7.5.tar.xz 17236432 BLAKE2B fb49a3bfd9b1944d567a45682f789ef840e63ed610e0dddb5695da7a84a0bcb50a6fa52097722f09b57d6fc15a5f89aeaa46a061125219e597897086f3dffe40 SHA512 f4f3879881f260f58dbb041fb0f2f210d4b70b02a739e41e50e6fea67d31855a7a29ce4ebef66bfde3d0edf54b946a48f78490f986da965357b835d4dbb3f414
@@ -10,7 +8,6 @@ DIST Python-3.8.1.tar.xz 17828408 BLAKE2B db1841625de89b812cadcd538a990401a4e49d
 DIST python-gentoo-patches-2.7.16.tar.xz 13904 BLAKE2B 218b46f8656f4a792dcd47eabca6d59a1558276b77676544991ee75914cd76dda84c36f43e72e477b850dd4cb52374d289f20dccd244a3b52ae5debaf3363432 SHA512 83f90545231c663a34c6925352a357a2b15997ac0362578a1893304c5070b5251922585ae8bc1bafb68d306bcddd4cdba4b6406648d473bd3e980eef65fe3ecd
 DIST python-gentoo-patches-2.7.17-r1.tar.xz 14708 BLAKE2B f6e25236a471649de122d0f29506f7a4f34044a568ead47a68980411d9722b761fe1f9d653d5edccb6978b65c8c1eecbef55f403b94f32b37c0ad68e061505a8 SHA512 ecdde5e38c6fe5e69691fb3a68c8f4f43da7857d4abaff763d3cf6ad864ba43c769c03b186b60f2736a1ffb1e3e4c9982715d1b8a99ff3f5740096153bb8a90f
 DIST python-gentoo-patches-2.7.17.tar.xz 13476 BLAKE2B 788688e2941d2d6d4f768168881b2c3639213a97e214557b3a93f8db44d81e2b6d70be847b7462e54e3786660ebee4ee331402081d92167d74ad149279c3f389 SHA512 1641737635d33607a77ed2ee2462854cec603be39737de3f81abb188702aaf46f039d1616f9dcd413da1f4a8040175c66a2883e496132c2e4ebe8f860b36f9f1
-DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 BLAKE2B 4a7d71feff18c7c8c109bed10748348484d314183c3de3ec950d5ca5ce7048bb322c470f3f5bff2d63eb7f2ed99c0fe75c621df050273d9d118681b28926061d SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec
 DIST python-gentoo-patches-3.6.10.tar.xz 10964 BLAKE2B e32c8cb3050c7324ee234f585be7fc40cfacc6ad87759eaa300e57289e6dc6cbaed3913f33ad632b8754638e8d71983d8364ceeaad8ef325cfa6d4d2dfb56df0 SHA512 71fea7306c876c63888c4547eaf14dc2e0413dec343609d748cd1b5888e4605d47888758ebc5120a287ce833b69dd538073f91989460da7c40462b53eefca7ce
 DIST python-gentoo-patches-3.6.8.tar.xz 11224 BLAKE2B 5fe38282bcf28df18e0bd37756c880ae191ea738dc92f1cf83f682cfdc52525b9c44287dc99191a73d75c90672ab501b56adf49515b35ff1fdee88c8dc07b175 SHA512 89e700663db25d6d78eee1d4bfdab686c5341a794062f3a63df3485ac0b58deb4b4885d24701f3ae138d06ca783be92e310e1100c6d633910c33732f3cb0d7df
 DIST python-gentoo-patches-3.7.4-1.tar.xz 10100 BLAKE2B 63e8fada89b64b59ba083745626a1e8a07bec0cf93b7b6ab405c33a0f2932cbe497a331c52895a07f10434b230c438f27c9582efecdd57f3bad15d9aa604d157 SHA512 11b0e811a9890a1235c85426061b35f9964eba64cac0536f4c9e0498b1cc66eb005f14aed34eead735b43e91c2b5babced60e3310f5329231a1706871b95b547

diff --git a/dev-lang/python/files/3.6-disable-nis.patch b/dev-lang/python/files/3.6-disable-nis.patch
deleted file mode 100644
index 4e81847b507..00000000000
--- a/dev-lang/python/files/3.6-disable-nis.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -1332,17 +1332,7 @@ class PyBuildExt(build_ext):
-             # Jeremy Hylton's rlimit interface
-             exts.append( Extension('resource', ['resource.c']) )
- 
--            # Sun yellow pages. Some systems have the functions in libc.
--            if (host_platform not in ['cygwin', 'qnx6'] and
--                find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
--                if (self.compiler.find_library_file(lib_dirs, 'nsl')):
--                    libs = ['nsl']
--                else:
--                    libs = []
--                exts.append( Extension('nis', ['nismodule.c'],
--                                       libraries = libs) )
--            else:
--                missing.append('nis')
-+            missing.append('nis')
-         else:
-             missing.extend(['nis', 'resource', 'termios'])
- 

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 8bfad114278..00000000000
--- 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/files/python-3.5-distutils-OO-build.patch b/dev-lang/python/files/python-3.5-distutils-OO-build.patch
deleted file mode 100644
index 8af8c30c76f..00000000000
--- a/dev-lang/python/files/python-3.5-distutils-OO-build.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 90507018442f9adabb586fd3d0a0206b9c2f2f50 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 5 Jun 2016 08:18:01 +0200
-Subject: [PATCH] distutils: make -OO enable both opt-1 and opt-2 optimization
-
-Bug: http://bugs.python.org/issue27226
-Bug: https://bugs.gentoo.org/585060
----
- Lib/distutils/command/build_py.py    |  8 ++++----
- Lib/distutils/command/install_lib.py | 12 ++++++------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
-index cf0ca57..838d4e4 100644
---- a/Lib/distutils/command/build_py.py
-+++ b/Lib/distutils/command/build_py.py
-@@ -315,9 +315,9 @@ class build_py (Command):
-                 if self.compile:
-                     outputs.append(importlib.util.cache_from_source(
-                         filename, optimization=''))
--                if self.optimize > 0:
-+                for opt in range(1, self.optimize + 1):
-                     outputs.append(importlib.util.cache_from_source(
--                        filename, optimization=self.optimize))
-+                        filename, optimization=opt))
- 
-         outputs += [
-             os.path.join(build_dir, filename)
-@@ -387,8 +387,8 @@ class build_py (Command):
-         if self.compile:
-             byte_compile(files, optimize=0,
-                          force=self.force, prefix=prefix, dry_run=self.dry_run)
--        if self.optimize > 0:
--            byte_compile(files, optimize=self.optimize,
-+        for opt in range(1, self.optimize + 1):
-+            byte_compile(files, optimize=opt,
-                          force=self.force, prefix=prefix, dry_run=self.dry_run)
- 
- class build_py_2to3(build_py, Mixin2to3):
-diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
-index 6154cf0..049b662 100644
---- a/Lib/distutils/command/install_lib.py
-+++ b/Lib/distutils/command/install_lib.py
-@@ -24,8 +24,8 @@ class install_lib(Command):
-     #   2) compile .pyc only (--compile --no-optimize; default)
-     #   3) compile .pyc and "opt-1" .pyc (--compile --optimize)
-     #   4) compile "opt-1" .pyc only (--no-compile --optimize)
--    #   5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
--    #   6) compile "opt-2" .pyc only (--no-compile --optimize-more)
-+    #   5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more)
-+    #   6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more)
-     #
-     # The UI for this is two options, 'compile' and 'optimize'.
-     # 'compile' is strictly boolean, and only decides whether to
-@@ -132,8 +132,8 @@ class install_lib(Command):
-             byte_compile(files, optimize=0,
-                          force=self.force, prefix=install_root,
-                          dry_run=self.dry_run)
--        if self.optimize > 0:
--            byte_compile(files, optimize=self.optimize,
-+        for opt in range(1, self.optimize + 1):
-+            byte_compile(files, optimize=opt,
-                          force=self.force, prefix=install_root,
-                          verbose=self.verbose, dry_run=self.dry_run)
- 
-@@ -167,9 +167,9 @@ class install_lib(Command):
-             if self.compile:
-                 bytecode_files.append(importlib.util.cache_from_source(
-                     py_file, optimization=''))
--            if self.optimize > 0:
-+            for opt in range(1, self.optimize + 1):
-                 bytecode_files.append(importlib.util.cache_from_source(
--                    py_file, optimization=self.optimize))
-+                    py_file, optimization=opt))
- 
-         return bytecode_files
- 
--- 
-2.8.3
-

diff --git a/dev-lang/python/files/python-3.5.5-hash-unaligned.patch b/dev-lang/python/files/python-3.5.5-hash-unaligned.patch
deleted file mode 100644
index c418f40b7da..00000000000
--- a/dev-lang/python/files/python-3.5.5-hash-unaligned.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-The hash implementation casts the input pointer to uint64_t* and directly reads
-from this, which may cause unaligned accesses. Use memcpy() instead so this code
-will not crash with SIGBUS on sparc.
-
---- a/Python/pyhash.c	2017-11-29 10:21:20.283094068 +0100
-+++ b/Python/pyhash.c	2017-11-29 10:24:26.733087813 +0100
-@@ -372,7 +372,7 @@ siphash24(const void *src, Py_ssize_t sr
-     PY_UINT64_T k0 = _le64toh(_Py_HashSecret.siphash.k0);
-     PY_UINT64_T k1 = _le64toh(_Py_HashSecret.siphash.k1);
-     PY_UINT64_T b = (PY_UINT64_T)src_sz << 56;
--    const PY_UINT64_T *in = (PY_UINT64_T*)src;
-+    const PY_UINT8_T *in = (PY_UINT8_T*)src;
- 
-     PY_UINT64_T v0 = k0 ^ 0x736f6d6570736575ULL;
-     PY_UINT64_T v1 = k1 ^ 0x646f72616e646f6dULL;
-@@ -381,12 +381,14 @@ siphash24(const void *src, Py_ssize_t sr
- 
-     PY_UINT64_T t;
-     PY_UINT8_T *pt;
--    PY_UINT8_T *m;
-+    const PY_UINT8_T *m;
- 
-     while (src_sz >= 8) {
--        PY_UINT64_T mi = _le64toh(*in);
--        in += 1;
--        src_sz -= 8;
-+        PY_UINT64_T mi;
-+        memcpy(&mi, in, sizeof(mi));
-+        mi = _le64toh(mi);
-+        in += sizeof(mi);
-+        src_sz -= sizeof(mi);
-         v3 ^= mi;
-         DOUBLE_ROUND(v0,v1,v2,v3);
-         v0 ^= mi;
-@@ -394,7 +396,7 @@ siphash24(const void *src, Py_ssize_t sr
- 
-     t = 0;
-     pt = (PY_UINT8_T *)&t;
--    m = (PY_UINT8_T *)in;
-+    m = in;
-     switch (src_sz) {
-         case 7: pt[6] = m[6];
-         case 6: pt[5] = m[5];

diff --git a/dev-lang/python/python-3.5.7.ebuild b/dev-lang/python/python-3.5.7.ebuild
deleted file mode 100644
index 64cc392dc66..00000000000
--- a/dev-lang/python/python-3.5.7.ebuild
+++ /dev/null
@@ -1,367 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-WANT_LIBTOOL="none"
-
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
-
-MY_P="Python-${PV/_/}"
-PATCHSET_VERSION="3.5.4-0"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
-	https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="3.5/3.5m"
-KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
-IUSE="bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:0=
-	app-arch/xz-utils:0=
-	>=sys-libs/zlib-1.1.3:0=
-	virtual/libffi:=
-	virtual/libintl
-	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:0= )
-	)
-	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= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
-	bluetooth? ( net-wireless/bluez )
-	virtual/pkgconfig
-	!sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-S="${WORKDIR}/${MY_P}"
-
-PYVER=${SLOT%/*}
-
-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 "${WORKDIR}/patches"
-	epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
-	epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
-	epatch "${FILESDIR}/3.6-disable-nis.patch"
-#	epatch "${FILESDIR}/python-3.5.5-libressl-compatibility.patch"
-	epatch "${FILESDIR}/python-3.5.5-hash-unaligned.patch"
-
-	epatch_user
-
-	sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
-		configure.ac \
-		Lib/distutils/command/install.py \
-		Lib/distutils/sysconfig.py \
-		Lib/site.py \
-		Lib/sysconfig.py \
-		Lib/test/test_site.py \
-		Makefile.pre.in \
-		Modules/getpath.c \
-		Modules/Setup.dist \
-		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
-	eautoreconf
-}
-
-src_configure() {
-	local disable
-	# disable automagic bluetooth headers detection
-	use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
-	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
-
-	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
-
-	local myeconfargs=(
-		--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
-		--without-ensurepip
-		--with-system-expat
-		--with-system-ffi
-	)
-
-	ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}"
-
-	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() {
-	# Ensure sed works as expected
-	# https://bugs.gentoo.org/594768
-	local -x LC_ALL=C
-
-	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
-
-	local -x PYTHONDONTWRITEBYTECODE=
-	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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
-
-	# python seems to get rebuilt in src_install (bug 569908)
-	# Work around it for now.
-	if has_version dev-libs/libffi[pax_kernel]; then
-		pax-mark E "${ED}usr/bin/${abiver}"
-	else
-		pax-mark m "${ED}usr/bin/${abiver}"
-	fi
-
-	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*}
-
-	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}:}${PWD}
-	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
-}

diff --git a/dev-lang/python/python-3.5.9.ebuild b/dev-lang/python/python-3.5.9.ebuild
deleted file mode 100644
index 931ccccced3..00000000000
--- a/dev-lang/python/python-3.5.9.ebuild
+++ /dev/null
@@ -1,367 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-WANT_LIBTOOL="none"
-
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
-
-MY_P="Python-${PV/_/}"
-PATCHSET_VERSION="3.5.4-0"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="https://www.python.org/"
-SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
-	https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="3.5/3.5m"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
-RESTRICT="!test? ( test )"
-
-# 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:0=
-	app-arch/xz-utils:0=
-	>=sys-libs/zlib-1.1.3:0=
-	virtual/libffi:=
-	virtual/libintl
-	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:0= )
-	)
-	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= )"
-# bluetooth requires headers from bluez
-DEPEND="${RDEPEND}
-	bluetooth? ( net-wireless/bluez )
-	virtual/pkgconfig
-	!sys-devel/gcc[libffi(-)]"
-RDEPEND+=" !build? ( app-misc/mime-types )"
-PDEPEND=">=app-eselect/eselect-python-20140125-r1"
-
-S="${WORKDIR}/${MY_P}"
-
-PYVER=${SLOT%/*}
-
-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 "${WORKDIR}/patches"
-	epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
-	epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
-	epatch "${FILESDIR}/3.6-disable-nis.patch"
-#	epatch "${FILESDIR}/python-3.5.5-libressl-compatibility.patch"
-	epatch "${FILESDIR}/python-3.5.5-hash-unaligned.patch"
-
-	epatch_user
-
-	sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
-		configure.ac \
-		Lib/distutils/command/install.py \
-		Lib/distutils/sysconfig.py \
-		Lib/site.py \
-		Lib/sysconfig.py \
-		Lib/test/test_site.py \
-		Makefile.pre.in \
-		Modules/getpath.c \
-		Modules/Setup.dist \
-		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
-
-	eautoreconf
-}
-
-src_configure() {
-	local disable
-	# disable automagic bluetooth headers detection
-	use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
-	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
-
-	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
-
-	local myeconfargs=(
-		--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
-		--without-ensurepip
-		--with-system-expat
-		--with-system-ffi
-	)
-
-	ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}"
-
-	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() {
-	# Ensure sed works as expected
-	# https://bugs.gentoo.org/594768
-	local -x LC_ALL=C
-
-	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
-
-	local -x PYTHONDONTWRITEBYTECODE=
-	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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
-
-	# python seems to get rebuilt in src_install (bug 569908)
-	# Work around it for now.
-	if has_version dev-libs/libffi[pax_kernel]; then
-		pax-mark E "${ED}usr/bin/${abiver}"
-	else
-		pax-mark m "${ED}usr/bin/${abiver}"
-	fi
-
-	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*}
-
-	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
-		docinto examples
-		find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
-		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-${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}:}${PWD}
-	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
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2019-10-19  1:05 Mike Gilbert
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2019-10-19  1:05 UTC (permalink / raw
  To: gentoo-commits

commit:     838b6612b964efa1ceba6bdd548cff6fb9da68c3
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 19 01:05:37 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Oct 19 01:05:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=838b6612

dev-lang/python: re-enable all openssl algorithms

Package-Manager: Portage-2.3.77_p5, Repoman-2.3.17_p81
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 dev-lang/python/files/python-3.7.5-hashlib.patch |  25 ++
 dev-lang/python/python-3.7.5-r1.ebuild           | 329 +++++++++++++++++++++++
 2 files changed, 354 insertions(+)

diff --git a/dev-lang/python/files/python-3.7.5-hashlib.patch b/dev-lang/python/files/python-3.7.5-hashlib.patch
new file mode 100644
index 00000000000..a70a4796310
--- /dev/null
+++ b/dev-lang/python/files/python-3.7.5-hashlib.patch
@@ -0,0 +1,25 @@
+From 2c0c356ca109d1550bfb09b0da7dec3f80db77a3 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 18 Oct 2019 16:39:16 -0400
+Subject: [PATCH] Call OPENSSL_init_crypto for openssl >= 1.1.0
+
+---
+ Modules/_hashopenssl.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
+index b13ade60496..8abbde5120f 100644
+--- a/Modules/_hashopenssl.c
++++ b/Modules/_hashopenssl.c
+@@ -1077,6 +1077,8 @@ PyInit__hashlib(void)
+     /* Load all digest algorithms and initialize cpuid */
+     OPENSSL_add_all_algorithms_noconf();
+     ERR_load_crypto_strings();
++#else
++    OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS|OPENSSL_INIT_ADD_ALL_DIGESTS, NULL);
+ #endif
+ 
+     /* TODO build EVP_functions openssl_* entries dynamically based
+-- 
+2.23.0
+

diff --git a/dev-lang/python/python-3.7.5-r1.ebuild b/dev-lang/python/python-3.7.5-r1.ebuild
new file mode 100644
index 00000000000..fb27d536f6e
--- /dev/null
+++ b/dev-lang/python/python-3.7.5-r1.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.7.4-1"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+	https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.7/3.7m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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:0=
+	app-arch/xz-utils:0=
+	sys-apps/util-linux:0=
+	>=sys-libs/zlib-1.1.3:0=
+	virtual/libffi:=
+	virtual/libintl
+	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:0= )
+	)
+	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"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+	bluetooth? ( net-wireless/bluez )
+	test? ( app-arch/xz-utils[extra-filters(+)] )
+	virtual/pkgconfig
+	!sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+PYVER=${SLOT%/*}
+
+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
+
+	local PATCHES=(
+		"${FILESDIR}/python-3.7.5-hashlib.patch"
+		"${WORKDIR}/patches"
+	)
+
+	default
+
+	sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+	eautoreconf
+}
+
+src_configure() {
+	local disable
+	# disable automagic bluetooth headers detection
+	use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+	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
+
+	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
+
+	# 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."
+
+	# Fix implicit declarations on cross and prefix builds. Bug #674070.
+	use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
+
+	local dbmliborder
+	if use gdbm; then
+		dbmliborder+="${dbmliborder:+:}gdbm"
+	fi
+
+	local myeconfargs=(
+		--enable-shared
+		$(use_enable ipv6)
+		--infodir='${prefix}/share/info'
+		--mandir='${prefix}/share/man'
+		--with-computed-gotos
+		--with-dbmliborder="${dbmliborder}"
+		--with-libc=
+		--enable-loadable-sqlite-extensions
+		--without-ensurepip
+		--with-system-expat
+		--with-system-ffi
+	)
+
+	OPT="" econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	# Ensure sed works as expected
+	# https://bugs.gentoo.org/594768
+	local -x LC_ALL=C
+
+	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
+
+	# Skip failing tests.
+	local skipped_tests="gdb"
+
+	for test in ${skipped_tests}; do
+		mv "${S}"/Lib/test/test_${test}.py "${T}"
+	done
+
+	# bug 660358
+	local -x COLUMNS=80
+
+	local -x PYTHONDONTWRITEBYTECODE=
+
+	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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/lib/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/lib/python${PYVER}
+
+	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
+
+	# python seems to get rebuilt in src_install (bug 569908)
+	# Work around it for now.
+	if has_version dev-libs/libffi[pax_kernel]; then
+		pax-mark E "${ED%/}/usr/bin/${abiver}"
+	else
+		pax-mark m "${ED%/}/usr/bin/${abiver}"
+	fi
+
+	use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+	use tk || rm -r "${ED%/}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+	use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
+
+	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}:}${PWD}
+	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
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2018-04-13 19:33 Aaron Bauman
  0 siblings, 0 replies; 12+ messages in thread
From: Aaron Bauman @ 2018-04-13 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     f2a1e08538c931af0ff6252fa6051340bef3e5a2
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 13 17:34:44 2018 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Fri Apr 13 19:33:16 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2a1e085

dev-lang/python: compatibility patch for libressl

This patch fixes building with >=dev-libs/libressl-2.7. Additionally,
the slot and subslot modifier have been updated to ensure rebuilds are
properly triggered. Patch is from upstream commit
4ca0739c9d97ac7cd45499e0d31be68dc659d0e1.

Package-Manager: Portage-2.3.28, Repoman-2.3.9
Closes: https://github.com/gentoo/gentoo/pull/7971

 .../files/python-2.7-libressl-compatibility.patch  | 92 ++++++++++++++++++++++
 dev-lang/python/python-2.7.14-r1.ebuild            |  3 +-
 2 files changed, 94 insertions(+), 1 deletion(-)

diff --git a/dev-lang/python/files/python-2.7-libressl-compatibility.patch b/dev-lang/python/files/python-2.7-libressl-compatibility.patch
new file mode 100644
index 00000000000..c9e7a8458e3
--- /dev/null
+++ b/dev-lang/python/files/python-2.7-libressl-compatibility.patch
@@ -0,0 +1,92 @@
+# From https://github.com/python/cpython/pull/6215
+
+# LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
+# LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
+# LibreSSL < 2.7.
+
+# Documentation updates and fixes for failing tests will be provided in
+# another patch set.
+
+# Signed-off-by: Christian Heimes christian@python.org.
+# (cherry picked from commit 4ca0739)
+
+#Co-authored-by: Christian Heimes christian@python.org
+
+--- a/Modules/_ssl.c	2017-09-16 17:38:35.000000000 +0000
++++ b/Modules/_ssl.c	2018-04-13 15:55:10.919424126 +0000
+@@ -97,6 +102,12 @@
+ 
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ #  define OPENSSL_VERSION_1_1 1
++#  define PY_OPENSSL_1_1_API 1
++#endif
++
++/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
++#  define PY_OPENSSL_1_1_API 1
+ #endif
+ 
+ /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1
+@@ -118,24 +129,44 @@
+ #endif
+ 
+ /* ALPN added in OpenSSL 1.0.2 */
+-#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(OPENSSL_NO_TLSEXT)
+-# define HAVE_ALPN
++#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
++# define HAVE_ALPN 1
++#else
++# define HAVE_ALPN 0
++#endif
++
++/* We cannot rely on OPENSSL_NO_NEXTPROTONEG because LibreSSL 2.6.1 dropped
++ * NPN support but did not set OPENSSL_NO_NEXTPROTONEG for compatibility
++ * reasons. The check for TLSEXT_TYPE_next_proto_neg works with
++ * OpenSSL 1.0.1+ and LibreSSL.
++ * OpenSSL 1.1.1-pre1 dropped NPN but still has TLSEXT_TYPE_next_proto_neg.
++ */
++#ifdef OPENSSL_NO_NEXTPROTONEG
++# define HAVE_NPN 0
++#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
++# define HAVE_NPN 0
++#elif defined(TLSEXT_TYPE_next_proto_neg)
++# define HAVE_NPN 1
++#else
++# define HAVE_NPN 0
+ #endif
+ 
+ #ifndef INVALID_SOCKET /* MS defines this */
+ #define INVALID_SOCKET (-1)
+ #endif
+ 
+-#ifdef OPENSSL_VERSION_1_1
+-/* OpenSSL 1.1.0+ */
+-#ifndef OPENSSL_NO_SSL2
+-#define OPENSSL_NO_SSL2
+-#endif
+-#else /* OpenSSL < 1.1.0 */
+-#if defined(WITH_THREAD)
++/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */
++#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD)
+ #define HAVE_OPENSSL_CRYPTO_LOCK
+ #endif
+ 
++#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2)
++#define OPENSSL_NO_SSL2
++#endif
++
++#ifndef PY_OPENSSL_1_1_API
++/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */
++
+ #define TLS_method SSLv23_method
+ 
+ static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne)
+@@ -178,7 +209,7 @@
+ {
+     return store->param;
+ }
+-#endif /* OpenSSL < 1.1.0 or LibreSSL */
++#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */
+ 
+ 
+ enum py_ssl_error {

diff --git a/dev-lang/python/python-2.7.14-r1.ebuild b/dev-lang/python/python-2.7.14-r1.ebuild
index 7a006eb67d7..f5e6506189e 100644
--- a/dev-lang/python/python-2.7.14-r1.ebuild
+++ b/dev-lang/python/python-2.7.14-r1.ebuild
@@ -49,7 +49,7 @@ RDEPEND="app-arch/bzip2:0=
 	sqlite? ( >=dev-db/sqlite-3.3.8:3= )
 	ssl? (
 		!libressl? ( dev-libs/openssl:0= )
-		libressl? ( dev-libs/libressl:= )
+		libressl? ( dev-libs/libressl:0= )
 	)
 	tk? (
 		>=dev-lang/tcl-8.0:0=
@@ -102,6 +102,7 @@ src_prepare() {
 	epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
 	epatch "${FILESDIR}/python-2.7.10-system-libffi.patch"
 	epatch "${FILESDIR}/2.7-disable-nis.patch"
+	epatch "${FILESDIR}/python-2.7-libressl-compatibility.patch"
 
 	epatch_user
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2018-04-01 17:18 Mike Gilbert
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2018-04-01 17:18 UTC (permalink / raw
  To: gentoo-commits

commit:     c380580255f99b84574ea57470ac217af9aaa35f
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  1 17:18:02 2018 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Apr  1 17:18:12 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3805802

dev-lang/python: bump to 3.6.5

Package-Manager: Portage-2.3.24, Repoman-2.3.6_p81

 dev-lang/python/Manifest                      |   1 +
 dev-lang/python/files/3.6.5-disable-nis.patch |  11 +
 dev-lang/python/python-3.6.5.ebuild           | 346 ++++++++++++++++++++++++++
 3 files changed, 358 insertions(+)

diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 4928ff20ac6..484ccefe0f4 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -6,6 +6,7 @@ DIST Python-3.5.4.tar.xz 15332320 BLAKE2B 1fc3ba4eb1ed949062961c13fd1f9851c7f9cb
 DIST Python-3.5.5.tar.xz 15351440 BLAKE2B 217cb7f51e04d57983ce053ff4276d056e17c8223b6f3d87b69f556453fe2ae3d4dc2c1a6b9c2c6aad033cea9b40cd32264d8208cc81a1ec34ff252379bf95b8 SHA512 c9056baee6a2d1fe7f14b1f310db95b78e8972766d086f8ae10954f38f8182956171580bde01ddadebe897f2545a6fbe47669ca3e4887026ac1fae5ee9197f22
 DIST Python-3.6.3.tar.xz 16974296 BLAKE2B 8220fc0c2eaa315d3972085b0f531f169adb6cfad57023ad2c115603b5a484573ea3540eb3216edd0f4514256c8edb07469cf38d17727d69cdc15cdf1f601623 SHA512 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b
 DIST Python-3.6.4.tar.xz 16992824 BLAKE2B 2347a70bb25468221178b1542ddd4376f136a515f2873ee1f640c4629eb77a9608af0f6be37128ba3e8ad614ebc17e7be20b73384983533aa77bca4403ea7935 SHA512 09ba2103ac517ac4d262f00380c9aac836a53401ce252540c17fd821a3b92e1ddf32528d00772221eb3126b12cb95b62c3ac3e852f4951e6f2eb406c88c848a2
+DIST Python-3.6.5.tar.xz 17049912 BLAKE2B f393e9563a18a46c457afcd2e174d9eacda20fe2b0ae5461e11c582fa4d27b85c01bbe7b602f45511b6b44f635c6330205b12fb3e8325ffd07e87b78a8258889 SHA512 6b26fcd296b9bd8e67861eff10d14db7507711ddba947288d16d6def53135c39326b7f969c04bb2b2993f924d9e7ad3f5c5282a3915760bc0885cf0a8ea5eb51
 DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1
 DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 BLAKE2B 7fb3cc7dcd987debd5aa263d8e26b21aad439d8e3177c06c3683406a53bbda9652175673b09b6300f6a5b62148190cd8a75c9b65a5de04d770866733fcc0ebcb SHA512 108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8
 DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 BLAKE2B 2a636f5500f4c7d354f421133f086cba9a25c30d5feaaa2dc25c9c588125d7c9097baecaa11f31548fa598b5dc137ca310ad86222510c0a955fa632a6d0a4b06 SHA512 41c22dc8f1db8800fc0b97eed2b27bf1873e5de1369bd4aecf7a7a91e609a78e45a4b56fc89d575317f33a7704c0c1cad1494e8a993415a198f256e8338f49ab

diff --git a/dev-lang/python/files/3.6.5-disable-nis.patch b/dev-lang/python/files/3.6.5-disable-nis.patch
new file mode 100644
index 00000000000..3937c6fe795
--- /dev/null
+++ b/dev-lang/python/files/3.6.5-disable-nis.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1364,7 +1364,7 @@ class PyBuildExt(build_ext):
+         else:
+             missing.extend(['resource', 'termios'])
+ 
+-        nis = self._detect_nis(inc_dirs, lib_dirs)
++        nis = None
+         if nis is not None:
+             exts.append(nis)
+         else:

diff --git a/dev-lang/python/python-3.6.5.ebuild b/dev-lang/python/python-3.6.5.ebuild
new file mode 100644
index 00000000000..b3c248f7363
--- /dev/null
+++ b/dev-lang/python/python-3.6.5.ebuild
@@ -0,0 +1,346 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.6.4"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+	https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.6/3.6m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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:0=
+	app-arch/xz-utils:0=
+	>=sys-libs/zlib-1.1.3:0=
+	virtual/libffi
+	virtual/libintl
+	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}
+	test? ( app-arch/xz-utils[extra-filters(+)] )
+	virtual/pkgconfig
+	!sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+PYVER=${SLOT%/*}
+
+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
+
+	local PATCHES=(
+		"${WORKDIR}/patches"
+		"${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+		"${FILESDIR}/3.6.5-disable-nis.patch"
+	)
+
+	default
+
+	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 \
+		configure.ac \
+		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+	eautoreconf
+}
+
+src_configure() {
+	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
+
+	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
+
+	# 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
+
+	local myeconfargs=(
+		--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
+		--without-ensurepip
+		--with-system-expat
+		--with-system-ffi
+	)
+
+	OPT="" econf "${myeconfargs[@]}"
+
+	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() {
+	# Ensure sed works as expected
+	# https://bugs.gentoo.org/594768
+	local -x LC_ALL=C
+
+	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
+
+	# Skip failing tests.
+	local skipped_tests="gdb"
+
+	for test in ${skipped_tests}; do
+		mv "${S}"/Lib/test/test_${test}.py "${T}"
+	done
+
+	local -x PYTHONDONTWRITEBYTECODE=
+
+	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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}
+
+	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
+
+	# python seems to get rebuilt in src_install (bug 569908)
+	# Work around it for now.
+	if has_version dev-libs/libffi[pax_kernel]; then
+		pax-mark E "${ED}usr/bin/${abiver}"
+	else
+		pax-mark m "${ED}usr/bin/${abiver}"
+	fi
+
+	use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+	use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+	use threads || rm -r "${libdir}/multiprocessing" || die
+	use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
+
+	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}:}${PWD}
+	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
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2017-07-30 15:26 Mike Gilbert
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Gilbert @ 2017-07-30 15:26 UTC (permalink / raw
  To: gentoo-commits

commit:     61958b88555c08f099c70d0b1989b86bcd3f2465
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 30 15:23:27 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jul 30 15:26:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61958b88

dev-lang/python: fix build failure in blake2 module

Thanks to Johannes Hirte for the simple solution.

Bug: https://bugs.gentoo.org/608586
Package-Manager: Portage-2.3.6_p23, Repoman-2.3.3_p1

 dev-lang/python/files/3.6-blake2.patch | 37 ++++++++++++++++++++++++++++++++++
 dev-lang/python/python-3.6.1-r1.ebuild |  1 +
 2 files changed, 38 insertions(+)

diff --git a/dev-lang/python/files/3.6-blake2.patch b/dev-lang/python/files/3.6-blake2.patch
new file mode 100644
index 00000000000..48ee5855952
--- /dev/null
+++ b/dev-lang/python/files/3.6-blake2.patch
@@ -0,0 +1,37 @@
+From 2e7c906c085a01ea8175a19e1e143257abc8f566 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 30 Jul 2017 11:17:39 -0400
+Subject: [PATCH] blake2: remove commented code
+
+The nested comments cause a build failure.
+
+Bug: https://bugs.gentoo.org/608586
+---
+ Modules/_blake2/impl/blake2s-load-xop.h | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/Modules/_blake2/impl/blake2s-load-xop.h b/Modules/_blake2/impl/blake2s-load-xop.h
+index a3b5d65e2d..7e76c399c6 100644
+--- a/Modules/_blake2/impl/blake2s-load-xop.h
++++ b/Modules/_blake2/impl/blake2s-load-xop.h
+@@ -18,17 +18,6 @@
+ 
+ #define TOB(x) ((x)*4*0x01010101 + 0x03020100) /* ..or not TOB */
+ 
+-/* Basic VPPERM emulation, for testing purposes */
+-/*static __m128i _mm_perm_epi8(const __m128i src1, const __m128i src2, const __m128i sel)
+-{
+-   const __m128i sixteen = _mm_set1_epi8(16);
+-   const __m128i t0 = _mm_shuffle_epi8(src1, sel);
+-   const __m128i s1 = _mm_shuffle_epi8(src2, _mm_sub_epi8(sel, sixteen));
+-   const __m128i mask = _mm_or_si128(_mm_cmpeq_epi8(sel, sixteen),
+-                                     _mm_cmpgt_epi8(sel, sixteen)); /* (>=16) = 0xff : 00 */
+-   return _mm_blendv_epi8(t0, s1, mask);
+-}*/
+-
+ #define LOAD_MSG_0_1(buf) \
+ buf = _mm_perm_epi8(m0, m1, _mm_set_epi32(TOB(6),TOB(4),TOB(2),TOB(0)) );
+ 
+-- 
+2.13.3
+

diff --git a/dev-lang/python/python-3.6.1-r1.ebuild b/dev-lang/python/python-3.6.1-r1.ebuild
index eef0e26c7dc..ef6e62034cd 100644
--- a/dev-lang/python/python-3.6.1-r1.ebuild
+++ b/dev-lang/python/python-3.6.1-r1.ebuild
@@ -65,6 +65,7 @@ src_prepare() {
 	EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
 	epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
 	epatch "${FILESDIR}/3.6.1-test_socket-AEAD.patch"
+	epatch "${FILESDIR}/3.6-blake2.patch"
 
 	epatch_user
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2016-06-06 19:40 Michał Górny
  0 siblings, 0 replies; 12+ messages in thread
From: Michał Górny @ 2016-06-06 19:40 UTC (permalink / raw
  To: gentoo-commits

commit:     ea1d100da4d130d0493025cfebf6f56905f6a837
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  5 06:48:13 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun  6 19:40:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea1d100d

dev-lang/python: Fix distutils to compile .opt-1 & .opt-2 in 3.5

 .../files/python-3.5-distutils-OO-build.patch      |  80 +++++
 dev-lang/python/python-3.5.1-r3.ebuild             | 360 +++++++++++++++++++++
 2 files changed, 440 insertions(+)

diff --git a/dev-lang/python/files/python-3.5-distutils-OO-build.patch b/dev-lang/python/files/python-3.5-distutils-OO-build.patch
new file mode 100644
index 0000000..8af8c30
--- /dev/null
+++ b/dev-lang/python/files/python-3.5-distutils-OO-build.patch
@@ -0,0 +1,80 @@
+From 90507018442f9adabb586fd3d0a0206b9c2f2f50 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 5 Jun 2016 08:18:01 +0200
+Subject: [PATCH] distutils: make -OO enable both opt-1 and opt-2 optimization
+
+Bug: http://bugs.python.org/issue27226
+Bug: https://bugs.gentoo.org/585060
+---
+ Lib/distutils/command/build_py.py    |  8 ++++----
+ Lib/distutils/command/install_lib.py | 12 ++++++------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
+index cf0ca57..838d4e4 100644
+--- a/Lib/distutils/command/build_py.py
++++ b/Lib/distutils/command/build_py.py
+@@ -315,9 +315,9 @@ class build_py (Command):
+                 if self.compile:
+                     outputs.append(importlib.util.cache_from_source(
+                         filename, optimization=''))
+-                if self.optimize > 0:
++                for opt in range(1, self.optimize + 1):
+                     outputs.append(importlib.util.cache_from_source(
+-                        filename, optimization=self.optimize))
++                        filename, optimization=opt))
+ 
+         outputs += [
+             os.path.join(build_dir, filename)
+@@ -387,8 +387,8 @@ class build_py (Command):
+         if self.compile:
+             byte_compile(files, optimize=0,
+                          force=self.force, prefix=prefix, dry_run=self.dry_run)
+-        if self.optimize > 0:
+-            byte_compile(files, optimize=self.optimize,
++        for opt in range(1, self.optimize + 1):
++            byte_compile(files, optimize=opt,
+                          force=self.force, prefix=prefix, dry_run=self.dry_run)
+ 
+ class build_py_2to3(build_py, Mixin2to3):
+diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
+index 6154cf0..049b662 100644
+--- a/Lib/distutils/command/install_lib.py
++++ b/Lib/distutils/command/install_lib.py
+@@ -24,8 +24,8 @@ class install_lib(Command):
+     #   2) compile .pyc only (--compile --no-optimize; default)
+     #   3) compile .pyc and "opt-1" .pyc (--compile --optimize)
+     #   4) compile "opt-1" .pyc only (--no-compile --optimize)
+-    #   5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
+-    #   6) compile "opt-2" .pyc only (--no-compile --optimize-more)
++    #   5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more)
++    #   6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more)
+     #
+     # The UI for this is two options, 'compile' and 'optimize'.
+     # 'compile' is strictly boolean, and only decides whether to
+@@ -132,8 +132,8 @@ class install_lib(Command):
+             byte_compile(files, optimize=0,
+                          force=self.force, prefix=install_root,
+                          dry_run=self.dry_run)
+-        if self.optimize > 0:
+-            byte_compile(files, optimize=self.optimize,
++        for opt in range(1, self.optimize + 1):
++            byte_compile(files, optimize=opt,
+                          force=self.force, prefix=install_root,
+                          verbose=self.verbose, dry_run=self.dry_run)
+ 
+@@ -167,9 +167,9 @@ class install_lib(Command):
+             if self.compile:
+                 bytecode_files.append(importlib.util.cache_from_source(
+                     py_file, optimization=''))
+-            if self.optimize > 0:
++            for opt in range(1, self.optimize + 1):
+                 bytecode_files.append(importlib.util.cache_from_source(
+-                    py_file, optimization=self.optimize))
++                    py_file, optimization=opt))
+ 
+         return bytecode_files
+ 
+-- 
+2.8.3
+

diff --git a/dev-lang/python/python-3.5.1-r3.ebuild b/dev-lang/python/python-3.5.1-r3.ebuild
new file mode 100644
index 0000000..3e8fc98
--- /dev/null
+++ b/dev-lang/python/python-3.5.1-r3.ebuild
@@ -0,0 +1,360 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV/_/}"
+PATCHSET_VERSION="3.5.1-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+	https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.5/3.5m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build 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.
+
+RDEPEND="app-arch/bzip2:0=
+	app-arch/xz-utils:0=
+	>=sys-libs/zlib-1.1.3:0=
+	virtual/libffi
+	virtual/libintl
+	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/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+PYVER=${SLOT%/*}
+
+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 "${WORKDIR}/patches"
+	epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
+	epatch "${FILESDIR}/3.5.1-cross-compile.patch"
+	epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+
+	epatch_user
+
+	sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+		configure.ac \
+		Lib/distutils/command/install.py \
+		Lib/distutils/sysconfig.py \
+		Lib/site.py \
+		Lib/sysconfig.py \
+		Lib/test/test_site.py \
+		Makefile.pre.in \
+		Modules/getpath.c \
+		Modules/Setup.dist \
+		setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+	eautoreconf
+}
+
+src_configure() {
+	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
+
+	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
+
+	local myeconfargs=(
+		--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
+		--without-ensurepip
+		--with-system-expat
+		--with-system-ffi
+	)
+
+	ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}"
+
+	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() {
+	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
+
+	local -x PYTHONDONTWRITEBYTECODE=
+	emake test EXTRATESTOPTS="-u-network" CPPFLAGS= 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
+
+	# python seems to get rebuilt in src_install (bug 569908)
+	# Work around it for now.
+	if has_version dev-libs/libffi[pax_kernel]; then
+		pax-mark E "${ED}usr/bin/${abiver}"
+	else
+		pax-mark m "${ED}usr/bin/${abiver}"
+	fi
+
+	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*}
+
+	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
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2015-10-02 13:56 Mike Frysinger
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger @ 2015-10-02 13:56 UTC (permalink / raw
  To: gentoo-commits

commit:     bd3586765e47208668f27f707ec7f6d06b5d92a8
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  2 13:56:16 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Oct  2 13:56:33 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd358676

dev-lang/python: add upstream fix for testing w/gcc-5 #547626

 dev-lang/python/files/python-3.4-gcc-5.patch | 37 ++++++++++++++++++++++++++++
 dev-lang/python/python-3.3.5-r2.ebuild       |  1 +
 dev-lang/python/python-3.4.3-r2.ebuild       |  1 +
 3 files changed, 39 insertions(+)

diff --git a/dev-lang/python/files/python-3.4-gcc-5.patch b/dev-lang/python/files/python-3.4-gcc-5.patch
new file mode 100644
index 0000000..80afbd1
--- /dev/null
+++ b/dev-lang/python/files/python-3.4-gcc-5.patch
@@ -0,0 +1,37 @@
+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/python-3.3.5-r2.ebuild b/dev-lang/python/python-3.3.5-r2.ebuild
index 59fc5b7..f14b121 100644
--- a/dev-lang/python/python-3.3.5-r2.ebuild
+++ b/dev-lang/python/python-3.3.5-r2.ebuild
@@ -75,6 +75,7 @@ src_prepare() {
 
 	EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
 	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 \

diff --git a/dev-lang/python/python-3.4.3-r2.ebuild b/dev-lang/python/python-3.4.3-r2.ebuild
index 888e7a7..80d86b6 100644
--- a/dev-lang/python/python-3.4.3-r2.ebuild
+++ b/dev-lang/python/python-3.4.3-r2.ebuild
@@ -70,6 +70,7 @@ src_prepare() {
 
 	EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
 	epatch "${FILESDIR}/${PN}-3.4.3-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 \


^ permalink raw reply related	[flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/
@ 2015-08-09  8:48 Michał Górny
  0 siblings, 0 replies; 12+ messages in thread
From: Michał Górny @ 2015-08-09  8:48 UTC (permalink / raw
  To: gentoo-commits

commit:     33cf38e4f1eb6b456df0874b34ff54a8961cf97e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  9 08:43:34 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Aug  9 08:47:50 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33cf38e4

Move 3.2 to ::python. Remove old patches.

Package-Manager: portage-2.2.20

 dev-lang/python/Manifest                           |   2 -
 dev-lang/python/files/CVE-2013-4238_py27.patch     | 247 -------------
 dev-lang/python/files/CVE-2013-4238_py33.patch     | 241 -------------
 dev-lang/python/files/python-2.7-issue16248.patch  |  19 -
 dev-lang/python/files/python-2.7-issue18851.patch  | 287 ---------------
 .../python/files/python-2.7.10-semaphore-pid.patch |  51 ---
 .../python/files/python-2.7.5-library-path.patch   |  25 --
 .../files/python-2.7.5-re_unsigned_ptrdiff.patch   |  23 --
 ...ython-2.7.6-recvfrom_into_buffer_overflow.patch |  17 -
 .../python/files/python-3.2-CVE-2013-2099.patch    |  51 ---
 .../python/files/python-3.2-CVE-2014-1912.patch    |  51 ---
 .../python/files/python-3.2-CVE-2014-4616.patch    |  39 ---
 dev-lang/python/files/python-3.2-issue16248.patch  |  19 -
 .../python/files/python-3.3-CVE-2013-2099.patch    |  51 ---
 dev-lang/python/files/python-config-2.4-r1         |  58 ----
 dev-lang/python/python-3.2.5-r6.ebuild             | 384 ---------------------
 16 files changed, 1565 deletions(-)

diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 28e908b..8b86bf1 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,7 +1,6 @@
 DIST Python-2.6.9.tgz 13285074 SHA256 7277b1285d8a82f374ef6ebaac85b003266f7939b3f2a24a3af52f9523ac94db SHA512 7ff28f41f7dc12e1504a781060520440bbf74b96c5df269ca5218f5910eae63898b94fdd398f549217912689814bc5275bb3b5ec4cc892f20bb468fc1b041c0c WHIRLPOOL 909f612286314ea004eef328a58d7b0aecffc1a524f6b283333ef0f299413055c1f7ec4e2d21a44d1beeaa8e11aabd68510cf9c5840cb5394176cbc8f2e5c147
 DIST Python-2.7.10.tar.xz 12250696 SHA256 1cd3730781b91caf0fa1c4d472dc29274186480161a150294c42ce9b5c5effc0 SHA512 67615a6defbcda062f15a09f9dd3b9441afd01a8cc3255e5bc45b925378a0ddc38d468b7701176f6cc153ec52a4f21671b433780d9bde343aa9b9c1b2ae29feb WHIRLPOOL 3a9dcfc55b107dc55ad0ae93fb24a11eab7d4d9b4cfbe6b6830a090b6e5f71bb2ac91526b89c6f3e4f2610fa1a2cc4e82b58a83c599aa71f94894c74181b504b
 DIST Python-2.7.9.tar.xz 12164712 SHA256 90d27e14ea7e03570026850e2e50ba71ad20b7eb31035aada1cf3def8f8d4916 SHA512 6939182463272a6bb9da0e327bfb9efc574a87820f2ae39eaf02d9fae053dbe0004330e916e6828becfef94cbe294acb0a88a600f8930b99b94fcfc4efc44ff4 WHIRLPOOL 993313811eddef1820e6f3ee0e02848c73bdfce65b85ab0e360603e726c31e1cc9dc6c128e3fe086cafc94164d2d628ff5d859e13b90648da6352c35ddeedcd4
-DIST Python-3.2.5.tar.xz 9221624 SHA256 8ccb9645b9779fc4550055b2ebb21a724ab7a63dee45643286eb4f79b2f84116 SHA512 6e71d01695c7b1e74d9781e4ac40a8d1560cae659d5351d392fc685b84316568d93740a99d2ed878dd87d4ce1708d0474cb01c6bad7b3dab610c639f3255b09d WHIRLPOOL d5e5fae5e1d4110861e1e1dac00c9812abbbc37205e8ce3cd268535ab9f66e24038ab4778af8bb834fd472eaa0281730f1f2fabdf6dffc4f6b54ef32c1d75953
 DIST Python-3.3.5.tar.xz 12116308 SHA256 abe99b484434503d8b23be0f243ec27139e743a4798cd71c1dce3cf40e63b6e5 SHA512 562ebd85291f29ff18d37f05682763fc45aa9d070688006f4ef5c89392a48022357c3ca9ee1d795e9e863bdef413e6bab77b8d65581d374a76dbe7cacec65550 WHIRLPOOL f4b6010d32b28b7bb038cbb7c5f98d325cc4253fd1be9a0a1089ed6fd7dd414c5169931d21ef819137d5c1084517a650828f260cf2a1d8ce871bc67aeef3fff8
 DIST Python-3.4.0.tar.xz 14084912 SHA256 f13686c0a2d45e7146759e9d5d1cbd8097a0606483c0cf7730e1e13f58b14cbe SHA512 4fd4d3352e3b64ef8017ba083a2d894b99e89882581bcf30cdb218578f0f384aa6efc89211ffe44f5bb3d783c79763e26823242d27382fd05900099dd966ca31 WHIRLPOOL 82a1bb14a7683e2bce32221792923f334b61fabc75b0b293b0ecc0d810c8a4bebf05b75a061d85dd6612a8ca699c9b4f358e2aef5d14706aad1c18f42c9b8d55
 DIST Python-3.4.1.tar.xz 14125788 SHA256 c595a163104399041fcbe1c5c04db4c1da94f917b82ce89e8944c8edff7aedc4 SHA512 09b6390c07334974f189fb1c90bc2310898aef76661b1cecaa2b4d50001fa3df0fa0c63d3471a5a0dc7f9e08dd559d38d3bc45a6c05a816d8b2ed6b2a20e5fa9 WHIRLPOOL c8f879bb5d42a759b0804aa58d90330d9be6f4c29652ec40f07ca7da31510eadbd6b4eceb2b213af9a1af031c8321fc25faccae77763a31814eb0569831b8bfd
@@ -11,7 +10,6 @@ DIST python-gentoo-patches-2.6.9-0.tar.xz 17532 SHA256 6ff9448c3a8412f9624363ec6
 DIST python-gentoo-patches-2.7.10-0.tar.xz 12892 SHA256 c9a838bd62ae50cc385da23a837acfd05f2b74e4f086c9c76eb4d3aa5366ef6d SHA512 5f100944635e360691dc0a2b340a906646c4ae9ee558246ddffc56e8b15d389f25f1fbdc1db4cc08e7d29560d04d66b058b3904902899d58ecae8c408ebdf056 WHIRLPOOL f69e9a518bb7ee50c1b262a21e70e1e2443f859ee6d2f4fa84421120dbd054a06ce8dd6cfea8512cbc64bce806322b879c25c561d5eb05e1ba6cc15035b373a9
 DIST python-gentoo-patches-2.7.9-0.tar.xz 14020 SHA256 d1ae164ab14e265ff63d6a724e0c2b5519bdb790fe8b7796c2124a30cecc8ef8 SHA512 83aa867ce562ff3acf970a4b3ecf7132f34aca1ecf286b90575a20e6e044600b98ff1d7f1a7ee613d4429a6a71cfe8beaff144b64b6beb456ea8691ca00937b0 WHIRLPOOL 5b4f7bd2dcec3a45e12fe5baf1c196faf2b754376a6bccb555dd12a1af28a202d51a0d956e4450ff2f334df13b296ee27b36aa967cb179925c386cd58389050b
 DIST python-gentoo-patches-2.7.9-1.tar.xz 12872 SHA256 9d912c55db56b5bfe054a6164614969fc9605f48f2ffec8770941f798a16470a SHA512 cbbae0faa246516361cd39e55d841660471931bb26cae8396a7d3929c9f4b4a3d8d5a76f7fa295deeb6335c26ed95aab18399e34c2603a582743b6e760f2b280 WHIRLPOOL 422ace8a204481458acd9cfd3b3b85e4b02fb2fe656c8ef8473a76444d5a1b54cd9d690e0009904f8c251697f60105769ce6a97c26224548476c0ece6595e484
-DIST python-gentoo-patches-3.2.5-1.tar.xz 14628 SHA256 0acc5531421781ab7f30e6fc8a502f202b79aa285b4f411eb16ea0a9e6d958c1 SHA512 1abbd53e92466d258802717309e1839ae931b8a4b0a5a27d4d0da748e71cf96ac47c6837bdbae5dd6921a46cee339c178f86ff3108afe95e6a0a42c4f4300791 WHIRLPOOL de003cccb8b311413889713d66b7987f28a1f906cc9642621d1fd2a379ceae4f0f901c137503d808dc3da7295ac611de09781bf8661cdbcd14c1d7c94ba489c2
 DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e
 DIST python-gentoo-patches-3.4.0-0.tar.xz 12900 SHA256 5e5ca54eaf446c7dde4155e5d792df5229c7790b32abb5aca38cbc4fc30f9c45 SHA512 be9851f9062f6aebbd2f23d91a4038dad1a8757049745ccbb1cc618ff6bc3dfab0326d520d27678541f4421e5db41d64f632fe6fb3e80f2cf4e73dadd3d5620b WHIRLPOOL df998b5588c928ca506f9f4434093a1f60637206f03f5e067444531dae02168f88b22c8de7d58e745bdb9d85e17abd667ed51f7f5651779c2c94da98f0925679
 DIST python-gentoo-patches-3.4.1-0.tar.xz 11164 SHA256 7d88e40ed02bef2d26802516fc0138a28cca58e298204e6b1a32054f9224fcb6 SHA512 5ecdf6a1ccb8d12b5b7436e1b7f641a41afcd7fde573e9249e3dc0d438bacb1eb6a5255e149388194dbfd2951fee4f8c800199362dfd072ff96776bbbcad0bbe WHIRLPOOL 707f943f9af7c3fc6deed7cfca5a4198f65a34434893840ba8e4f4c2a3d055e8f927069cb8855b5fe20dff643b7e2d41f35f65e1f3f300e350c0f291b4df6bc2

diff --git a/dev-lang/python/files/CVE-2013-4238_py27.patch b/dev-lang/python/files/CVE-2013-4238_py27.patch
deleted file mode 100644
index e215589..0000000
--- a/dev-lang/python/files/CVE-2013-4238_py27.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-diff -r 9ddc63c039ba Lib/test/nullbytecert.pem
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/Lib/test/nullbytecert.pem	Sun Aug 11 18:13:17 2013 +0200
-@@ -0,0 +1,90 @@
-+Certificate:
-+    Data:
-+        Version: 3 (0x2)
-+        Serial Number: 0 (0x0)
-+    Signature Algorithm: sha1WithRSAEncryption
-+        Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
-+        Validity
-+            Not Before: Aug  7 13:11:52 2013 GMT
-+            Not After : Aug  7 13:12:52 2013 GMT
-+        Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
-+        Subject Public Key Info:
-+            Public Key Algorithm: rsaEncryption
-+                Public-Key: (2048 bit)
-+                Modulus:
-+                    00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3:
-+                    03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97:
-+                    16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2:
-+                    88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1:
-+                    32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4:
-+                    56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8:
-+                    a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02:
-+                    45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75:
-+                    ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91:
-+                    90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d:
-+                    7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30:
-+                    68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7:
-+                    f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12:
-+                    f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5:
-+                    ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb:
-+                    d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f:
-+                    9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da:
-+                    2f:85
-+                Exponent: 65537 (0x10001)
-+        X509v3 extensions:
-+            X509v3 Basic Constraints: critical
-+                CA:FALSE
-+            X509v3 Subject Key Identifier:
-+                88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C
-+            X509v3 Key Usage:
-+                Digital Signature, Non Repudiation, Key Encipherment
-+            X509v3 Subject Alternative Name:
-+                *************************************************************
-+                WARNING: The values for DNS, email and URI are WRONG. OpenSSL
-+                         doesn't print the text after a NULL byte.
-+                *************************************************************
-+                DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
-+    Signature Algorithm: sha1WithRSAEncryption
-+         ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5:
-+         a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44:
-+         3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37:
-+         86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3:
-+         56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86:
-+         de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac:
-+         3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4:
-+         60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60:
-+         d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5:
-+         25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60:
-+         1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6:
-+         4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d:
-+         0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e:
-+         5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6:
-+         c1:ca:a9:94
-+-----BEGIN CERTIFICATE-----
-+MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx
-+DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ
-+eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg
-+RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y
-+ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw
-+NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI
-+DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv
-+ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt
-+ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq
-+hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB
-+BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j
-+pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P
-+vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv
-+KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA
-+oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL
-+08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV
-+HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E
-+BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu
-+Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251
-+bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA
-+AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9
-+i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j
-+HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk
-+kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx
-+VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW
-+RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
-+-----END CERTIFICATE-----
-diff -r 9ddc63c039ba Lib/test/test_ssl.py
---- a/Lib/test/test_ssl.py	Sun Aug 11 13:04:50 2013 +0300
-+++ b/Lib/test/test_ssl.py	Sun Aug 11 18:13:17 2013 +0200
-@@ -25,6 +25,7 @@
- HOST = test_support.HOST
- CERTFILE = None
- SVN_PYTHON_ORG_ROOT_CERT = None
-+NULLBYTECERT = None
- 
- def handle_error(prefix):
-     exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))
-@@ -123,6 +124,27 @@
-                           ('DNS', 'projects.forum.nokia.com'))
-                         )
- 
-+    def test_parse_cert_CVE_2013_4073(self):
-+        p = ssl._ssl._test_decode_cert(NULLBYTECERT)
-+        if test_support.verbose:
-+            sys.stdout.write("\n" + pprint.pformat(p) + "\n")
-+        subject = ((('countryName', 'US'),),
-+                   (('stateOrProvinceName', 'Oregon'),),
-+                   (('localityName', 'Beaverton'),),
-+                   (('organizationName', 'Python Software Foundation'),),
-+                   (('organizationalUnitName', 'Python Core Development'),),
-+                   (('commonName', 'null.python.org\x00example.org'),),
-+                   (('emailAddress', 'python-dev@python.org'),))
-+        self.assertEqual(p['subject'], subject)
-+        self.assertEqual(p['issuer'], subject)
-+        self.assertEqual(p['subjectAltName'],
-+                         (('DNS', 'altnull.python.org\x00example.com'),
-+                         ('email', 'null@python.org\x00user@example.org'),
-+                         ('URI', 'http://null.python.org\x00http://example.org'),
-+                         ('IP Address', '192.0.2.1'),
-+                         ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
-+                        )
-+
-     def test_DER_to_PEM(self):
-         with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
-             pem = f.read()
-@@ -1360,7 +1382,7 @@
- 
- 
- def test_main(verbose=False):
--    global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT
-+    global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT, NULLBYTECERT
-     CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir,
-                             "keycert.pem")
-     SVN_PYTHON_ORG_ROOT_CERT = os.path.join(
-@@ -1368,10 +1390,13 @@
-         "https_svn_python_org_root.pem")
-     NOKIACERT = os.path.join(os.path.dirname(__file__) or os.curdir,
-                              "nokia.pem")
-+    NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir,
-+                                "nullbytecert.pem")
- 
-     if (not os.path.exists(CERTFILE) or
-         not os.path.exists(SVN_PYTHON_ORG_ROOT_CERT) or
--        not os.path.exists(NOKIACERT)):
-+        not os.path.exists(NOKIACERT) or
-+        not os.path.exists(NULLBYTECERT)):
-         raise test_support.TestFailed("Can't read certificate files!")
- 
-     tests = [BasicTests, BasicSocketTests]
-diff -r 9ddc63c039ba Modules/_ssl.c
---- a/Modules/_ssl.c	Sun Aug 11 13:04:50 2013 +0300
-+++ b/Modules/_ssl.c	Sun Aug 11 18:13:17 2013 +0200
-@@ -741,8 +741,13 @@
- 
-             /* get a rendering of each name in the set of names */
- 
-+            int gntype;
-+            ASN1_STRING *as = NULL;
-+
-             name = sk_GENERAL_NAME_value(names, j);
--            if (name->type == GEN_DIRNAME) {
-+            gntype = name-> type;
-+            switch (gntype) {
-+            case GEN_DIRNAME:
- 
-                 /* we special-case DirName as a tuple of tuples of attributes */
- 
-@@ -764,11 +769,61 @@
-                     goto fail;
-                 }
-                 PyTuple_SET_ITEM(t, 1, v);
-+                break;
- 
--            } else {
-+            case GEN_EMAIL:
-+            case GEN_DNS:
-+            case GEN_URI:
-+                /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string
-+                   correctly. */
-+                t = PyTuple_New(2);
-+                if (t == NULL)
-+                    goto fail;
-+                switch (gntype) {
-+                case GEN_EMAIL:
-+                    v = PyUnicode_FromString("email");
-+                    as = name->d.rfc822Name;
-+                    break;
-+                case GEN_DNS:
-+                    v = PyUnicode_FromString("DNS");
-+                    as = name->d.dNSName;
-+                    break;
-+                case GEN_URI:
-+                    v = PyUnicode_FromString("URI");
-+                    as = name->d.uniformResourceIdentifier;
-+                    break;
-+                }
-+                if (v == NULL) {
-+                    Py_DECREF(t);
-+                    goto fail;
-+                }
-+                PyTuple_SET_ITEM(t, 0, v);
-+                v = PyString_FromStringAndSize((char *)ASN1_STRING_data(as),
-+                                               ASN1_STRING_length(as));
-+                if (v == NULL) {
-+                    Py_DECREF(t);
-+                    goto fail;
-+                }
-+                PyTuple_SET_ITEM(t, 1, v);
-+                break;
- 
-+            default:
-                 /* for everything else, we use the OpenSSL print form */
--
-+                switch (gntype) {
-+                    /* check for new general name type */
-+                    case GEN_OTHERNAME:
-+                    case GEN_X400:
-+                    case GEN_EDIPARTY:
-+                    case GEN_IPADD:
-+                    case GEN_RID:
-+                        break;
-+                    default:
-+                        if (PyErr_Warn(PyExc_RuntimeWarning,
-+				       "Unknown general name type") == -1) {
-+                            goto fail;
-+                        }
-+                        break;
-+                }
-                 (void) BIO_reset(biobuf);
-                 GENERAL_NAME_print(biobuf, name);
-                 len = BIO_gets(biobuf, buf, sizeof(buf)-1);
-@@ -794,6 +849,7 @@
-                     goto fail;
-                 }
-                 PyTuple_SET_ITEM(t, 1, v);
-+		break;
-             }
- 
-             /* and add that rendering to the list */

diff --git a/dev-lang/python/files/CVE-2013-4238_py33.patch b/dev-lang/python/files/CVE-2013-4238_py33.patch
deleted file mode 100644
index 41db4d2..0000000
--- a/dev-lang/python/files/CVE-2013-4238_py33.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-diff -r e0f86c3b3685 Lib/test/nullbytecert.pem
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/Lib/test/nullbytecert.pem	Sun Aug 11 18:17:23 2013 +0200
-@@ -0,0 +1,90 @@
-+Certificate:
-+    Data:
-+        Version: 3 (0x2)
-+        Serial Number: 0 (0x0)
-+    Signature Algorithm: sha1WithRSAEncryption
-+        Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
-+        Validity
-+            Not Before: Aug  7 13:11:52 2013 GMT
-+            Not After : Aug  7 13:12:52 2013 GMT
-+        Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org
-+        Subject Public Key Info:
-+            Public Key Algorithm: rsaEncryption
-+                Public-Key: (2048 bit)
-+                Modulus:
-+                    00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3:
-+                    03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97:
-+                    16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2:
-+                    88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1:
-+                    32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4:
-+                    56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8:
-+                    a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02:
-+                    45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75:
-+                    ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91:
-+                    90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d:
-+                    7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30:
-+                    68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7:
-+                    f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12:
-+                    f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5:
-+                    ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb:
-+                    d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f:
-+                    9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da:
-+                    2f:85
-+                Exponent: 65537 (0x10001)
-+        X509v3 extensions:
-+            X509v3 Basic Constraints: critical
-+                CA:FALSE
-+            X509v3 Subject Key Identifier:
-+                88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C
-+            X509v3 Key Usage:
-+                Digital Signature, Non Repudiation, Key Encipherment
-+            X509v3 Subject Alternative Name:
-+                *************************************************************
-+                WARNING: The values for DNS, email and URI are WRONG. OpenSSL
-+                         doesn't print the text after a NULL byte.
-+                *************************************************************
-+                DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
-+    Signature Algorithm: sha1WithRSAEncryption
-+         ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5:
-+         a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44:
-+         3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37:
-+         86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3:
-+         56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86:
-+         de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac:
-+         3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4:
-+         60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60:
-+         d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5:
-+         25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60:
-+         1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6:
-+         4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d:
-+         0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e:
-+         5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6:
-+         c1:ca:a9:94
-+-----BEGIN CERTIFICATE-----
-+MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx
-+DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ
-+eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg
-+RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y
-+ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw
-+NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI
-+DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv
-+ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt
-+ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq
-+hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB
-+BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j
-+pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P
-+vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv
-+KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA
-+oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL
-+08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV
-+HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E
-+BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu
-+Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251
-+bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA
-+AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9
-+i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j
-+HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk
-+kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx
-+VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW
-+RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ=
-+-----END CERTIFICATE-----
-diff -r e0f86c3b3685 Lib/test/test_ssl.py
---- a/Lib/test/test_ssl.py	Sun Aug 11 13:04:50 2013 +0300
-+++ b/Lib/test/test_ssl.py	Sun Aug 11 18:17:23 2013 +0200
-@@ -55,6 +55,7 @@
- WRONGCERT = data_file("XXXnonexisting.pem")
- BADKEY = data_file("badkey.pem")
- NOKIACERT = data_file("nokia.pem")
-+NULLBYTECERT = data_file("nullbytecert.pem")
- 
- DHFILE = data_file("dh512.pem")
- BYTES_DHFILE = os.fsencode(DHFILE)
-@@ -162,6 +163,27 @@
-                           ('DNS', 'projects.forum.nokia.com'))
-                         )
- 
-+    def test_parse_cert_CVE_2013_4073(self):
-+        p = ssl._ssl._test_decode_cert(NULLBYTECERT)
-+        if support.verbose:
-+            sys.stdout.write("\n" + pprint.pformat(p) + "\n")
-+        subject = ((('countryName', 'US'),),
-+                   (('stateOrProvinceName', 'Oregon'),),
-+                   (('localityName', 'Beaverton'),),
-+                   (('organizationName', 'Python Software Foundation'),),
-+                   (('organizationalUnitName', 'Python Core Development'),),
-+                   (('commonName', 'null.python.org\x00example.org'),),
-+                   (('emailAddress', 'python-dev@python.org'),))
-+        self.assertEqual(p['subject'], subject)
-+        self.assertEqual(p['issuer'], subject)
-+        self.assertEqual(p['subjectAltName'],
-+                         (('DNS', 'altnull.python.org\x00example.com'),
-+                         ('email', 'null@python.org\x00user@example.org'),
-+                         ('URI', 'http://null.python.org\x00http://example.org'),
-+                         ('IP Address', '192.0.2.1'),
-+                         ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
-+                        )
-+
-     def test_DER_to_PEM(self):
-         with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
-             pem = f.read()
-@@ -294,6 +316,13 @@
-         fail(cert, 'foo.a.com')
-         fail(cert, 'bar.foo.com')
- 
-+        # NULL bytes are bad, CVE-2013-4073
-+        cert = {'subject': ((('commonName',
-+                              'null.python.org\x00example.org'),),)}
-+        ok(cert, 'null.python.org\x00example.org') # or raise an error?
-+        fail(cert, 'example.org')
-+        fail(cert, 'null.python.org')
-+
-         # Slightly fake real-world example
-         cert = {'notAfter': 'Jun 26 21:41:46 2011 GMT',
-                 'subject': ((('commonName', 'linuxfrz.org'),),),
-diff -r e0f86c3b3685 Modules/_ssl.c
---- a/Modules/_ssl.c	Sun Aug 11 13:04:50 2013 +0300
-+++ b/Modules/_ssl.c	Sun Aug 11 18:17:23 2013 +0200
-@@ -771,12 +771,14 @@
-                            ext->value->length));
- 
-         for(j = 0; j < sk_GENERAL_NAME_num(names); j++) {
--
-             /* get a rendering of each name in the set of names */
-+            int gntype;
-+            ASN1_STRING *as = NULL;
- 
-             name = sk_GENERAL_NAME_value(names, j);
--            if (name->type == GEN_DIRNAME) {
--
-+            gntype = name-> type;
-+            switch (gntype) {
-+            case GEN_DIRNAME:
-                 /* we special-case DirName as a tuple of
-                    tuples of attributes */
- 
-@@ -798,11 +800,62 @@
-                     goto fail;
-                 }
-                 PyTuple_SET_ITEM(t, 1, v);
-+                break;
- 
--            } else {
-+            case GEN_EMAIL:
-+            case GEN_DNS:
-+            case GEN_URI:
-+                /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string
-+                   correctly. */
-+                t = PyTuple_New(2);
-+                if (t == NULL)
-+                    goto fail;
-+                switch (gntype) {
-+                case GEN_EMAIL:
-+                    v = PyUnicode_FromString("email");
-+                    as = name->d.rfc822Name;
-+                    break;
-+                case GEN_DNS:
-+                    v = PyUnicode_FromString("DNS");
-+                    as = name->d.dNSName;
-+                    break;
-+                case GEN_URI:
-+                    v = PyUnicode_FromString("URI");
-+                    as = name->d.uniformResourceIdentifier;
-+                    break;
-+                }
-+                if (v == NULL) {
-+                    Py_DECREF(t);
-+                    goto fail;
-+                }
-+                PyTuple_SET_ITEM(t, 0, v);
-+                v = PyUnicode_FromStringAndSize((char *)ASN1_STRING_data(as),
-+                                                ASN1_STRING_length(as));
-+                if (v == NULL) {
-+                    Py_DECREF(t);
-+                    goto fail;
-+                }
-+                PyTuple_SET_ITEM(t, 1, v);
-+                break;
- 
-+            default:
-                 /* for everything else, we use the OpenSSL print form */
--
-+                switch (gntype) {
-+                    /* check for new general name type */
-+                    case GEN_OTHERNAME:
-+                    case GEN_X400:
-+                    case GEN_EDIPARTY:
-+                    case GEN_IPADD:
-+                    case GEN_RID:
-+                        break;
-+                    default:
-+                        if (PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
-+                                             "Unknown general name type %d",
-+                                             gntype) == -1) {
-+                            goto fail;
-+                        }
-+                        break;
-+                }
-                 (void) BIO_reset(biobuf);
-                 GENERAL_NAME_print(biobuf, name);
-                 len = BIO_gets(biobuf, buf, sizeof(buf)-1);
-@@ -829,6 +882,7 @@
-                     goto fail;
-                 }
-                 PyTuple_SET_ITEM(t, 1, v);
-+                break;
-             }
- 
-             /* and add that rendering to the list */

diff --git a/dev-lang/python/files/python-2.7-issue16248.patch b/dev-lang/python/files/python-2.7-issue16248.patch
deleted file mode 100644
index ce9c654..0000000
--- a/dev-lang/python/files/python-2.7-issue16248.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-# HG changeset patch
-# User Antoine Pitrou <solipsis@pitrou.net>
-# Date 1375388712 -7200
-# Node ID 0f17aed78168e63ec058c219d03cea7240f83dd6
-# Parent  bb546f6d8ab4f513804d7a420657963881e5b447
-Fix tkinter regression introduced by the security fix in #16248.
-
-diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
---- a/Lib/lib-tk/Tkinter.py
-+++ b/Lib/lib-tk/Tkinter.py
-@@ -1736,7 +1736,7 @@ class Tk(Misc, Wm):
-         # ensure that self.tk is always _something_.
-         self.tk = None
-         if baseName is None:
--            import sys, os
-+            import os
-             baseName = os.path.basename(sys.argv[0])
-             baseName, ext = os.path.splitext(baseName)
-             if ext not in ('.py', '.pyc', '.pyo'):

diff --git a/dev-lang/python/files/python-2.7-issue18851.patch b/dev-lang/python/files/python-2.7-issue18851.patch
deleted file mode 100644
index 35c69ae..0000000
--- a/dev-lang/python/files/python-2.7-issue18851.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-# HG changeset patch
-# User Antoine Pitrou <solipsis@pitrou.net>
-# Date 1377898693 -7200
-# Node ID 43749cb6bdbd0fdab70f76cd171c3c02a3f600dd
-# Parent  ba54011aa295004ad87438211fe3bb1568dd69ab
-Issue #18851: Avoid a double close of subprocess pipes when the child process fails starting.
-
-diff --git a/Lib/subprocess.py b/Lib/subprocess.py
---- a/Lib/subprocess.py
-+++ b/Lib/subprocess.py
-@@ -698,12 +698,12 @@ class Popen(object):
- 
-         (p2cread, p2cwrite,
-          c2pread, c2pwrite,
--         errread, errwrite) = self._get_handles(stdin, stdout, stderr)
-+         errread, errwrite), to_close = self._get_handles(stdin, stdout, stderr)
- 
-         try:
-             self._execute_child(args, executable, preexec_fn, close_fds,
-                                 cwd, env, universal_newlines,
--                                startupinfo, creationflags, shell,
-+                                startupinfo, creationflags, shell, to_close,
-                                 p2cread, p2cwrite,
-                                 c2pread, c2pwrite,
-                                 errread, errwrite)
-@@ -711,18 +711,12 @@ class Popen(object):
-             # Preserve original exception in case os.close raises.
-             exc_type, exc_value, exc_trace = sys.exc_info()
- 
--            to_close = []
--            # Only close the pipes we created.
--            if stdin == PIPE:
--                to_close.extend((p2cread, p2cwrite))
--            if stdout == PIPE:
--                to_close.extend((c2pread, c2pwrite))
--            if stderr == PIPE:
--                to_close.extend((errread, errwrite))
--
-             for fd in to_close:
-                 try:
--                    os.close(fd)
-+                    if mswindows:
-+                        fd.Close()
-+                    else:
-+                        os.close(fd)
-                 except EnvironmentError:
-                     pass
- 
-@@ -816,8 +810,9 @@ class Popen(object):
-             """Construct and return tuple with IO objects:
-             p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
-             """
-+            to_close = set()
-             if stdin is None and stdout is None and stderr is None:
--                return (None, None, None, None, None, None)
-+                return (None, None, None, None, None, None), to_close
- 
-             p2cread, p2cwrite = None, None
-             c2pread, c2pwrite = None, None
-@@ -835,6 +830,10 @@ class Popen(object):
-                 # Assuming file-like object
-                 p2cread = msvcrt.get_osfhandle(stdin.fileno())
-             p2cread = self._make_inheritable(p2cread)
-+            # We just duplicated the handle, it has to be closed at the end
-+            to_close.add(p2cread)
-+            if stdin == PIPE:
-+                to_close.add(p2cwrite)
- 
-             if stdout is None:
-                 c2pwrite = _subprocess.GetStdHandle(_subprocess.STD_OUTPUT_HANDLE)
-@@ -848,6 +847,10 @@ class Popen(object):
-                 # Assuming file-like object
-                 c2pwrite = msvcrt.get_osfhandle(stdout.fileno())
-             c2pwrite = self._make_inheritable(c2pwrite)
-+            # We just duplicated the handle, it has to be closed at the end
-+            to_close.add(c2pwrite)
-+            if stdout == PIPE:
-+                to_close.add(c2pread)
- 
-             if stderr is None:
-                 errwrite = _subprocess.GetStdHandle(_subprocess.STD_ERROR_HANDLE)
-@@ -863,10 +866,14 @@ class Popen(object):
-                 # Assuming file-like object
-                 errwrite = msvcrt.get_osfhandle(stderr.fileno())
-             errwrite = self._make_inheritable(errwrite)
-+            # We just duplicated the handle, it has to be closed at the end
-+            to_close.add(errwrite)
-+            if stderr == PIPE:
-+                to_close.add(errread)
- 
-             return (p2cread, p2cwrite,
-                     c2pread, c2pwrite,
--                    errread, errwrite)
-+                    errread, errwrite), to_close
- 
- 
-         def _make_inheritable(self, handle):
-@@ -895,7 +902,7 @@ class Popen(object):
- 
-         def _execute_child(self, args, executable, preexec_fn, close_fds,
-                            cwd, env, universal_newlines,
--                           startupinfo, creationflags, shell,
-+                           startupinfo, creationflags, shell, to_close,
-                            p2cread, p2cwrite,
-                            c2pread, c2pwrite,
-                            errread, errwrite):
-@@ -934,6 +941,10 @@ class Popen(object):
-                     # kill children.
-                     creationflags |= _subprocess.CREATE_NEW_CONSOLE
- 
-+            def _close_in_parent(fd):
-+                fd.Close()
-+                to_close.remove(fd)
-+
-             # Start the process
-             try:
-                 hp, ht, pid, tid = _subprocess.CreateProcess(executable, args,
-@@ -958,11 +969,11 @@ class Popen(object):
-                 # pipe will not close when the child process exits and the
-                 # ReadFile will hang.
-                 if p2cread is not None:
--                    p2cread.Close()
-+                    _close_in_parent(p2cread)
-                 if c2pwrite is not None:
--                    c2pwrite.Close()
-+                    _close_in_parent(c2pwrite)
-                 if errwrite is not None:
--                    errwrite.Close()
-+                    _close_in_parent(errwrite)
- 
-             # Retain the process handle, but close the thread handle
-             self._child_created = True
-@@ -1088,6 +1099,7 @@ class Popen(object):
-             """Construct and return tuple with IO objects:
-             p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
-             """
-+            to_close = set()
-             p2cread, p2cwrite = None, None
-             c2pread, c2pwrite = None, None
-             errread, errwrite = None, None
-@@ -1096,6 +1108,7 @@ class Popen(object):
-                 pass
-             elif stdin == PIPE:
-                 p2cread, p2cwrite = self.pipe_cloexec()
-+                to_close.update((p2cread, p2cwrite))
-             elif isinstance(stdin, int):
-                 p2cread = stdin
-             else:
-@@ -1106,6 +1119,7 @@ class Popen(object):
-                 pass
-             elif stdout == PIPE:
-                 c2pread, c2pwrite = self.pipe_cloexec()
-+                to_close.update((c2pread, c2pwrite))
-             elif isinstance(stdout, int):
-                 c2pwrite = stdout
-             else:
-@@ -1116,6 +1130,7 @@ class Popen(object):
-                 pass
-             elif stderr == PIPE:
-                 errread, errwrite = self.pipe_cloexec()
-+                to_close.update((errread, errwrite))
-             elif stderr == STDOUT:
-                 errwrite = c2pwrite
-             elif isinstance(stderr, int):
-@@ -1126,7 +1141,7 @@ class Popen(object):
- 
-             return (p2cread, p2cwrite,
-                     c2pread, c2pwrite,
--                    errread, errwrite)
-+                    errread, errwrite), to_close
- 
- 
-         def _set_cloexec_flag(self, fd, cloexec=True):
-@@ -1170,7 +1185,7 @@ class Popen(object):
- 
-         def _execute_child(self, args, executable, preexec_fn, close_fds,
-                            cwd, env, universal_newlines,
--                           startupinfo, creationflags, shell,
-+                           startupinfo, creationflags, shell, to_close,
-                            p2cread, p2cwrite,
-                            c2pread, c2pwrite,
-                            errread, errwrite):
-@@ -1189,6 +1204,10 @@ class Popen(object):
-             if executable is None:
-                 executable = args[0]
- 
-+            def _close_in_parent(fd):
-+                os.close(fd)
-+                to_close.remove(fd)
-+
-             # For transferring possible exec failure from child to parent
-             # The first char specifies the exception type: 0 means
-             # OSError, 1 means some other error.
-@@ -1283,17 +1302,17 @@ class Popen(object):
-                     # be sure the FD is closed no matter what
-                     os.close(errpipe_write)
- 
--                if p2cread is not None and p2cwrite is not None:
--                    os.close(p2cread)
--                if c2pwrite is not None and c2pread is not None:
--                    os.close(c2pwrite)
--                if errwrite is not None and errread is not None:
--                    os.close(errwrite)
--
-                 # Wait for exec to fail or succeed; possibly raising exception
-                 # Exception limited to 1M
-                 data = _eintr_retry_call(os.read, errpipe_read, 1048576)
-             finally:
-+                if p2cread is not None and p2cwrite is not None:
-+                    _close_in_parent(p2cread)
-+                if c2pwrite is not None and c2pread is not None:
-+                    _close_in_parent(c2pwrite)
-+                if errwrite is not None and errread is not None:
-+                    _close_in_parent(errwrite)
-+
-                 # be sure the FD is closed no matter what
-                 os.close(errpipe_read)
- 
-diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
---- a/Lib/test/test_subprocess.py
-+++ b/Lib/test/test_subprocess.py
-@@ -14,6 +14,10 @@ try:
-     import resource
- except ImportError:
-     resource = None
-+try:
-+    import threading
-+except ImportError:
-+    threading = None
- 
- mswindows = (sys.platform == "win32")
- 
-@@ -629,6 +633,36 @@ class ProcessTestCase(BaseTestCase):
-             if c.exception.errno not in (errno.ENOENT, errno.EACCES):
-                 raise c.exception
- 
-+    @unittest.skipIf(threading is None, "threading required")
-+    def test_double_close_on_error(self):
-+        # Issue #18851
-+        fds = []
-+        def open_fds():
-+            for i in range(20):
-+                fds.extend(os.pipe())
-+                time.sleep(0.001)
-+        t = threading.Thread(target=open_fds)
-+        t.start()
-+        try:
-+            with self.assertRaises(EnvironmentError):
-+                subprocess.Popen(['nonexisting_i_hope'],
-+                                 stdin=subprocess.PIPE,
-+                                 stdout=subprocess.PIPE,
-+                                 stderr=subprocess.PIPE)
-+        finally:
-+            t.join()
-+            exc = None
-+            for fd in fds:
-+                # If a double close occurred, some of those fds will
-+                # already have been closed by mistake, and os.close()
-+                # here will raise.
-+                try:
-+                    os.close(fd)
-+                except OSError as e:
-+                    exc = e
-+            if exc is not None:
-+                raise exc
-+
-     def test_handles_closed_on_exception(self):
-         # If CreateProcess exits with an error, ensure the
-         # duplicate output handles are released
-@@ -783,7 +817,7 @@ class POSIXProcessTestCase(BaseTestCase)
- 
-         def _execute_child(
-                 self, args, executable, preexec_fn, close_fds, cwd, env,
--                universal_newlines, startupinfo, creationflags, shell,
-+                universal_newlines, startupinfo, creationflags, shell, to_close,
-                 p2cread, p2cwrite,
-                 c2pread, c2pwrite,
-                 errread, errwrite):
-@@ -791,7 +825,7 @@ class POSIXProcessTestCase(BaseTestCase)
-                 subprocess.Popen._execute_child(
-                         self, args, executable, preexec_fn, close_fds,
-                         cwd, env, universal_newlines,
--                        startupinfo, creationflags, shell,
-+                        startupinfo, creationflags, shell, to_close,
-                         p2cread, p2cwrite,
-                         c2pread, c2pwrite,
-                         errread, errwrite)

diff --git a/dev-lang/python/files/python-2.7.10-semaphore-pid.patch b/dev-lang/python/files/python-2.7.10-semaphore-pid.patch
deleted file mode 100644
index 97fcbd0..0000000
--- a/dev-lang/python/files/python-2.7.10-semaphore-pid.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Fix for semaphores in pid namespaces
-
-http://bugs.python.org/issue24303
-
---- a/Modules/_multiprocessing/semaphore.c
-+++ b/Modules/_multiprocessing/semaphore.c
-@@ -7,6 +7,7 @@
-  */
- 
- #include "multiprocessing.h"
-+#include <time.h>
- 
- enum { RECURSIVE_MUTEX, SEMAPHORE };
- 
-@@ -419,7 +420,7 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
- {
-     char buffer[256];
-     SEM_HANDLE handle = SEM_FAILED;
--    int kind, maxvalue, value;
-+    int kind, maxvalue, value, try;
-     PyObject *result;
-     static char *kwlist[] = {"kind", "value", "maxvalue", NULL};
-     static int counter = 0;
-@@ -433,10 +434,24 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-         return NULL;
-     }
- 
--    PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d", (long)getpid(), counter++);
-+    /* With pid namespaces, we may have multiple processes with the same pid.
-+     * Instead of relying on the pid to be unique, we use the microseconds time
-+     * to attempt to a unique filename. */
-+    for (try = 0; try < 100; ++try) {
-+        struct timespec tv;
-+        long arbitrary = clock_gettime(CLOCK_REALTIME, &tv) ? 0 : tv.tv_nsec;
-+        PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d-%ld",
-+                      (long)getpid(),
-+                      counter++,
-+                      arbitrary);
-+        SEM_CLEAR_ERROR();
-+        handle = SEM_CREATE(buffer, value, maxvalue);
-+        if (handle != SEM_FAILED)
-+            break;
-+        else if (errno != EEXIST)
-+            goto failure;
-+    }
- 
--    SEM_CLEAR_ERROR();
--    handle = SEM_CREATE(buffer, value, maxvalue);
-     /* On Windows we should fail if GetLastError()==ERROR_ALREADY_EXISTS */
-     if (handle == SEM_FAILED || SEM_GET_LAST_ERROR() != 0)
-         goto failure;

diff --git a/dev-lang/python/files/python-2.7.5-library-path.patch b/dev-lang/python/files/python-2.7.5-library-path.patch
deleted file mode 100644
index 6f43575..0000000
--- a/dev-lang/python/files/python-2.7.5-library-path.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-# HG changeset patch
-# User Ned Deily <nad@acm.org>
-# Date 1368666045 25200
-# Node ID cd577c3288860b0deb459443ca5c489dc0f99ef6
-# Parent  149340b3004acfcb68e5ed36b1e96b7463c756c7
-Issue #17990: Only modify include and library search paths when cross-compiling.
-
-diff --git a/setup.py b/setup.py
---- a/setup.py
-+++ b/setup.py
-@@ -437,9 +437,11 @@ class PyBuildExt(build_ext):
- 
-     def detect_modules(self):
-         # Ensure that /usr/local is always used
--        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
--        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
--        self.add_gcc_paths()
-+        if not cross_compiling:
-+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+        if cross_compiling:
-+            self.add_gcc_paths()
-         self.add_multiarch_paths()
- 
-         # Add paths specified in the environment variables LDFLAGS and

diff --git a/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch b/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch
deleted file mode 100644
index a905839..0000000
--- a/dev-lang/python/files/python-2.7.5-re_unsigned_ptrdiff.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=476426
-http://bugs.python.org/issue17998
-diff -r d91da96a55bf Modules/_sre.c
---- a/Modules/_sre.c	Thu May 16 22:47:47 2013 +0100
-+++ b/Modules/_sre.c	Fri May 17 21:02:48 2013 +0300
-@@ -1028,7 +1028,7 @@
-             TRACE(("|%p|%p|REPEAT_ONE %d %d\n", ctx->pattern, ctx->ptr,
-                    ctx->pattern[1], ctx->pattern[2]));
- 
--            if (ctx->pattern[1] > end - ctx->ptr)
-+            if ((Py_ssize_t) ctx->pattern[1] > end - ctx->ptr)
-                 RETURN_FAILURE; /* cannot match */
- 
-             state->ptr = ctx->ptr;
-@@ -1111,7 +1111,7 @@
-             TRACE(("|%p|%p|MIN_REPEAT_ONE %d %d\n", ctx->pattern, ctx->ptr,
-                    ctx->pattern[1], ctx->pattern[2]));
- 
--            if (ctx->pattern[1] > end - ctx->ptr)
-+            if ((Py_ssize_t) ctx->pattern[1] > end - ctx->ptr)
-                 RETURN_FAILURE; /* cannot match */
- 
-             state->ptr = ctx->ptr;

diff --git a/dev-lang/python/files/python-2.7.6-recvfrom_into_buffer_overflow.patch b/dev-lang/python/files/python-2.7.6-recvfrom_into_buffer_overflow.patch
deleted file mode 100644
index 37e786b..0000000
--- a/dev-lang/python/files/python-2.7.6-recvfrom_into_buffer_overflow.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -r 40fb60df4755 Modules/socketmodule.c
---- a/Modules/socketmodule.c	Sun Jan 12 12:11:47 2014 +0200
-+++ b/Modules/socketmodule.c	Mon Jan 13 16:36:35 2014 -0800
-@@ -2744,6 +2744,13 @@
-         recvlen = buflen;
-     }
- 
-+    /* Check if the buffer is large enough */
-+    if (buflen < recvlen) {
-+        PyErr_SetString(PyExc_ValueError,
-+                        "buffer too small for requested bytes");
-+        goto error;
-+    }
-+
-     readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr);
-     if (readlen < 0) {
-         /* Return an error */

diff --git a/dev-lang/python/files/python-3.2-CVE-2013-2099.patch b/dev-lang/python/files/python-3.2-CVE-2013-2099.patch
deleted file mode 100644
index 9055a03..0000000
--- a/dev-lang/python/files/python-3.2-CVE-2013-2099.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-# HG changeset patch
-# User Antoine Pitrou <solipsis@pitrou.net>
-# Date 1368892602 -7200
-#      Sat May 18 17:56:42 2013 +0200
-# Branch 3.2
-# Node ID b9b521efeba385af0142988899a55de1c1c805c7
-# Parent  6255b40c6a6127933d8ea7a2b9de200f5a0e6154
-Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099).
-
-diff --git a/Lib/ssl.py b/Lib/ssl.py
---- a/Lib/ssl.py
-+++ b/Lib/ssl.py
-@@ -108,9 +108,16 @@
-     pass
- 
- 
--def _dnsname_to_pat(dn):
-+def _dnsname_to_pat(dn, max_wildcards=1):
-     pats = []
-     for frag in dn.split(r'.'):
-+        if frag.count('*') > max_wildcards:
-+            # Issue #17980: avoid denials of service by refusing more
-+            # than one wildcard per fragment.  A survery of established
-+            # policy among SSL implementations showed it to be a
-+            # reasonable choice.
-+            raise CertificateError(
-+                "too many wildcards in certificate DNS name: " + repr(dn))
-         if frag == '*':
-             # When '*' is a fragment by itself, it matches a non-empty dotless
-             # fragment.
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -326,6 +326,17 @@
-         self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com')
-         self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com')
- 
-+        # Issue #17980: avoid denials of service by refusing more than one
-+        # wildcard per fragment.
-+        cert = {'subject': ((('commonName', 'a*b.com'),),)}
-+        ok(cert, 'axxb.com')
-+        cert = {'subject': ((('commonName', 'a*b.co*'),),)}
-+        ok(cert, 'axxb.com')
-+        cert = {'subject': ((('commonName', 'a*b*.com'),),)}
-+        with self.assertRaises(ssl.CertificateError) as cm:
-+            ssl.match_hostname(cert, 'axxbxxc.com')
-+        self.assertIn("too many wildcards", str(cm.exception))
-+
-     def test_server_side(self):
-         # server_hostname doesn't work for server sockets
-         ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)

diff --git a/dev-lang/python/files/python-3.2-CVE-2014-1912.patch b/dev-lang/python/files/python-3.2-CVE-2014-1912.patch
deleted file mode 100644
index 0e09507..0000000
--- a/dev-lang/python/files/python-3.2-CVE-2014-1912.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1389671978 18000
-# Node ID 9c56217e5c793685eeaf0ee224848c402bdf1e4c
-# Parent  2b5cd6d4d149dea6c6941b7e07ada248b29fc9f6
-complain when nbytes > buflen to fix possible buffer overflow (closes #20246)
-
-diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
---- a/Lib/test/test_socket.py
-+++ b/Lib/test/test_socket.py
-@@ -1968,6 +1968,14 @@ class BufferIOTest(SocketConnectedTest):
- 
-     _testRecvFromIntoMemoryview = _testRecvFromIntoArray
- 
-+    def testRecvFromIntoSmallBuffer(self):
-+        # See issue #20246.
-+        buf = bytearray(8)
-+        self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
-+
-+    def _testRecvFromIntoSmallBuffer(self):
-+        self.serv_conn.send(MSG*2048)
-+
- 
- TIPC_STYPE = 2000
- TIPC_LOWER = 200
-diff --git a/Misc/ACKS b/Misc/ACKS
---- a/Misc/ACKS
-+++ b/Misc/ACKS
-@@ -1020,6 +1020,7 @@ Eric V. Smith
- Christopher Smith
- Gregory P. Smith
- Roy Smith
-+Ryan Smith-Roberts
- Rafal Smotrzyk
- Dirk Soede
- Paul Sokolovsky
-diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
---- a/Modules/socketmodule.c
-+++ b/Modules/socketmodule.c
-@@ -2598,6 +2598,11 @@ sock_recvfrom_into(PySocketSockObject *s
-     if (recvlen == 0) {
-         /* If nbytes was not specified, use the buffer's length */
-         recvlen = buflen;
-+    } else if (recvlen > buflen) {
-+        PyBuffer_Release(&pbuf);
-+        PyErr_SetString(PyExc_ValueError,
-+                        "nbytes is greater than the length of the buffer");
-+        return NULL;
-     }
- 
-     readlen = sock_recvfrom_guts(s, buf, recvlen, flags, &addr);

diff --git a/dev-lang/python/files/python-3.2-CVE-2014-4616.patch b/dev-lang/python/files/python-3.2-CVE-2014-4616.patch
deleted file mode 100644
index 5b0a397..0000000
--- a/dev-lang/python/files/python-3.2-CVE-2014-4616.patch
+++ /dev/null
@@ -1,39 +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.2.5/Lib/json/tests/test_decode.py
-===================================================================
---- Python-3.2.5.orig/Lib/test/json_tests/test_decode.py	2014-06-26 18:40:10.825269130 +0200
-+++ Python-3.2.5/Lib/test/json_tests/test_decode.py	2014-06-26 18:40:21.962323035 +0200
-@@ -60,5 +60,9 @@
-         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)
-+
- class TestPyDecode(TestDecode, PyTest): pass
- class TestCDecode(TestDecode, CTest): pass
-Index: Python-3.2.5/Modules/_json.c
-===================================================================
---- a/Modules/_json.c
-+++ b/Modules/_json.c
-@@ -930,7 +930,10 @@ scan_once_unicode(PyScannerObject *s, Py
-     PyObject *res;
-     Py_UNICODE *str = PyUnicode_AS_UNICODE(pystr);
-     Py_ssize_t length = PyUnicode_GET_SIZE(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.2-issue16248.patch b/dev-lang/python/files/python-3.2-issue16248.patch
deleted file mode 100644
index d0e80ca..0000000
--- a/dev-lang/python/files/python-3.2-issue16248.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-# HG changeset patch
-# User Georg Brandl <georg@python.org>
-# Date 1379142489 -7200
-# Node ID c18c18774e240377d47638fb23e8276c1ac2e606
-# Parent  b9b521efeba385af0142988899a55de1c1c805c7
-Fix tkinter regression introduced by the security fix in #16248.
-
-diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
---- a/Lib/tkinter/__init__.py
-+++ b/Lib/tkinter/__init__.py
-@@ -1722,7 +1722,7 @@ class Tk(Misc, Wm):
-         # ensure that self.tk is always _something_.
-         self.tk = None
-         if baseName is None:
--            import sys, os
-+            import os
-             baseName = os.path.basename(sys.argv[0])
-             baseName, ext = os.path.splitext(baseName)
-             if ext not in ('.py', '.pyc', '.pyo'):

diff --git a/dev-lang/python/files/python-3.3-CVE-2013-2099.patch b/dev-lang/python/files/python-3.3-CVE-2013-2099.patch
deleted file mode 100644
index 44b9ace..0000000
--- a/dev-lang/python/files/python-3.3-CVE-2013-2099.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-# HG changeset patch
-# User Antoine Pitrou <solipsis@pitrou.net>
-# Date 1368892602 -7200
-#      Sat May 18 17:56:42 2013 +0200
-# Branch 3.3
-# Node ID c627638753e2d25a98950585b259104a025937a9
-# Parent  9682241dc8fcb4b1aef083bd30860efa070c3d6d
-Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of service using certificates with many wildcards (CVE-2013-2099).
-
-diff --git a/Lib/ssl.py b/Lib/ssl.py
---- a/Lib/ssl.py
-+++ b/Lib/ssl.py
-@@ -129,9 +129,16 @@
-     pass
- 
- 
--def _dnsname_to_pat(dn):
-+def _dnsname_to_pat(dn, max_wildcards=1):
-     pats = []
-     for frag in dn.split(r'.'):
-+        if frag.count('*') > max_wildcards:
-+            # Issue #17980: avoid denials of service by refusing more
-+            # than one wildcard per fragment.  A survery of established
-+            # policy among SSL implementations showed it to be a
-+            # reasonable choice.
-+            raise CertificateError(
-+                "too many wildcards in certificate DNS name: " + repr(dn))
-         if frag == '*':
-             # When '*' is a fragment by itself, it matches a non-empty dotless
-             # fragment.
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -349,6 +349,17 @@
-         self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com')
-         self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com')
- 
-+        # Issue #17980: avoid denials of service by refusing more than one
-+        # wildcard per fragment.
-+        cert = {'subject': ((('commonName', 'a*b.com'),),)}
-+        ok(cert, 'axxb.com')
-+        cert = {'subject': ((('commonName', 'a*b.co*'),),)}
-+        ok(cert, 'axxb.com')
-+        cert = {'subject': ((('commonName', 'a*b*.com'),),)}
-+        with self.assertRaises(ssl.CertificateError) as cm:
-+            ssl.match_hostname(cert, 'axxbxxc.com')
-+        self.assertIn("too many wildcards", str(cm.exception))
-+
-     def test_server_side(self):
-         # server_hostname doesn't work for server sockets
-         ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)

diff --git a/dev-lang/python/files/python-config-2.4-r1 b/dev-lang/python/files/python-config-2.4-r1
deleted file mode 100644
index af45113..0000000
--- a/dev-lang/python/files/python-config-2.4-r1
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /usr/bin/python2.4
-
-import sys
-import os
-import getopt
-from distutils import sysconfig
-
-valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', 
-              'ldflags', 'help']
-
-def exit_with_usage(code=1):
-    print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0], 
-                                            '|'.join('--'+opt for opt in valid_opts))
-    sys.exit(code)
-
-try:
-    opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
-except getopt.error:
-    exit_with_usage()
-
-if not opts:
-    #exit_with_usage()
-    #be compatible with our old python-config-2.4
-    import string
-    print "-lpython2.4 -lm -L/usr/lib/python2.4/config",string.join(string.split(sysconfig.get_config_var("MODLIBS")))
-    sys.exit(0)
-
-opt = opts[0][0]
-
-pyver = sysconfig.get_config_var('VERSION')
-getvar = sysconfig.get_config_var
-
-if opt == '--help':
-    exit_with_usage(0)
-
-elif opt == '--prefix':
-    print sysconfig.PREFIX
-
-elif opt == '--exec-prefix':
-    print sysconfig.EXEC_PREFIX
-
-elif opt in ('--includes', '--cflags'):
-    flags = ['-I' + sysconfig.get_python_inc(),
-             '-I' + sysconfig.get_python_inc(plat_specific=True)]
-    if opt == '--cflags':
-        flags.extend(getvar('CFLAGS').split())
-    print ' '.join(flags)
-
-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)
-
-

diff --git a/dev-lang/python/python-3.2.5-r6.ebuild b/dev-lang/python/python-3.2.5-r6.ebuild
deleted file mode 100644
index e388108..0000000
--- a/dev-lang/python/python-3.2.5-r6.ebuild
+++ /dev/null
@@ -1,384 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-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_REVISION="1"
-
-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
-	http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="3.2"
-KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-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} )"
-PDEPEND="app-eselect/eselect-python
-	app-admin/python-updater"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	if [[ "${PV}" =~ ^3\.2(\.[1234])?(_pre)? ]]; then
-		rm -f "${EROOT}usr/$(get_libdir)/llibpython3.so"
-	else
-		die "Deprecated code not deleted"
-	fi
-}
-
-src_prepare() {
-	# Ensure that internal copies of expat, libffi and zlib are not used.
-	rm -r Modules/expat
-	rm -r Modules/_ctypes/libffi*
-	rm -r Modules/zlib
-
-	local excluded_patches
-	if ! tc-is-cross-compiler; then
-		excluded_patches="*_all_crosscompile.patch"
-	fi
-
-	EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" \
-		epatch "${WORKDIR}/patches"
-
-	epatch "${FILESDIR}/python-3.2-CVE-2013-2099.patch"
-	epatch "${FILESDIR}/CVE-2013-4238_py33.patch"
-	epatch "${FILESDIR}/python-3.2-issue16248.patch"
-
-	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"
-
-	# bug #514686
-	epatch "${FILESDIR}/${PN}-3.2-CVE-2014-4616.patch"
-	# bug #500518
-	epatch "${FILESDIR}/${PN}-3.2-CVE-2014-1912.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
-
-	[[ "${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}}
-
-	if tc-is-cross-compiler; then
-		(
-		multijob_child_init
-		cd "${WORKDIR}"/${CBUILD} >/dev/null
-		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}
-	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}
-	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}
-
-	# 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
-	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}
-	emake DESTDIR="${D}" altinstall
-
-	sed \
-		-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
-		-e "s/\(PY_LDFLAGS=\).*/\1/" \
-		-i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
-
-	# Backwards compat with Gentoo divergence.
-	dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
-
-	# 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}
-	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${SLOT}" "${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-${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_preinst() {
-	if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_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() {
-	ewarn "Please note that Python ${PV%.*} 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 ${PV%.*}."
-	ewarn
-	ewarn "If you wish to use Python ${PV%.*} 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 ${PV%.*} on production systems."
-}
-
-pkg_postrm() {
-	eselect_python_update
-}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-04-12 11:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-12 11:29 [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/, dev-lang/python/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2020-04-04 18:22 Mike Gilbert
2020-04-03 14:55 Mike Gilbert
2020-03-07 15:45 Michał Górny
2020-01-03  8:27 Michał Górny
2019-10-19  1:05 Mike Gilbert
2018-04-13 19:33 Aaron Bauman
2018-04-01 17:18 Mike Gilbert
2017-07-30 15:26 Mike Gilbert
2016-06-06 19:40 Michał Górny
2015-10-02 13:56 Mike Frysinger
2015-08-09  8:48 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox