From f36988d89bc66eb2bb8149bd7a890703dfd81365 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 6 Nov 2015 23:16:25 +0100 Subject: [PATCH] dev-lang/python: Remove python-config-X.Y compatibility Remove the python-config-X.Y symlinks that were added as the Gentoo divergence compatibility. --- dev-lang/python/python-2.7.10-r3.ebuild | 346 ++++++++++++++++++++++++ dev-lang/python/python-3.3.5-r3.ebuild | 3 - dev-lang/python/python-3.4.3-r3.ebuild | 3 - dev-lang/python/python-3.5.0-r2.ebuild | 3 - profiles/package.mask | 2 + 5 files changed, 348 insertions(+), 9 deletions(-) create mode 100644 dev-lang/python/python-2.7.10-r3.ebuild diff --git a/dev-lang/python/python-2.7.10-r3.ebuild b/dev-lang/python/python-2.7.10-r3.ebuild new file mode 100644 index 000000000000..1fa586e66bd5 --- /dev/null +++ b/dev-lang/python/python-2.7.10-r3.ebuild @@ -0,0 +1,346 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" +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.10-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 + 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 ~sparc-fbsd ~x86-fbsd" +IUSE="-berkdb 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 + >=sys-libs/zlib-1.1.3 + virtual/libffi + virtual/libintl + xml? ( >=dev-libs/expat-2.1 ) + 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[berkdb] ) + ncurses? ( + >=sys-libs/ncurses-5.2 + readline? ( >=sys-libs/readline-4.1 ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3 ) + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + ) + tk? ( + >=dev-lang/tk-8.0 + dev-tcltk/blt + dev-tcltk/tix + ) + !!/dev/null) + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} + newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${SLOT}:" \ + -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" + + # for python-exec + python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR + + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local PYTHON=./python + 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}:2.7"; 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 +} diff --git a/dev-lang/python/python-3.3.5-r3.ebuild b/dev-lang/python/python-3.3.5-r3.ebuild index 7164d5a178ee..ef9879408bef 100644 --- a/dev-lang/python/python-3.3.5-r3.ebuild +++ b/dev-lang/python/python-3.3.5-r3.ebuild @@ -246,9 +246,6 @@ src_install() { -e "s/\(PY_LDFLAGS=\).*/\1/" \ -i "${libdir}/config-${SLOT}"*/Makefile || die "sed failed" - # Backwards compat with Gentoo divergence. - dosym python${SLOT}-config /usr/bin/python-config-${SLOT} - # Fix collisions between different slots of Python. rm -f "${ED}usr/$(get_libdir)/libpython3.so" diff --git a/dev-lang/python/python-3.4.3-r3.ebuild b/dev-lang/python/python-3.4.3-r3.ebuild index 53c39a05aadf..32ddf14aed1a 100644 --- a/dev-lang/python/python-3.4.3-r3.ebuild +++ b/dev-lang/python/python-3.4.3-r3.ebuild @@ -231,9 +231,6 @@ src_install() { -e "s/\(PY_LDFLAGS=\).*/\1/" \ -i "${libdir}/config-${SLOT}"*/Makefile || die "sed failed" - # Backwards compat with Gentoo divergence. - dosym python${SLOT}-config /usr/bin/python-config-${SLOT} - # Fix collisions between different slots of Python. rm -f "${ED}usr/$(get_libdir)/libpython3.so" diff --git a/dev-lang/python/python-3.5.0-r2.ebuild b/dev-lang/python/python-3.5.0-r2.ebuild index 34ac46e14394..4e541d502b63 100644 --- a/dev-lang/python/python-3.5.0-r2.ebuild +++ b/dev-lang/python/python-3.5.0-r2.ebuild @@ -237,9 +237,6 @@ src_install() { -e "s/\(PY_LDFLAGS=\).*/\1/" \ -i "${libdir}/config-${SLOT}"*/Makefile || die "sed failed" - # Backwards compat with Gentoo divergence. - dosym python${SLOT}-config /usr/bin/python-config-${SLOT} - # Fix collisions between different slots of Python. rm -f "${ED}usr/$(get_libdir)/libpython3.so" diff --git a/profiles/package.mask b/profiles/package.mask index f50214bbd7f9..d2483f6e2123 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -32,9 +32,11 @@ # Michał Górny (11 Nov 2015) # Cleaned up Python versions masked for testing: +# - python-config-X.Y compatibility removed, # - ABIFLAGS reintroduced for 3.3+. # Resulting API/ABI change can break reverse dependencies, especially # if upstream hardcodes paths or library names. +=dev-lang/python-2.7.10-r3 =dev-lang/python-3.3.5-r3 =dev-lang/python-3.4.3-r3 =dev-lang/python-3.5.0-r2 -- 2.26.2