aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bauman <bman@gentoo.org>2019-02-20 14:10:45 -0500
committerAaron Bauman <bman@gentoo.org>2019-02-20 14:10:45 -0500
commit160d73efa42c504cee33400521b9a855783612f8 (patch)
tree973c4e65e8912146af4f5d132117bde58ade155b
parentdev-db/sqlcipher: drop as changes are carried in gentoo.git (diff)
downloadlibressl-160d73efa42c504cee33400521b9a855783612f8.tar.gz
libressl-160d73efa42c504cee33400521b9a855783612f8.tar.bz2
libressl-160d73efa42c504cee33400521b9a855783612f8.zip
dev-lang/python: drop as gentoo.git carries patches
Signed-off-by: Aaron Bauman <bman@gentoo.org>
-rw-r--r--dev-lang/python/Manifest13
-rw-r--r--dev-lang/python/files/3.4-getentropy-linux.patch40
-rw-r--r--dev-lang/python/files/3.6-blake2.patch37
-rw-r--r--dev-lang/python/files/3.6-disable-nis.patch21
-rw-r--r--dev-lang/python/files/3.6.5-disable-nis.patch11
-rw-r--r--dev-lang/python/files/pydoc.conf6
-rw-r--r--dev-lang/python/files/pydoc.init24
-rw-r--r--dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch13
-rw-r--r--dev-lang/python/files/python-3.4.5-cross.patch11
-rw-r--r--dev-lang/python/files/python-3.5-distutils-OO-build.patch80
-rw-r--r--dev-lang/python/files/python-3.6.3-libressl-2.7.patch27
-rw-r--r--dev-lang/python/metadata.xml12
-rw-r--r--dev-lang/python/python-3.4.5-r1.ebuild361
-rw-r--r--dev-lang/python/python-3.4.6-r1.ebuild359
-rw-r--r--dev-lang/python/python-3.4.8.ebuild359
-rw-r--r--dev-lang/python/python-3.5.4-r1.ebuild366
-rw-r--r--dev-lang/python/python-3.5.5.ebuild366
-rw-r--r--dev-lang/python/python-3.6.3-r1.ebuild346
-rw-r--r--dev-lang/python/python-3.6.4.ebuild347
-rw-r--r--dev-lang/python/python-3.6.5.ebuild347
20 files changed, 0 insertions, 3146 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
deleted file mode 100644
index 66e5db7..0000000
--- a/dev-lang/python/Manifest
+++ /dev/null
@@ -1,13 +0,0 @@
-DIST Python-3.4.5.tar.xz 14516820 BLAKE2B f9ddabd2df2241089d07756d3a8ba1c70096bee60d7cdef84041edbb20c488c3a573762441a4b7f543dbc0ce403ce84ff7d02e7d25699917bd014ab96deead85 SHA512 b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c
-DIST Python-3.4.6.tar.xz 14473592 BLAKE2B 4af4f8e6f5c6831b50e99dd9eef47617f14903dc709f53f833c64726b003e9f84f75be80ba8059dcada2b2f262d65875f70d8c53a163546e51f9a715c68f4f20 SHA512 f6785cf6a99a8a27823baefe59cc20e34cbec01bb444c8600e7f49b5437159d5137f9d80fce26e219846d71bfe98f68bc6f0c87719a34db0050a4eaca95959ac
-DIST Python-3.4.8.tar.xz 14576444 BLAKE2B 262b82fbc0e4852216d2edf05f9e9194bc93be7b14a2d6ef56789b808cff274e58b2fa7134955464fd05ab36181b5861aeca31e2e05b27f0f58ac66d145bd56b SHA512 478552c72efe606cb1993024b81839c51d01f1c949564c007ab2b76016f110e1f7bd418e5de3f4f93b466ce7dbe6583d3c150830d1f28f75e0809625b568a7ec
-DIST Python-3.5.4.tar.xz 15332320 BLAKE2B 1fc3ba4eb1ed949062961c13fd1f9851c7f9cbeb4916c06a0389349ee2d4872b2b1c2d30138822e6329b6a715f35a66df704b7a04aa4adeb95b685b8d6e45d61 SHA512 dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff
-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-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
-DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 BLAKE2B 4a7d71feff18c7c8c109bed10748348484d314183c3de3ec950d5ca5ce7048bb322c470f3f5bff2d63eb7f2ed99c0fe75c621df050273d9d118681b28926061d SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec
-DIST python-gentoo-patches-3.6.2-0.tar.xz 10744 BLAKE2B 3075754627617ac2ceee879eaf1a0e6564505655cdbdff380233a09df701a6188d64fe1f6a8c642b1fb05ef3c460a07042b6a362d655cd02717d6d9ba47983a1 SHA512 2aac1700c541202aa4f43bff4cb521b996d52ab350133318abaddb43f4b6e20548f37de472ace8024ef325ebf63fdfff0d43f8aa1f717d3c56f974b7aa1764e3
-DIST python-gentoo-patches-3.6.4.tar.xz 12888 BLAKE2B 7cf49ae22df53e855f2e99df51686b5d4bd0da82ef4c22836e24726ea9ed561808352c0305a5659b052d38b843f1ff61b6466a7bc3673b7e5cfb4d81d22fa4bc SHA512 90a1b685f2539872ffd67f96581f70145b7afaf18af19f4a7f4a61214103d2a10bf0069c1769dac229ae011fceaf8538f041082b33c1671905246d018d184dd7
diff --git a/dev-lang/python/files/3.4-getentropy-linux.patch b/dev-lang/python/files/3.4-getentropy-linux.patch
deleted file mode 100644
index 9f12389..0000000
--- a/dev-lang/python/files/3.4-getentropy-linux.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 5635d44079e1bbd9c495951ede8d078e7b8d67d5 Mon Sep 17 00:00:00 2001
-From: Victor Stinner <victor.stinner@gmail.com>
-Date: Mon, 9 Jan 2017 11:10:41 +0100
-Subject: [PATCH] Don't use getentropy() on Linux
-
-Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but
-read from /dev/urandom to get random bytes, for example in os.urandom(). On
-Linux, getentropy() is implemented which getrandom() is blocking mode, whereas
-os.urandom() should not block.
----
- Python/random.c | 13 ++++++++++---
- 1 file changed, 10 insertions(+), 3 deletions(-)
-
-diff --git a/Python/random.c b/Python/random.c
-index af3d0bd0d5..dc6400d3b8 100644
---- a/Python/random.c
-+++ b/Python/random.c
-@@ -67,9 +67,16 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
- return 0;
- }
-
--/* Issue #25003: Don' use getentropy() on Solaris (available since
-- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
--#elif defined(HAVE_GETENTROPY) && !defined(sun)
-+/* Issue #25003: Don't use getentropy() on Solaris (available since
-+ Solaris 11.3), it is blocking whereas os.urandom() should not block.
-+
-+ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24
-+ implements it with the getrandom() syscall which can fail with ENOSYS,
-+ and this error is not supported in py_getentropy() and getrandom() is called
-+ with flags=0 which blocks until system urandom is initialized, which is not
-+ the desired behaviour to seed the Python hash secret nor for os.urandom():
-+ see the PEP 524 which was only implemented in Python 3.6. */
-+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
- #define PY_GETENTROPY 1
-
- /* Fill buffer with size pseudo-random bytes generated by getentropy().
---
-2.15.0.rc2
-
diff --git a/dev-lang/python/files/3.6-blake2.patch b/dev-lang/python/files/3.6-blake2.patch
deleted file mode 100644
index 48ee585..0000000
--- a/dev-lang/python/files/3.6-blake2.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-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/files/3.6-disable-nis.patch b/dev-lang/python/files/3.6-disable-nis.patch
deleted file mode 100644
index 4e81847..0000000
--- 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/3.6.5-disable-nis.patch b/dev-lang/python/files/3.6.5-disable-nis.patch
deleted file mode 100644
index 3937c6f..0000000
--- a/dev-lang/python/files/3.6.5-disable-nis.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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/files/pydoc.conf b/dev-lang/python/files/pydoc.conf
deleted file mode 100644
index 3c6920c..0000000
--- a/dev-lang/python/files/pydoc.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# /etc/init.d/pydoc.conf
-
-# This file contains the configuration for pydoc's internal webserver.
-
-# Default port for Python's pydoc server.
-@PYDOC_PORT_VARIABLE@="7464"
diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init
deleted file mode 100644
index f8e0563..0000000
--- a/dev-lang/python/files/pydoc.init
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public Licence v2
-
-start() {
- local pydoc_port="${@PYDOC_PORT_VARIABLE@-${PYDOC_PORT}}"
-
- if [ -z "${pydoc_port}" ]; then
- eerror "Port not set"
- return 1
- fi
-
- ebegin "Starting pydoc server on port ${pydoc_port}"
- start-stop-daemon --start --background --make-pidfile \
- --pidfile /var/run/@PYDOC@.pid \
- --exec /usr/bin/@PYDOC@ -- -p "${pydoc_port}"
- eend $?
-}
-
-stop() {
- ebegin "Stopping pydoc server"
- start-stop-daemon --stop --quiet --pidfile /var/run/@PYDOC@.pid
- eend $?
-}
diff --git a/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch b/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch
deleted file mode 100644
index 8bfad11..0000000
--- a/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-do not hardcode /usr/include paths
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -4402,7 +4402,7 @@ fi
-
- # first curses header check
- ac_save_cppflags="$CPPFLAGS"
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
-
- AC_CHECK_HEADERS(curses.h ncurses.h)
-
diff --git a/dev-lang/python/files/python-3.4.5-cross.patch b/dev-lang/python/files/python-3.4.5-cross.patch
deleted file mode 100644
index 7a016ff..0000000
--- a/dev-lang/python/files/python-3.4.5-cross.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Lib/distutils/command/build_ext.py
-+++ b/Lib/distutils/command/build_ext.py
-@@ -729,7 +729,7 @@
- if sysconfig.get_config_var('Py_ENABLE_SHARED'):
- pythonlib = 'python{}.{}{}'.format(
- sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff,
-- sys.abiflags)
-+ sysconfig.get_config_var('ABIFLAGS'))
- return ext.libraries + [pythonlib]
- else:
- return ext.libraries
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 8af8c30..0000000
--- 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.6.3-libressl-2.7.patch b/dev-lang/python/files/python-3.6.3-libressl-2.7.patch
deleted file mode 100644
index fd766c4..0000000
--- a/dev-lang/python/files/python-3.6.3-libressl-2.7.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-$OpenBSD: patch-Modules__ssl_c,v 1.2 2018/03/17 22:30:04 sthen Exp $
-
-XXX maybe the second hunk can go away now we have auto-init, I'm not sure
-exactly what python's lock protects
-
---- a/Modules/_ssl.c
-+++ b/Modules/_ssl.c
-@@ -99,7 +99,8 @@ struct py_ssl_library_code {
- /* Include generated data (error codes) */
- #include "_ssl_data.h"
-
--#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
-+ (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
- # define OPENSSL_VERSION_1_1 1
- #endif
-
-@@ -133,6 +134,9 @@ struct py_ssl_library_code {
- /* OpenSSL 1.1.0+ */
- #ifndef OPENSSL_NO_SSL2
- #define OPENSSL_NO_SSL2
-+#endif
-+#if defined(LIBRESSL_VERSION_NUMBER) && defined(WITH_THREAD)
-+#define HAVE_OPENSSL_CRYPTO_LOCK
- #endif
- #else /* OpenSSL < 1.1.0 */
- #if defined(WITH_THREAD)
diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
deleted file mode 100644
index dfcbe08..0000000
--- a/dev-lang/python/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
- <email>python@gentoo.org</email>
- <name>Python</name>
-</maintainer>
-<use>
- <flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
- <flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag>
-</use>
-</pkgmetadata>
diff --git a/dev-lang/python/python-3.4.5-r1.ebuild b/dev-lang/python/python-3.4.5-r1.ebuild
deleted file mode 100644
index 0197a7d..0000000
--- a/dev-lang/python/python-3.4.5-r1.ebuild
+++ /dev/null
@@ -1,361 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# 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 multiprocessing
-
-MY_P="Python-${PV/_/}"
-PATCHSET_VERSION="3.4.5-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.4/3.4m"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="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:= )
- )
- 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/autoconf-2.65
- !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.4.5-cross.patch"
- epatch "${FILESDIR}/3.4-getentropy-linux.patch"
- epatch "${FILESDIR}/3.6-disable-nis.patch"
- epatch "${FILESDIR}/${PN}-3.6.3-libressl-2.7.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/Setup.dist \
- Modules/getpath.c \
- 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
-
- ECONF_SOURCE="${S}" OPT="" \
- econf \
- --with-fpectl \
- --enable-shared \
- $(use_enable ipv6) \
- $(use_with threads) \
- --infodir='${prefix}/share/info' \
- --mandir='${prefix}/share/man' \
- --with-computed-gotos \
- --with-dbmliborder="${dbmliborder}" \
- --with-libc="" \
- --enable-loadable-sqlite-extensions \
- --with-system-expat \
- --with-system-ffi \
- --without-ensurepip
-
- 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
-
- # Avoid invoking pgen for cross-compiles.
- touch Include/graminit.h Python/graminit.c || die
-
- cd "${BUILD_DIR}" || die
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- cd "${BUILD_DIR}" || die
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- 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
-
- 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.4.6-r1.ebuild b/dev-lang/python/python-3.4.6-r1.ebuild
deleted file mode 100644
index 54140d8..0000000
--- a/dev-lang/python/python-3.4.6-r1.ebuild
+++ /dev/null
@@ -1,359 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# 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 multiprocessing
-
-MY_P="Python-${PV/_/}"
-PATCHSET_VERSION="3.4.6-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.4/3.4m"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-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/autoconf-2.65
- !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.4.5-cross.patch"
- epatch "${FILESDIR}/3.4-getentropy-linux.patch"
- epatch "${FILESDIR}/3.6-disable-nis.patch"
- epatch "${FILESDIR}/${PN}-3.6.3-libressl-2.7.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/Setup.dist \
- Modules/getpath.c \
- 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
-
- ECONF_SOURCE="${S}" OPT="" \
- econf \
- --with-fpectl \
- --enable-shared \
- $(use_enable ipv6) \
- $(use_with threads) \
- --infodir='${prefix}/share/info' \
- --mandir='${prefix}/share/man' \
- --with-computed-gotos \
- --with-dbmliborder="${dbmliborder}" \
- --with-libc="" \
- --enable-loadable-sqlite-extensions \
- --with-system-expat \
- --with-system-ffi \
- --without-ensurepip
-
- 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
-
- # Avoid invoking pgen for cross-compiles.
- touch Include/graminit.h Python/graminit.c || die
-
- cd "${BUILD_DIR}" || die
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- cd "${BUILD_DIR}" || die
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- 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
-
- 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.4.8.ebuild b/dev-lang/python/python-3.4.8.ebuild
deleted file mode 100644
index 54140d8..0000000
--- a/dev-lang/python/python-3.4.8.ebuild
+++ /dev/null
@@ -1,359 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# 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 multiprocessing
-
-MY_P="Python-${PV/_/}"
-PATCHSET_VERSION="3.4.6-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.4/3.4m"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-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/autoconf-2.65
- !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.4.5-cross.patch"
- epatch "${FILESDIR}/3.4-getentropy-linux.patch"
- epatch "${FILESDIR}/3.6-disable-nis.patch"
- epatch "${FILESDIR}/${PN}-3.6.3-libressl-2.7.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/Setup.dist \
- Modules/getpath.c \
- 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
-
- ECONF_SOURCE="${S}" OPT="" \
- econf \
- --with-fpectl \
- --enable-shared \
- $(use_enable ipv6) \
- $(use_with threads) \
- --infodir='${prefix}/share/info' \
- --mandir='${prefix}/share/man' \
- --with-computed-gotos \
- --with-dbmliborder="${dbmliborder}" \
- --with-libc="" \
- --enable-loadable-sqlite-extensions \
- --with-system-expat \
- --with-system-ffi \
- --without-ensurepip
-
- 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
-
- # Avoid invoking pgen for cross-compiles.
- touch Include/graminit.h Python/graminit.c || die
-
- cd "${BUILD_DIR}" || die
-
- emake CPPFLAGS= CFLAGS= LDFLAGS=
-
- # Work around bug 329499. See also bug 413751 and 457194.
- if has_version dev-libs/libffi[pax_kernel]; then
- pax-mark E python
- else
- pax-mark m python
- fi
-}
-
-src_test() {
- # Tests will not work when cross compiling.
- if tc-is-cross-compiler; then
- elog "Disabling tests due to crosscompiling."
- return
- fi
-
- cd "${BUILD_DIR}" || die
-
- # Skip failing tests.
- local skipped_tests="gdb"
-
- for test in ${skipped_tests}; do
- mv "${S}"/Lib/test/test_${test}.py "${T}"
- done
-
- 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
-
- 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.4-r1.ebuild b/dev-lang/python/python-3.5.4-r1.ebuild
deleted file mode 100644
index daf087a..0000000
--- a/dev-lang/python/python-3.5.4-r1.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# 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 ~amd64-fbsd ~x86-fbsd"
-IUSE="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:= )
- )
- 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
-
- 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}/${PN}-3.6.3-libressl-2.7.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() {
- # 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.5.ebuild b/dev-lang/python/python-3.5.5.ebuild
deleted file mode 100644
index 61d92f4..0000000
--- a/dev-lang/python/python-3.5.5.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# 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 ~amd64-fbsd ~x86-fbsd"
-IUSE="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:= )
- )
- 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
-
- 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}/${PN}-3.6.3-libressl-2.7.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() {
- # 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.6.3-r1.ebuild b/dev-lang/python/python-3.6.3-r1.ebuild
deleted file mode 100644
index 562d2f7..0000000
--- a/dev-lang/python/python-3.6.3-r1.ebuild
+++ /dev/null
@@ -1,346 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# 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.6.2-0"
-
-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
-
- EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
- epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
- epatch "${FILESDIR}/3.6-blake2.patch"
- epatch "${FILESDIR}/3.6-disable-nis.patch"
- epatch "${FILESDIR}/${PN}-3.6.3-libressl-2.7.patch"
-
- epatch_user
-
- 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
-}
diff --git a/dev-lang/python/python-3.6.4.ebuild b/dev-lang/python/python-3.6.4.ebuild
deleted file mode 100644
index a541c89..0000000
--- a/dev-lang/python/python-3.6.4.ebuild
+++ /dev/null
@@ -1,347 +0,0 @@
-# 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-disable-nis.patch"
- "${FILESDIR}/${PN}-3.6.3-libressl-2.7.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
-}
diff --git a/dev-lang/python/python-3.6.5.ebuild b/dev-lang/python/python-3.6.5.ebuild
deleted file mode 100644
index 5f813a5..0000000
--- a/dev-lang/python/python-3.6.5.ebuild
+++ /dev/null
@@ -1,347 +0,0 @@
-# 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"
- "${FILESDIR}/${PN}-3.6.3-libressl-2.7.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
-}