diff options
author | Jory Pratt <anarchy@gentoo.org> | 2019-03-26 14:48:03 -0500 |
---|---|---|
committer | Jory Pratt <anarchy@gentoo.org> | 2019-03-26 14:48:03 -0500 |
commit | 5e99477afb000f474675e6f9aae8254ad292e906 (patch) | |
tree | 197a9f1c7cb1f826f972f09e55cdf35d9a003e0e | |
parent | dev-lang/perl: perl-5.26.3 update for security (diff) | |
download | anarchy-5e99477afb000f474675e6f9aae8254ad292e906.tar.gz anarchy-5e99477afb000f474675e6f9aae8254ad292e906.tar.bz2 anarchy-5e99477afb000f474675e6f9aae8254ad292e906.zip |
dev-lang/python: already updated in tree
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
-rw-r--r-- | dev-lang/python/Manifest | 12 | ||||
-rw-r--r-- | dev-lang/python/files/2.7.15-disable-nis.patch | 15 | ||||
-rw-r--r-- | dev-lang/python/files/pydoc.conf | 6 | ||||
-rw-r--r-- | dev-lang/python/files/pydoc.init | 24 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.7-libressl-compatibility.patch | 92 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch | 24 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.7.10-system-libffi.patch | 36 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch | 18 | ||||
-rw-r--r-- | dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch | 13 | ||||
-rw-r--r-- | dev-lang/python/metadata.xml | 14 | ||||
-rw-r--r-- | dev-lang/python/python-2.7.15.ebuild | 368 |
11 files changed, 0 insertions, 622 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest deleted file mode 100644 index 320d330..0000000 --- a/dev-lang/python/Manifest +++ /dev/null @@ -1,12 +0,0 @@ -AUX 2.7.15-disable-nis.patch 556 BLAKE2B d4e090c2984adc3a74ba153f3ea31c8dce728c79ddaf4f134e206284b9fc698103c726b0a60d38eeb1e04fff7ba8388e71f3d6763ccdcfbd5865dcf4f3b7f93a SHA512 f3697bcd9af2f9b845058ac1834f2cfd79adb7ef3b24abbbc01280830b8c5244ee187d16a02798abf95eebbd6695afb3b391ce7fcb16bf1d53d301e3e88a7f57 -AUX pydoc.conf 169 BLAKE2B ce40bb3d5f858bd7a8d9ef5bf215a8ab592568a724f0e08aea219da014dac12fdfcbcf5fb168bb9aa57be110f74d656aed46179ffe11e3c992d84a647e442b7b SHA512 30d0776a4004cd641e6f283658c3c24915a21ea15fe40e506ff2c3a5f95936aa00c9490b04ab25f29e9b7ac65cd88fd54ca0b08e000e73820b13c7c57c0bf5b2 -AUX pydoc.init 600 BLAKE2B fb8775a6663483e5112ec283627610b746020d88494e772b92bb718a9493a52606e565c6c2fa4917a5cb963f166283d09883bd26903f2f3ced6c240d4e292a7f SHA512 9e71ad53486b6882a8441b24225c602195ee33d29dd1b60df27febbc6b752e79929be356152a489f893dcfb11f9c066b999787bc27a8ac61062c86e67a69e87a -AUX python-2.7-libressl-compatibility.patch 2783 BLAKE2B 44c13d121291c1f660a2fd2edbbaafb4861896503423e9a85d506aea3c416de238a5a1ff08a6065cb4cd2498e456fb3646186dbd3472fbb37058b6ebfd47ad0f SHA512 d258b28d3d9d87e11148b16d3e2f8d378c95897b630f5132058654ee031045f4a0dcc7f11dfb43a8deeac2723e6c1ae88e55db1b4eaad019e1d3b9fa47ea2991 -AUX python-2.7.10-cross-compile-warn-test.patch 775 BLAKE2B 617938353c7e19a9b931544ff1fdcd60cf46e3a68f3ff63bc6ac16432220aad13df4d2b405a968505fb64d31da51a478c46499944ab58e9bbfa5a5b44d392f00 SHA512 652941239541f6139ee3580ec0ea5240baf07ae1afb786f76a69b1d748de1f4dda2740a95c28866e9b0b59023410f8a1e86507642595991c0d90d187519cb758 -AUX python-2.7.10-system-libffi.patch 1232 BLAKE2B 3483385cbbf7ef2304cf109d05b5e1d58ec2b9015b614c996c66a9917ab10703865b40c775d7ff89a6fa80e9c8c9600292d8d916e9753027e9e0b23b0548ccff SHA512 3c888638180edc81b98a869478085de63741668ea62bdb919a60708fd64cb394e60f44a3730e2ccf3e41d1d61b72b469242fe2ccd20dc61bc2064b3e759c52bd -AUX python-2.7.5-nonfatal-compileall.patch 750 BLAKE2B a7999a6c5a706fbab213cd8a01c6df9b130537556d59bf50b1f5ca223bb9dcd24ccfef48e70e5d3a8afe2b9c6236e1ada87d5899052a2b39f05c4644697953e2 SHA512 d2e93e2a6fcd55d516df0ddaca31af97faed677ea6b4be282eb99e7864f8a7399b5ca11139844a4b3c264832183483b0f4c8c9865c05de0e8520e6d2c8f1dbc6 -AUX python-2.7.9-ncurses-pkg-config.patch 305 BLAKE2B 92962397a1e74d9dca8bc232400e84673e0989239e6952c2ba9f25db6f9da343334e0ad325e8932fcec3f9a50e62d4e9b81a8d7a776cdbfc2d0399601591f534 SHA512 2c18b5041a7a2f306dd4d0d6695bd851ca14c9107b2e3e856ec094bc53c7cc407b49e1f4813ee9e753b3ad2d4f6edda943a66bb1e6c895ab956a5f84d30646c6 -DIST Python-2.7.15.tar.xz 12642436 BLAKE2B d8783a48ea26695e8d4677397a08194c738d7e4bc8ecaddaab609ad1fd5a1ca07701f707fe38d259f6bd44a39171ef95e7530f3df4bcb4d94abc4d21d7e2d489 SHA512 27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 -DIST python-gentoo-patches-2.7.15-0.tar.xz 13360 BLAKE2B df6643c2f95777680590762485f9212bc875b002b6c2c44f4de68383229ec6924fa7fa344951805d45bd268dd50417f598cb229d19412238756b968463e38642 SHA512 2882abcfc3e518a772248435b12e09020d7d87ca43f5c02737f9e9c370837e7feed9cf8002eae6a229b50a46d1c09eb5163264b164e396cfb794d530558ee98f -EBUILD python-2.7.15.ebuild 10996 BLAKE2B 801925638a3cf1550b38561fda2016321c6cbb93426f790cea9465eaa5332595c5e51b241c1c1ab6dfcdee8db09d9f223247aefc10caeaba8a5456506febfc82 SHA512 c2668bc6bf1da45848a3674ee86aafc3a6d86b0910fedeea9bd07bf37380d007f4be395cec9bea0ac51d1a503f17f68e7c077b519df0e2f55f244c02428cd5ac -MISC metadata.xml 819 BLAKE2B 120c7c65d77488e726c5a0f4aa19469867ea6900e747169fae2f9cf8f14ec2936089d5edfe1935ce610bec26387273e261b1cc4b023680c8c4b229f2141a7223 SHA512 08f45707e5490067a21951b9d37c8ae67064ab67cccc5b8d8c204eab8d4a004fb910627b62989c67b849b89d301618f8f8f7996e99e1ef5bab38a239c49c124d diff --git a/dev-lang/python/files/2.7.15-disable-nis.patch b/dev-lang/python/files/2.7.15-disable-nis.patch deleted file mode 100644 index 1e1fe3b..0000000 --- a/dev-lang/python/files/2.7.15-disable-nis.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/setup.py 2018-05-08 16:08:42.479599434 +0300 -+++ b/setup.py 2018-05-08 16:11:09.777818652 +0300 -@@ -1361,11 +1361,7 @@ class PyBuildExt(build_ext): - else: - missing.append('resource') - -- nis = self._detect_nis(inc_dirs, lib_dirs) -- if nis is not None: -- exts.append(nis) -- else: -- missing.append('nis') -+ missing.append('nis') - - # Curses support, requiring the System V version of curses, often - # provided by the ncurses library. 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-2.7-libressl-compatibility.patch b/dev-lang/python/files/python-2.7-libressl-compatibility.patch deleted file mode 100644 index c9e7a84..0000000 --- a/dev-lang/python/files/python-2.7-libressl-compatibility.patch +++ /dev/null @@ -1,92 +0,0 @@ -# From https://github.com/python/cpython/pull/6215 - -# LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects -# LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and -# LibreSSL < 2.7. - -# Documentation updates and fixes for failing tests will be provided in -# another patch set. - -# Signed-off-by: Christian Heimes christian@python.org. -# (cherry picked from commit 4ca0739) - -#Co-authored-by: Christian Heimes christian@python.org - ---- a/Modules/_ssl.c 2017-09-16 17:38:35.000000000 +0000 -+++ b/Modules/_ssl.c 2018-04-13 15:55:10.919424126 +0000 -@@ -97,6 +102,12 @@ - - #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) - # define OPENSSL_VERSION_1_1 1 -+# define PY_OPENSSL_1_1_API 1 -+#endif -+ -+/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */ -+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL -+# define PY_OPENSSL_1_1_API 1 - #endif - - /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1 -@@ -118,24 +129,44 @@ - #endif - - /* ALPN added in OpenSSL 1.0.2 */ --#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(OPENSSL_NO_TLSEXT) --# define HAVE_ALPN -+#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation -+# define HAVE_ALPN 1 -+#else -+# define HAVE_ALPN 0 -+#endif -+ -+/* We cannot rely on OPENSSL_NO_NEXTPROTONEG because LibreSSL 2.6.1 dropped -+ * NPN support but did not set OPENSSL_NO_NEXTPROTONEG for compatibility -+ * reasons. The check for TLSEXT_TYPE_next_proto_neg works with -+ * OpenSSL 1.0.1+ and LibreSSL. -+ * OpenSSL 1.1.1-pre1 dropped NPN but still has TLSEXT_TYPE_next_proto_neg. -+ */ -+#ifdef OPENSSL_NO_NEXTPROTONEG -+# define HAVE_NPN 0 -+#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER) -+# define HAVE_NPN 0 -+#elif defined(TLSEXT_TYPE_next_proto_neg) -+# define HAVE_NPN 1 -+#else -+# define HAVE_NPN 0 - #endif - - #ifndef INVALID_SOCKET /* MS defines this */ - #define INVALID_SOCKET (-1) - #endif - --#ifdef OPENSSL_VERSION_1_1 --/* OpenSSL 1.1.0+ */ --#ifndef OPENSSL_NO_SSL2 --#define OPENSSL_NO_SSL2 --#endif --#else /* OpenSSL < 1.1.0 */ --#if defined(WITH_THREAD) -+/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */ -+#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD) - #define HAVE_OPENSSL_CRYPTO_LOCK - #endif - -+#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2) -+#define OPENSSL_NO_SSL2 -+#endif -+ -+#ifndef PY_OPENSSL_1_1_API -+/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */ -+ - #define TLS_method SSLv23_method - - static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne) -@@ -178,7 +209,7 @@ - { - return store->param; - } --#endif /* OpenSSL < 1.1.0 or LibreSSL */ -+#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */ - - - enum py_ssl_error { diff --git a/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch b/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch deleted file mode 100644 index 38433de..0000000 --- a/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch +++ /dev/null @@ -1,24 +0,0 @@ -https://bugs.python.org/issue25397 - -improve the cross-compile tests to be more focused - ---- a/configure.ac -+++ b/configure.ac -@@ -1339,7 +1339,7 @@ if test "$GCC" = "yes" - then - AC_MSG_CHECKING(whether gcc supports ParseTuple __format__) - save_CFLAGS=$CFLAGS -- CFLAGS="$CFLAGS -Werror -Wformat" -+ CFLAGS="$CFLAGS -Werror=format" - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]]) - ],[ -@@ -4458,7 +4458,7 @@ then - [ac_cv_have_long_long_format="cross -- assuming no" - if test x$GCC = xyes; then - save_CFLAGS=$CFLAGS -- CFLAGS="$CFLAGS -Werror -Wformat" -+ CFLAGS="$CFLAGS -Werror=format" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include <stdio.h> - #include <stddef.h> diff --git a/dev-lang/python/files/python-2.7.10-system-libffi.patch b/dev-lang/python/files/python-2.7.10-system-libffi.patch deleted file mode 100644 index 0b49b79..0000000 --- a/dev-lang/python/files/python-2.7.10-system-libffi.patch +++ /dev/null @@ -1,36 +0,0 @@ -make sure we respect the system libffi setting in our build config. -the compiler probing is fragile and can break in some situations. - ---- a/setup.py -+++ b/setup.py -@@ -2069,7 +2069,7 @@ class PyBuildExt(build_ext): - return True - - def detect_ctypes(self, inc_dirs, lib_dirs): -- self.use_system_libffi = False -+ self.use_system_libffi = ('--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS")) - include_dirs = [] - extra_compile_args = [] - extra_link_args = [] -@@ -2113,7 +2113,7 @@ class PyBuildExt(build_ext): - sources=['_ctypes/_ctypes_test.c']) - self.extensions.extend([ext, ext_test]) - -- if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"): -+ if not self.use_system_libffi: - return - - if host_platform == 'darwin': -@@ -2141,10 +2141,10 @@ class PyBuildExt(build_ext): - ffi_lib = lib_name - break - -- if ffi_inc and ffi_lib: -+ if ffi_inc: - ext.include_dirs.extend(ffi_inc) -+ if ffi_lib: - ext.libraries.append(ffi_lib) -- self.use_system_libffi = True - - - class PyBuildInstall(install): diff --git a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch b/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch deleted file mode 100644 index a762dfb..0000000 --- a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1000,12 +1000,12 @@ - $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ - $(DESTDIR)$(LIBDEST)/distutils/tests ; \ - fi -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ - $(DESTDIR)$(LIBDEST) -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ - -d $(LIBDEST) -f \ - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ diff --git a/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch b/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch deleted file mode 100644 index 38ce6f7..0000000 --- a/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch +++ /dev/null @@ -1,13 +0,0 @@ -do not hardcode /usr/include paths - ---- a/configure.ac -+++ b/configure.ac -@@ -4316,7 +4316,7 @@ fi - - # first curses configure check - ac_save_cppflags="$CPPFLAGS" --CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" -+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`" - - AC_CHECK_HEADERS(curses.h ncurses.h) - diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml deleted file mode 100644 index 98fa548..0000000 --- a/dev-lang/python/metadata.xml +++ /dev/null @@ -1,14 +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="bluetooth">Build Bluetooth protocol support in socket module</flag> - <flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag> - <flag name="wide-unicode">Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag> - <flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag> -</use> -</pkgmetadata> diff --git a/dev-lang/python/python-2.7.15.ebuild b/dev-lang/python/python-2.7.15.ebuild deleted file mode 100644 index 221cc83..0000000 --- a/dev-lang/python/python-2.7.15.ebuild +++ /dev/null @@ -1,368 +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="2.7.15-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="2.7" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" -IUSE="-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -# Do not add a dependency on dev-lang/python to this ebuild. -# If you need to apply a patch which requires python for bootstrapping, please -# run the bootstrap code on your dev box and include the results in the -# patchset. See bug 447752. - -RDEPEND="app-arch/bzip2:0= - >=sys-libs/zlib-1.1.3:0= - virtual/libffi - virtual/libintl - berkdb? ( || ( - sys-libs/db:5.3 - sys-libs/db:5.2 - sys-libs/db:5.1 - sys-libs/db:5.0 - sys-libs/db:4.8 - sys-libs/db:4.7 - sys-libs/db:4.6 - sys-libs/db:4.5 - sys-libs/db:4.4 - sys-libs/db:4.3 - sys-libs/db:4.2 - ) ) - gdbm? ( sys-libs/gdbm:0=[berkdb] ) - ncurses? ( >=sys-libs/ncurses-5.2:0= ) - readline? ( >=sys-libs/readline-4.1:0= ) - sqlite? ( >=dev-db/sqlite-3.3.8:3= ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - tk? ( - >=dev-lang/tcl-8.0:0= - >=dev-lang/tk-8.0:0= - dev-tcltk/blt:0= - dev-tcltk/tix - ) - xml? ( >=dev-libs/expat-2.1 ) - !!<sys-apps/portage-2.1.9" -# bluetooth requires headers from bluez -DEPEND="${RDEPEND} - bluetooth? ( net-wireless/bluez ) - virtual/pkgconfig - >=sys-devel/autoconf-2.65 - !sys-devel/gcc[libffi(-)]" -RDEPEND+=" !build? ( app-misc/mime-types ) - doc? ( dev-python/python-docs:${SLOT} )" -PDEPEND=">=app-eselect/eselect-python-20140125-r1" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - if use berkdb; then - ewarn "'bsddb' module is out-of-date and no longer maintained inside" - ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" - ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" - ewarn "is provided by dev-python/bsddb3." - else - if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then - ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" - ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." - ewarn "You might need to migrate your databases." - fi - fi -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -r Modules/expat || die - rm -r Modules/_ctypes/libffi* || die - rm -r Modules/zlib || die - - if tc-is-cross-compiler; then - local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" - - # Fix for cross-compiling. - epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" - epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch" - epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch" - epatch "${FILESDIR}/python-2.7.10-system-libffi.patch" - epatch "${FILESDIR}/2.7.15-disable-nis.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 \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - eautoreconf -} - -src_configure() { - # dbm module can be linked against berkdb or gdbm. - # Defaults to gdbm when both are enabled, #204343. - local disable - use berkdb || use gdbm || disable+=" dbm" - use berkdb || disable+=" _bsddb" - # disable automagic bluetooth headers detection - use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - # Force some tests that try to poke fs paths. - export ac_cv_file__dev_ptc=no - export ac_cv_file__dev_ptmx=yes - fi - - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. - tc-export CXX - # The configure script fails to use pkg-config correctly. - # http://bugs.python.org/issue15506 - export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) - - # Set LDFLAGS so we link modules with -lpython2.7 correctly. - # Needed on FreeBSD unless Python 2.7 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - local dbmliborder - if use gdbm; then - dbmliborder+="${dbmliborder:+:}gdbm" - fi - if use berkdb; then - dbmliborder+="${dbmliborder:+:}bdb" - fi - - 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) \ - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-computed-gotos \ - --with-dbmliborder="${dbmliborder}" \ - --with-libc="" \ - --enable-loadable-sqlite-extensions \ - --with-system-expat \ - --with-system-ffi \ - --without-ensurepip - - if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then - eerror "configure has detected that the sem_open function is broken." - eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." - die "Broken sem_open function (bug 496328)" - fi -} - -src_compile() { - # Avoid invoking pgen for cross-compiles. - touch Include/graminit.h Python/graminit.c - - cd "${BUILD_DIR}" || die - emake - - # Work around bug 329499. See also bug 413751 and 457194. - if has_version dev-libs/libffi[pax_kernel]; then - pax-mark E python - else - pax-mark m python - fi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - cd "${BUILD_DIR}" || die - - # Skip failing tests. - local skipped_tests="distutils gdb" - - for test in ${skipped_tests}; do - mv "${S}"/Lib/test/test_${test}.py "${T}" - done - - # Daylight saving time problem - # https://bugs.python.org/issue22067 - # https://bugs.gentoo.org/610628 - local -x TZ=UTC - - # Rerun failed tests in verbose mode (regrtest -w). - emake test EXTRATESTOPTS="-w" < /dev/tty - local result="$?" - - for test in ${skipped_tests}; do - mv "${T}/test_${test}.py" "${S}"/Lib/test - done - - elog "The following tests have been skipped:" - for test in ${skipped_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" - elog "and run the tests separately." - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} - - cd "${BUILD_DIR}" || die - emake DESTDIR="${D}" altinstall - - sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" - - # Fix collisions between different slots of Python. - mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" - mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" - mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" - rm -f "${ED}usr/bin/smtpd.py" - - use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die - use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die - use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die - use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} - - use threads || rm -r "${libdir}/multiprocessing" || die - use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die - - dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}"/Tools - fi - insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 - local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ - emake --no-print-directory -s -f - 2>/dev/null) - newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} - sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" - - # for python-exec - local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) - - # if not using a cross-compiler, use the fresh binary - if ! tc-is-cross-compiler; then - local -x PYTHON=./python - local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD} - else - vars=( PYTHON "${vars[@]}" ) - fi - - python_export "python${SLOT}" "${vars[@]}" - echo "EPYTHON='${EPYTHON}'" > epython.py || die - python_domodule epython.py - - # python-exec wrapping support - local pymajor=${SLOT%.*} - mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die - # python and pythonX - ln -s "../../../bin/python${SLOT}" \ - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die - ln -s "python${pymajor}" \ - "${D}${PYTHON_SCRIPTDIR}/python" || die - # python-config and pythonX-config - ln -s "../../../bin/python${SLOT}-config" \ - "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die - ln -s "python${pymajor}-config" \ - "${D}${PYTHON_SCRIPTDIR}/python-config" || die - # 2to3, pydoc, pyvenv - ln -s "../../../bin/2to3-${SLOT}" \ - "${D}${PYTHON_SCRIPTDIR}/2to3" || die - ln -s "../../../bin/pydoc${SLOT}" \ - "${D}${PYTHON_SCRIPTDIR}/pydoc" || die - # idle - if use tk; then - ln -s "../../../bin/idle${SLOT}" \ - "${D}${PYTHON_SCRIPTDIR}/idle" || die - fi -} - -eselect_python_update() { - if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then - eselect python update - fi - - if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then - eselect python update --python${PV%%.*} - fi -} - -pkg_postinst() { - eselect_python_update -} - -pkg_postrm() { - eselect_python_update -} |