summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2013-11-21 22:23:08 +0000
committerMike Gilbert <floppym@gentoo.org>2013-11-21 22:23:08 +0000
commit1a98d5c99e5eb3130c4dafb67cd9448d9d96a461 (patch)
tree157d75d873278461a7d3a91c09bf598d7dccc265 /dev-lang/python
parentAutomated update. (diff)
downloadhistorical-1a98d5c99e5eb3130c4dafb67cd9448d9d96a461.tar.gz
historical-1a98d5c99e5eb3130c4dafb67cd9448d9d96a461.tar.bz2
historical-1a98d5c99e5eb3130c4dafb67cd9448d9d96a461.zip
Version bump. Thanks to Arfrever for maintaining the patchset.
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0x0BBEEA1FEA4843A4
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/ChangeLog7
-rw-r--r--dev-lang/python/Manifest11
-rw-r--r--dev-lang/python/python-3.3.3.ebuild312
3 files changed, 325 insertions, 5 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog
index 47d6436bdb95..2cdb71f848c5 100644
--- a/dev-lang/python/ChangeLog
+++ b/dev-lang/python/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-lang/python
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.711 2013/10/26 15:11:20 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.712 2013/11/21 22:23:06 floppym Exp $
+
+*python-3.3.3 (21 Nov 2013)
+
+ 21 Nov 2013; Mike Gilbert <floppym@gentoo.org> +python-3.3.3.ebuild:
+ Version bump. Thanks to Arfrever for maintaining the patchset.
*python-2.7.5-r4 (26 Oct 2013)
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 9c07949ae324..644efe4e4d43 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -20,22 +20,25 @@ DIST Python-2.6.8.tar.bz2 11127915 SHA256 c34036718ee1f091736677f543bc7960861cf9
DIST Python-2.7.5.tar.xz 10252148 SHA256 f33c4cab167dc69e10962e1cebf1c0768e2d0e8575648130c20e6bda84551db1 SHA512 c4691199d770cc4130604cd801375967ae0bb8a39ef34e01a4c8ab58d1c23ae83a1b493305178c4317c5622a19857750d33ffc3f10075becd5766ae664c68ee1 WHIRLPOOL fc5d3762cd67214b30de8b43024f5952362c4c811f23837e43ac2a7747c5353cc49b8785e75edd760ea58420609cd67a9a7e94abd2ea8ab25b3271af6a85168d
DIST Python-3.2.5.tar.xz 9221624 SHA256 8ccb9645b9779fc4550055b2ebb21a724ab7a63dee45643286eb4f79b2f84116 SHA512 6e71d01695c7b1e74d9781e4ac40a8d1560cae659d5351d392fc685b84316568d93740a99d2ed878dd87d4ce1708d0474cb01c6bad7b3dab610c639f3255b09d WHIRLPOOL d5e5fae5e1d4110861e1e1dac00c9812abbbc37205e8ce3cd268535ab9f66e24038ab4778af8bb834fd472eaa0281730f1f2fabdf6dffc4f6b54ef32c1d75953
DIST Python-3.3.2.tar.xz 11847676 SHA256 745b32c4b810e36fa66346198dbc2e313524fd68888922b85005656825e64b43 SHA512 2855cfed63f2e68cdfc02dc526f68402e893baf95146ba8254619b5a8e3bfbc07a3b7f089efe2450dc1b0bb1328c229b66664bde8ebda10a1f19fc02232ba74d WHIRLPOOL c8ffaea4b130bcfd112966ee82fa6023e0c2bf263494a1c233d783855e7407e0d62adacabe3d816fe93baf5964f7cfc256aedf2919fd8e6b1e9b37a855855c2c
+DIST Python-3.3.3.tar.xz 12057744 SHA256 339275b30a1a3fef1589016bf6302c14e870f7a6fd2522bf87a6c2c6d383c685 SHA512 6acd905d2ae70a259de1d502c90ce9cc831b03cd32930d55bdce1f6dd4b2657c4bb8698e46f6558253338046c43ee842befa2d62e35eeb82b82659acbe6ea0aa WHIRLPOOL 680a88bc7ca312a71237350c06573d5ed6138d826613a6a8ad9e953181561966c9a9f64b176226a627175b8bb5d13755bb7cabe20ee9510ced5da14185e092a4
DIST python-gentoo-patches-2.6.8-0.tar.bz2 17608 SHA256 277dbeb19107d3244e58aee98f130ce98d03775e7d4074ff9e1577125c999c06 SHA512 2a988a81db888ce56e07d4591ab37b641e51f73f85c087ac0505dc2b703b1dd450ed36b2533e5e562935d2f5e17d581fbbcfd0b0dc4bee69c882f3442da29632 WHIRLPOOL 8ae0f01e1218ed758b9dfca9b4de6a9115c09db665a2831f9af7b8e3f9aa178c10d129104273b551b8a26e9ba575e3f8d3256d7622506a69d496935ce9d87685
DIST python-gentoo-patches-2.7.5-0.tar.xz 13848 SHA256 b84ff6a7669d639272cb2f94d4268d3be3af64903a380f4f60ab539e4a29b111 SHA512 9fec0ba9d958894861d4282ff9145f0387ad7fd3914a3689d148308f56158c1b397f0816c58383d2cf198f9a3b9bf321f2f441ec4aa91e4a503cd957b4a7fbd4 WHIRLPOOL 39d807453f6510f14db1b74f5dac1cd2c52d00be356d132c0f9229caeb8ba8bcbbbf32b05b3d3f6236e853b204ecb961e6b12cabacaadf5f515e93f00cda71d5
DIST python-gentoo-patches-3.2.5-0.tar.xz 13892 SHA256 ebbfacc81486493ce4c16a697e53d77e9dc5c9d700e86cf92ae93b5e3e03abee SHA512 6d09ef5ed583dedd587d4247c7d0e99daf20d7cadb7afbcf4d951931e3a574a82f1b9dbc4e4f93d3dc55773808452284f50dee2fbfb6b68aff5f1f53c1665359 WHIRLPOOL 55b1ba0a25612b3987af93e252dd2dbd71ff0f4ff0bcadda9ba0b11e19278acdb3fa91166a854dcbe3d27bb570a104ee63a3976111d6f608614f7b3d9f734f67
DIST python-gentoo-patches-3.3.2-2.tar.xz 12884 SHA256 a99b7dade4659dcba7ae8ae137dd163460416a1aee170db888f15132d93d5374 SHA512 3694fa15839d7d0b74179115ae2e9b87503c68c1cf2a43124b762b2f1f133cc6c89c57c2c5ee09c94afde13bf13689f34acd831a6498c6112d181581b1592a3b WHIRLPOOL f48a549323b2b5ec7fdcbf8c31625cb570b7a8fab3f504d87af91449f5cf64b3f7309f99fdb1d2825d57d6aa8ec063851afc78466ddd465a0374b77ba8b1c1ee
+DIST python-gentoo-patches-3.3.3-0.tar.xz 12992 SHA256 38b5c604416947fdd7d87ada2ccd3febf7407f00c1e67e6a99be8765f1b25c49 SHA512 d803b287c0f407c68dd766974296239419fb35441f1796081681f28d17b1f6c7e50e0aae807ad147469eb586db8fe486a013a166cb76e08f2b7a9ba39acb1760 WHIRLPOOL 09a9dbd1831c2e7022f4df27b57435dd1df7eace294e8fa069ce5fa5c1719f64ba9bcd8f27d614a8c13ee8605db37c7e75c13fa14885b76ce289667bf2871aaf
EBUILD python-2.6.8-r3.ebuild 11037 SHA256 24c963b0487a032ec2ff2be00eb9452764caa5a9dba3523e5f2eb8e7fa1d4ddb SHA512 147f89e3e5fffa4b5c0bff8ffa8360c68ca1890cb5c25d5c8d1dd33d96475ff40bbf10c851333484d75b0899a37bc4c9535342d970c87c3cf3ee5523ac45b88f WHIRLPOOL 7e1e4c72908d26979a70ef606ffcc3f1a9259f5ace15769dff7f45ed23d926c17e9c860d7393b819075a7b824b15c3f94ab904633724af673a820b3ccb5bdeaa
EBUILD python-2.7.5-r3.ebuild 10287 SHA256 7856e76d9cb0f840d5971ff73e924a79bbb08dbd9c68ece4f8b9f0a163241839 SHA512 00990b9adbaedbfed4525cf73e0c5f9766fe3b776762f2afeed4a1544bb63d19578878fab98e22f7517dae3606b7697982dbc3bf41267ecf9f213d28d99d1e1b WHIRLPOOL f9ee9fcfde3d51a06629db23bd8c93c66235b24b8f604270126b3e5d4315e573ebe0041f9f0627c43b771c88925f547b7c32ec22c7469d70ffe1aba8893cd4fc
EBUILD python-2.7.5-r4.ebuild 10348 SHA256 218e37afa65fbf9548bb69004a39760a46dc96074331f502960a853ac1dfb1e2 SHA512 c8ea12a8c14f4f89a187d5aee04668e10471da1278043f6271d7f5adafd724854ac472434315873731b7f163c3df5967171da1ba3b6e76f449e3af2238277174 WHIRLPOOL f5248cbc333acb0fe838b72ef8e1fc2ea615334f419b0a3c3a9025ea491b593470427bae8c00edd965634a30fd159d56c54038f0fc52791d5079e0eaa268f8f8
EBUILD python-3.2.5-r3.ebuild 10726 SHA256 596f9f976a76567ba7bbe0630f963960fe2d9ed2dea5d430ee2817eacf0cca1f SHA512 4a893a73e1d263087037c09aa37b2684a6c541a2858a0f51caa9bf6686065c522e21132f801124050fa148776b7b3fe7d4636f53d0a0eb3e44ffc176ad1c6314 WHIRLPOOL a4a4cc6a2b0e5f7836f3e8b187c7644101e77b6c3e48e7317e01aa8cfe02ced8df9210419f1be80b36c29314b28f1e82e2ef223f848308fec36e41dfc9173c13
EBUILD python-3.3.2-r2.ebuild 9177 SHA256 cecfb8d243272144aa99ade70d943d84f330aa03ba7809b1a3b8922abba0abba SHA512 bdacd70338cfb1b700a6c481affa2980ebe74b1ab4d563390eb3df0e5e202b9bbbb6309582c3cf2ac4a123a4b7ada69746c31132626568ba86edd928b49cfdc5 WHIRLPOOL e45c1a6f4fb35f745b945bca209c2bbdbab4fba7957825b61c5d80e01b76eeab54b14e9a13b07acc04aa35a53cb729cbdffe5c630ff1c322a7e82ef270c4b95b
-MISC ChangeLog 26369 SHA256 c6230dec688309888350a177b033f1a82e25ce50a819d39955aa13f814dc4cee SHA512 f48325ee3b4575ee3a84397de31f2a76f73128c864642bdf5fe4e862f168265c4f6e6b5cdfb9e6f35b46b95fff9ea66c3a3fb8037e23eaf7832b2b0c0279a5c7 WHIRLPOOL 79ca4f957d79092f8c734bd0e29881001834c511aea70329cc5f9a18411a25bff1e7eb8a29aef7df7cfcce157e248fde5d9d4347e351cc7cd6c481f0f53d363a
+EBUILD python-3.3.3.ebuild 9149 SHA256 456b6c8038c2d87591376596528491812fe20232f460f4b2385e1884626ddffa SHA512 26761d7c268507469a198c98619f37245cf353808620421ed884bb50418bc03b68865fe9b60f8584d787a20c1755bb4f4ae8bf2d44a0407f69b3d2eb39c57f04 WHIRLPOOL f78e623f634e1d0298a8444c3786e266fe76a5140e9f17d0ae0ac295f0703fe8772367f5ea976deb52d6ca34a0083426bf6774dcadacd420a4b5309654a7c24f
+MISC ChangeLog 26535 SHA256 0c9050864839bb89c129d90c0b4e277fdebd5004baaae48674b51ab82b796258 SHA512 7af95e1a6d787814c7801fa155130f914f58c4837728ad35217bfa5106242fbe9b3997c7b87dbc03d15e578061f78efc14100a8cee105c8c3953450924569712 WHIRLPOOL 53c901bcd30c148dd7564a0314cbe3ed232ab283bf1ad0e06eb1c170cdff245d44078cea1c3f995afea38f2ec8d6cb42e0a1675515c4a44307c89c5eaf3a7f43
MISC ChangeLog-2011 100599 SHA256 23129cb47321b2a6b1cb9323f1815d0cd11d6f30c3893908ed51575c270a0cc8 SHA512 4181ba9d965139ba58218da5b960c87b7a611b27606a1ab1ce1b4c3c9255b4e0e2947307cbfffc531f0f8b6b545ee11e083fcb29dc7b2b7ba31c6bb40b8ab128 WHIRLPOOL 4ceebb6a6ed58b906d3a7331795748ac6e4fe2e1401bcccae9024a8e81e2c444aebc5fec610398cfe6002354ad3b10487484598da5091867874727f07e239c56
MISC metadata.xml 661 SHA256 2c6c3407251f7ccd6501dee49494e539a9544f2fbae99a4373eefdf4e83e8908 SHA512 871989a29417ce20d95da950fa385f1a958139de7b1567beb9cda28a1217901243cd9d25235fe3c7b0e43a82176d72286e31e4e97310b26488d2a3252ef3a8a0 WHIRLPOOL b694b1b4270ba15640d04a3b0b26a08575ea4afc9be256717f7f3b1768d75da9f71ceca6afd2f69971906227d5ba42263d2df2fc9387441aa240222d39fd094e
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iF4EAREIAAYFAlJr25oACgkQC77qH+pIQ6RHsgEApj6P+LHivuTA3u4ekX9OZHcU
-RCTPa17N63od5YJEQmoA/i1V7dAerpJRjgfrD9IdnVlfuKPGFDBgriLZlleC44xJ
-=Igws
+iF4EAREIAAYFAlKOh8sACgkQC77qH+pIQ6QOCgD+OfBd6JWMGSjiTtCL4JO6xjA+
+H6pzpFMG2aRKsxqtqy0A/jTniv3BZ6+w+8bahA5VVtXIhJ4P4/YBKI+MVgZL6qLj
+=CFbM
-----END PGP SIGNATURE-----
diff --git a/dev-lang/python/python-3.3.3.ebuild b/dev-lang/python/python-3.3.3.ebuild
new file mode 100644
index 000000000000..51b4d2165143
--- /dev/null
+++ b/dev-lang/python/python-3.3.3.ebuild
@@ -0,0 +1,312 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.3.3.ebuild,v 1.1 2013/11/21 22:23:06 floppym Exp $
+
+EAPI="4"
+WANT_AUTOMAKE="none"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
+
+MY_P="Python-${PV}"
+PATCHSET_REVISION="0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz
+ mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.3"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk 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
+ app-arch/xz-utils
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ gdbm? ( sys-libs/gdbm[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2
+ readline? ( >=sys-libs/readline-4.1 )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3 )
+ ssl? ( dev-libs/openssl )
+ tk? (
+ >=dev-lang/tk-8.0
+ dev-tcltk/blt
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ )
+ !!<sys-apps/sandbox-2.6-r1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.65
+ !sys-devel/gcc[libffi]"
+RDEPEND+=" !build? ( app-misc/mime-types )
+ doc? ( dev-python/python-docs:${SLOT} )"
+PDEPEND="app-admin/eselect-python
+ app-admin/python-updater"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ if tc-is-cross-compiler; then
+ # Invokes BUILDPYTHON, which is built for the host arch
+ local EPATCH_EXCLUDE="05_all_regenerate_platform-specific_modules.patch"
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ # Disable ABI flags.
+ sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
+
+ epatch_user
+
+ eautoconf
+ eautoheader
+}
+
+src_configure() {
+ if use build; then
+ # Disable extraneous modules with extra dependencies.
+ export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ local disable
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # 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
+}
+
+src_compile() {
+ # Avoid invoking pgen for cross-compiles.
+ touch Include/graminit.h Python/graminit.c || die
+
+ cd "${BUILD_DIR}" || die
+ emake CPPFLAGS="" CFLAGS="" LDFLAGS="" || die "emake failed"
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${BUILD_DIR}" || die
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty
+ local result="$?"
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${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 || die "emake altinstall failed"
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
+
+ # Backwards compat with Gentoo divergence.
+ dosym python${SLOT}-config /usr/bin/python-config-${SLOT} || die
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
+ else
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+ fi
+
+ use threads || rm -fr "${libdir}/multiprocessing"
+ use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed"
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
+ doins -r "${S}"/Tools || die "doins failed"
+ 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} || die "newconfd failed"
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${SLOT}:" \
+ -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
+
+ # for python-exec
+ python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ fi
+
+ echo "EPYTHON='${EPYTHON}'" > epython.py
+ python_domodule epython.py
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ if [[ "${python_updater_warning}" == "1" ]]; then
+ ewarn "You have just upgraded from an older version of Python."
+ ewarn "You should switch active version of Python ${PV%%.*} and run"
+ ewarn "'python-updater [options]' to rebuild Python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}