public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] New eclass: twisted-r1
@ 2013-07-26 17:02 yac
  0 siblings, 0 replies; only message in thread
From: yac @ 2013-07-26 17:02 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 458 bytes --]

Hi,

I'm sending revised twisted-r1.eclass including the ebuild bumps.

You can view the diff either in the included patch or at github [1]

I have tested on amd64 and x86. All packages emerge and tests are
passing, besides nevow, axiom, and mantissa which are failing anyway
with the old eclass too.

Will commit tomorrow if there are no disputers.

[1] 
https://github.com/yaccz/gentoo-overlay/commit/1288b7989a156d3e9c3b6b1a0f079c33c9dffc10

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: twisted-r1.patch --]
[-- Type: text/x-patch, Size: 36292 bytes --]

commit 1288b7989a156d3e9c3b6b1a0f079c33c9dffc10
Author: Jan (yac) Matějka <JMatejka@suse.cz>
Date:   Mon Jul 8 13:57:23 2013 +0200

    eapi 5/twisted-r1 bumps
    
    * elcass
    * twisted-* ebuilds
    * twisted depender ebuilds

diff --git a/dev-python/axiom/axiom-0.6.0-r1.ebuild b/dev-python/axiom/axiom-0.6.0-r1.ebuild
index 7291292..8e88ccb 100644
--- a/dev-python/axiom/axiom-0.6.0-r1.ebuild
+++ b/dev-python/axiom/axiom-0.6.0-r1.ebuild
@@ -2,17 +2,11 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/axiom/axiom-0.6.0.ebuild,v 1.14 2013/05/12 18:32:59 floppym Exp $
 
-EAPI="3"
-PYTHON_DEPEND="2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.5 3.* *-jython"
-PYTHON_USE_WITH="sqlite"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+PYTHON_REQ_USE="sqlite"
 
-# setup.py uses epsilon.setuphelper.autosetup(), which tries to use
-# build-${PYTHON_ABI} directories as packages.
-DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
-
-inherit eutils twisted
+inherit eutils twisted-r1
 
 MY_PN="Axiom"
 MY_P="${MY_PN}-${PV}"
@@ -23,35 +17,24 @@ SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="amd64 ppc ppc64 sparc x86"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
 IUSE=""
 
-DEPEND=">=dev-python/epsilon-0.6
-	>=dev-python/twisted-2.4
-	>=dev-python/twisted-conch-0.7.0-r1"
+DEPEND=">=dev-python/epsilon-0.6.0-r2[${PYTHON_USEDEP}]
+	dev-python/twisted[${PYTHON_USEDEP}]
+	dev-python/twisted-conch[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}"
 
-DOCS="NAME.txt"
-PYTHON_MODNAME="axiom twisted/plugins/axiom_plugins.py"
-TWISTED_PLUGINS="axiom.plugins twisted.plugins"
-
-src_prepare() {
-	epatch "${FILESDIR}/${PN}-0.5.30-sqlite3.patch"
-	epatch "${FILESDIR}/${PN}-0.5.30-sqlite3_3.6.4.patch"
-	python_copy_sources
-}
-
-src_compile() {
-	# Skip distutils_src_compile to avoid installation of $(python_get_sitedir)/build directory.
-	:
-}
+DOCS=( "NAME.txt" )
+PATCHES=(
+	"${FILESDIR}/${PN}-0.5.30-sqlite3.patch"
+	"${FILESDIR}/${PN}-0.5.30-sqlite3_3.6.4.patch"
+)
 
-src_test() {
-	python_execute_trial -P . axiom
-}
+TWISTED_PLUGINS="axiom.plugins twisted.plugins"
 
-src_install() {
-	PORTAGE_PLUGINCACHE_NOOP="1" distutils_src_install
+python_test() {
+	trial -P . axiom || die "tests failed with $EPYTHON"
 }
diff --git a/dev-python/epsilon/epsilon-0.6.0-r2.ebuild b/dev-python/epsilon/epsilon-0.6.0-r2.ebuild
index cc893ad..9462af6 100644
--- a/dev-python/epsilon/epsilon-0.6.0-r2.ebuild
+++ b/dev-python/epsilon/epsilon-0.6.0-r2.ebuild
@@ -2,18 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/epsilon/epsilon-0.6.0-r1.ebuild,v 1.2 2012/10/12 08:15:00 patrick Exp $
 
-EAPI="3"
-PYTHON_DEPEND="2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.5 3.* *-jython"
-DISTUTILS_SRC_TEST="trial"
-DISTUTILS_DISABLE_TEST_DEPENDENCY="1"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
 
-# setup.py uses epsilon.setuphelper.autosetup(), which tries to use
-# build-${PYTHON_ABI} directories as packages.
-DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
-
-inherit eutils twisted
+inherit eutils twisted-r1
 
 MY_PN="Epsilon"
 MY_P="${MY_PN}-${PV}"
@@ -27,14 +19,15 @@ SLOT="0"
 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
 IUSE=""
 
-DEPEND=">=dev-python/twisted-2.4"
+DEPEND="dev-python/twisted[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}"
 
-DOCS="NAME.txt NEWS.txt"
+DOCS=( "NAME.txt" "NEWS.txt" )
+PATCHES=( "${FILESDIR}/epsilon_plugincache_portagesandbox.patch" )
 
-src_prepare() {
+python_prepare_all() {
 	# Rename to avoid file-collisions
 	mv bin/benchmark bin/epsilon-benchmark
 	sed -i \
@@ -42,27 +35,16 @@ src_prepare() {
 		setup.py || die "sed failed"
 	# otherwise we get sandbox violations as it wants to update
 	# the plugin cache
-	epatch "${FILESDIR}/epsilon_plugincache_portagesandbox.patch"
 
 	#These test are removed upstream
 	rm -f epsilon/test/test_sslverify.py epsilon/sslverify.py || die
 	#See bug 357157 comment 5 for Ian Delaney's explanation of this fix
 	sed -e 's:month) 2004 9:month) 2004 14:' \
 		-i epsilon/test/test_extime.py || die
-	#These are broken too
-	rm -f epsilon/test/test_release.py epsilon/release.py || die
-
-	python_copy_sources
-}
-
-src_compile() {
-	# Skip distutils_src_compile to avoid installation of $(python_get_sitedir)/build directory.
-	:
-}
-
-src_test() {
 	# Release tests need DivmodCombinator.
-	rm -f epsilon/test/test_release.py* epsilon/release.py
+	rm -f epsilon/test/test_release.py* epsilon/release.py || die
+}
 
-	distutils_src_test
+python_test() {
+	trial epsilon || die "tests failed with $EPYTHON"
 }
diff --git a/dev-python/mantissa/mantissa-0.7.0-r1.ebuild b/dev-python/mantissa/mantissa-0.7.0-r1.ebuild
index c1df9db..a22ce16 100644
--- a/dev-python/mantissa/mantissa-0.7.0-r1.ebuild
+++ b/dev-python/mantissa/mantissa-0.7.0-r1.ebuild
@@ -2,18 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/mantissa/mantissa-0.7.0.ebuild,v 1.8 2013/06/09 17:19:35 floppym Exp $
 
-EAPI="3"
-PYTHON_DEPEND="2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.5 3.* *-jython"
-DISTUTILS_SRC_TEST="trial xmantissa"
-DISTUTILS_DISABLE_TEST_DEPENDENCY="1"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
 
-# setup.py uses epsilon.setuphelper.autosetup(), which tries to use
-# build-${PYTHON_ABI} directories as packages.
-DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
-
-inherit twisted
+inherit twisted-r1
 
 MY_PN="Mantissa"
 MY_P="${MY_PN}-${PV}"
@@ -27,31 +19,21 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE=""
 
-DEPEND=">=dev-python/axiom-0.5.7
-	>=dev-python/cssutils-0.9.5.1
-	virtual/python-imaging
-	>=dev-python/nevow-0.9.5
-	>=dev-python/pytz-2005m
-	>=dev-python/twisted-8.0.1
-	dev-python/twisted-mail
-	>=dev-python/vertex-0.2.0"
+DEPEND=">=dev-python/axiom-0.6.0-r1[${PYTHON_USEDEP}]
+	>=dev-python/cssutils-0.9.10-r1[${PYTHON_USEDEP}]
+	virtual/python-imaging[${PYTHON_USEDEP}]
+	>=dev-python/nevow-0.10.0-r1[${PYTHON_USEDEP}]
+	>=dev-python/pytz-2012j[${PYTHON_USEDEP}]
+	dev-python/twisted[${PYTHON_USEDEP}]
+	dev-python/twisted-mail[${PYTHON_USEDEP}]
+	>=dev-python/vertex-0.3.0-r1[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}"
 
-DOCS="NAME.txt NEWS.txt"
-PYTHON_MODNAME="axiom/plugins nevow/plugins/mantissa_package.py xmantissa"
+DOCS=( "NAME.txt" "NEWS.txt" )
 TWISTED_PLUGINS="axiom.plugins nevow.plugins xmantissa.plugins"
 
-src_compile() {
-	# Skip distutils_src_compile to avoid installation of $(python_get_sitedir)/build directory.
-	:
-}
-
-src_test() {
-	TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1" distutils_src_test
-}
-
-src_install() {
-	PORTAGE_PLUGINCACHE_NOOP="1" distutils_src_install
+python_test() {
+	trial xmantissa || die "tests failed with $EPYTHON"
 }
diff --git a/dev-python/nevow/nevow-0.10.0-r1.ebuild b/dev-python/nevow/nevow-0.10.0-r1.ebuild
index aa2c6de..6a298f3 100644
--- a/dev-python/nevow/nevow-0.10.0-r1.ebuild
+++ b/dev-python/nevow/nevow-0.10.0-r1.ebuild
@@ -2,14 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/nevow/nevow-0.10.0.ebuild,v 1.13 2012/10/12 08:16:28 patrick Exp $
 
-EAPI="3"
-PYTHON_DEPEND="2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.5 3.* *-jython"
-DISTUTILS_SRC_TEST="trial formless nevow"
-DISTUTILS_DISABLE_TEST_DEPENDENCY="1"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
 
-inherit twisted
+inherit twisted-r1
 
 MY_PN="Nevow"
 MY_P="${MY_PN}-${PV}"
@@ -20,25 +16,24 @@ SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-linux"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-linux"
 IUSE="doc"
 
-DEPEND=">=dev-python/twisted-2.5
-	>=dev-python/twisted-web-8.1.0
-	net-zope/zope-interface"
+DEPEND="dev-python/twisted[${PYTHON_USEDEP}]
+	dev-python/twisted-web[${PYTHON_USEDEP}]
+	net-zope/zope-interface[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}"
 
-PYTHON_MODNAME="formless nevow"
 TWISTED_PLUGINS="nevow.plugins"
 
-src_test() {
-	TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1" distutils_src_test
+python_test() {
+	trial formless nevow || die "tests failed with $EPYTHON"
 }
 
-src_install() {
-	distutils_src_install
+python_install_all() {
+	distutils-r1_python_install_all
 
 	doman doc/man/nevow-xmlgettext.1
 	if use doc; then
diff --git a/dev-python/twisted-conch/twisted-conch-13.0.0-r1.ebuild b/dev-python/twisted-conch/twisted-conch-13.0.0-r1.ebuild
index 0286f96..b5f3b43 100644
--- a/dev-python/twisted-conch/twisted-conch-13.0.0-r1.ebuild
+++ b/dev-python/twisted-conch/twisted-conch-13.0.0-r1.ebuild
@@ -2,28 +2,29 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-conch/twisted-conch-13.0.0.ebuild,v 1.1 2013/04/08 06:42:36 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 2.7-pypy-*"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Conch"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="Twisted SSHv2 implementation"
 
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
 IUSE=""
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*
-	dev-python/pyasn1
-	dev-python/pycrypto"
+DEPEND="
+	=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+	dev-python/pyasn1[${PYTHON_USEDEP}]
+	dev-python/pycrypto[${PYTHON_USEDEP}]
+"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/conch twisted/plugins"
 
-src_prepare() {
-	distutils_src_prepare
+python_prepare_all() {
+	distutils-r1_python_prepare_all
 
 	if [[ "${EUID}" -eq 0 ]]; then
 		# Disable tests failing with root permissions.
@@ -31,3 +32,7 @@ src_prepare() {
 		sed -e "s/test_getPrivateKeysAsRoot/_&/" -i twisted/conch/test/test_openssh_compat.py
 	fi
 }
+
+python_test() {
+	twisted-r1_twisted_test
+}
diff --git a/dev-python/twisted-lore/twisted-lore-13.0.0-r1.ebuild b/dev-python/twisted-lore/twisted-lore-13.0.0-r1.ebuild
index 33024a0..dd61c16 100644
--- a/dev-python/twisted-lore/twisted-lore-13.0.0-r1.ebuild
+++ b/dev-python/twisted-lore/twisted-lore-13.0.0-r1.ebuild
@@ -2,21 +2,24 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-lore/twisted-lore-13.0.0.ebuild,v 1.1 2013/04/08 06:44:56 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Lore"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="Twisted documentation system"
 
 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
 IUSE=""
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*
-	=dev-python/twisted-web-$(get_version_component_range 1-2)*"
+DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+	=dev-python/twisted-web-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/lore twisted/plugins"
+
+python_test() {
+	twisted-r1_twisted_test
+}
diff --git a/dev-python/twisted-mail/twisted-mail-13.0.0-r1.ebuild b/dev-python/twisted-mail/twisted-mail-13.0.0-r1.ebuild
index f0c7abc..1fef86d 100644
--- a/dev-python/twisted-mail/twisted-mail-13.0.0-r1.ebuild
+++ b/dev-python/twisted-mail/twisted-mail-13.0.0-r1.ebuild
@@ -2,21 +2,24 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-mail/twisted-mail-13.0.0.ebuild,v 1.1 2013/04/08 06:47:18 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Mail"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="A Twisted Mail library, server and client"
 
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE=""
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*
-	=dev-python/twisted-names-$(get_version_component_range 1-2)*"
+DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+	=dev-python/twisted-names-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/mail twisted/plugins"
+
+python_test() {
+	twisted-r1_twisted_test
+}
diff --git a/dev-python/twisted-names/twisted-names-13.0.0-r1.ebuild b/dev-python/twisted-names/twisted-names-13.0.0-r1.ebuild
index 64fd0e0..8803a64 100644
--- a/dev-python/twisted-names/twisted-names-13.0.0-r1.ebuild
+++ b/dev-python/twisted-names/twisted-names-13.0.0-r1.ebuild
@@ -2,20 +2,23 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-names/twisted-names-13.0.0.ebuild,v 1.1 2013/04/08 06:49:39 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Names"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="A Twisted DNS implementation"
 
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE=""
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*"
+DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/names twisted/plugins"
+
+python_test() {
+	twisted-r1_twisted_test
+}
diff --git a/dev-python/twisted-news/twisted-news-13.0.0-r1.ebuild b/dev-python/twisted-news/twisted-news-13.0.0-r1.ebuild
index 80f0c6a..2ae17f8 100644
--- a/dev-python/twisted-news/twisted-news-13.0.0-r1.ebuild
+++ b/dev-python/twisted-news/twisted-news-13.0.0-r1.ebuild
@@ -2,21 +2,24 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-news/twisted-news-13.0.0.ebuild,v 1.1 2013/04/08 06:52:00 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="News"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="Twisted News is an NNTP server and programming library."
 
 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
 IUSE=""
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*
-	=dev-python/twisted-mail-$(get_version_component_range 1-2)*"
+DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+	=dev-python/twisted-mail-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/news twisted/plugins"
+
+python_test() {
+	twisted-r1_twisted_test
+}
diff --git a/dev-python/twisted-pair/twisted-pair-13.0.0-r1.ebuild b/dev-python/twisted-pair/twisted-pair-13.0.0-r1.ebuild
index 94973f3..0904e5a 100644
--- a/dev-python/twisted-pair/twisted-pair-13.0.0-r1.ebuild
+++ b/dev-python/twisted-pair/twisted-pair-13.0.0-r1.ebuild
@@ -2,21 +2,24 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-pair/twisted-pair-13.0.0.ebuild,v 1.1 2013/04/08 06:54:16 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Pair"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="Twisted low-level networking"
 
 KEYWORDS="~amd64 ~x86"
 IUSE=""
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*
-	dev-python/eunuchs"
+DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+	dev-python/eunuchs[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/pair"
+
+python_test() {
+	twisted-r1_twisted_test
+}
diff --git a/dev-python/twisted-runner/twisted-runner-13.0.0-r1.ebuild b/dev-python/twisted-runner/twisted-runner-13.0.0-r1.ebuild
index 9404773..9062809 100644
--- a/dev-python/twisted-runner/twisted-runner-13.0.0-r1.ebuild
+++ b/dev-python/twisted-runner/twisted-runner-13.0.0-r1.ebuild
@@ -2,25 +2,23 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-runner/twisted-runner-13.0.0.ebuild,v 1.1 2013/04/08 06:56:42 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Runner"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="Twisted Runner is a process management library and inetd replacement."
 
 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
 IUSE=""
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*"
+DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/runner"
 
-src_install() {
-	twisted_src_install
-	python_clean_installation_image
+python_test() {
+	twisted-r1_twisted_test
 }
diff --git a/dev-python/twisted-web/twisted-web-13.0.0-r1.ebuild b/dev-python/twisted-web/twisted-web-13.0.0-r1.ebuild
index 5d31dc8..0da2d7a 100644
--- a/dev-python/twisted-web/twisted-web-13.0.0-r1.ebuild
+++ b/dev-python/twisted-web/twisted-web-13.0.0-r1.ebuild
@@ -2,27 +2,26 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-web/twisted-web-13.0.0.ebuild,v 1.1 2013/04/08 06:59:05 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Web"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="Twisted web server, programmable in Python"
 
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE="soap"
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*
-	soap? ( dev-python/soappy )"
+DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+	soap? ( dev-python/soappy[${PYTHON_USEDEP}] )"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/plugins twisted/web"
 
-src_prepare() {
-	distutils_src_prepare
+python_prepare_all() {
+	distutils-r1_python_prepare_all
 
 	if [[ "${EUID}" -eq 0 ]]; then
 		# Disable tests failing with root permissions.
@@ -30,3 +29,7 @@ src_prepare() {
 		sed -e "s/testDownloadPageError3/_&/" -i twisted/web/test/test_webclient.py
 	fi
 }
+
+python_test() {
+	twisted-r1_twisted_test
+}
diff --git a/dev-python/twisted-words/twisted-words-13.0.0-r1.ebuild b/dev-python/twisted-words/twisted-words-13.0.0-r1.ebuild
index fd13914..65b1e40 100644
--- a/dev-python/twisted-words/twisted-words-13.0.0-r1.ebuild
+++ b/dev-python/twisted-words/twisted-words-13.0.0-r1.ebuild
@@ -2,21 +2,24 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted-words/twisted-words-13.0.0.ebuild,v 1.1 2013/04/08 07:01:27 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* 2.5 *-jython"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Words"
 
-inherit twisted versionator
+inherit twisted-r1 versionator
 
 DESCRIPTION="Twisted Words contains Instant Messaging implementations."
 
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
 IUSE=""
 
-DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*
-	=dev-python/twisted-web-$(get_version_component_range 1-2)*"
+DEPEND="=dev-python/twisted-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]
+	=dev-python/twisted-web-$(get_version_component_range 1-2)*[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 PYTHON_MODNAME="twisted/plugins twisted/words"
+
+python_test() {
+	twisted-r1_twisted_test
+}
diff --git a/dev-python/twisted/twisted-13.0.0-r1.ebuild b/dev-python/twisted/twisted-13.0.0-r1.ebuild
index d49a3ad..768dfbe 100644
--- a/dev-python/twisted/twisted-13.0.0-r1.ebuild
+++ b/dev-python/twisted/twisted-13.0.0-r1.ebuild
@@ -2,16 +2,12 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/twisted/twisted-13.0.0.ebuild,v 1.1 2013/04/08 06:40:09 patrick Exp $
 
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.5 3.* *-jython"
-# A couple of failures (refcounting, version-checking), but sufficiently
-# functional to be useful, so restrict just the tests.
-PYTHON_TESTS_RESTRICTED_ABIS="*-pypy-*"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
+
 MY_PACKAGE="Core"
 
-inherit eutils twisted versionator
+inherit eutils twisted-r1
 
 DESCRIPTION="An asynchronous networking framework written in Python"
 
@@ -20,30 +16,31 @@ SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE="crypt gtk serial"
 
-DEPEND="net-zope/zope-interface
-	crypt? ( >=dev-python/pyopenssl-0.10 )
-	gtk? ( dev-python/pygtk:2 )
-	serial? ( dev-python/pyserial )"
+DEPEND="net-zope/zope-interface[${PYTHON_USEDEP}]
+	crypt? ( >=dev-python/pyopenssl-0.10[${PYTHON_USEDEP}] )
+	gtk? ( dev-python/pygtk:2[${PYTHON_USEDEP}] )
+	serial? ( dev-python/pyserial[${PYTHON_USEDEP}] )"
 RDEPEND="${DEPEND}"
 
 # Needed to make the sendmsg extension work
 # (see http://twistedmatrix.com/trac/ticket/5701 )
 PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
 
-DOCS="CREDITS NEWS README"
+DOCS=( CREDITS NEWS README )
+PATCHES=( )
 
-src_prepare(){
-	distutils_src_prepare
+# Give a load-sensitive test a better chance of succeeding.
+PATCHES+=( "${FILESDIR}/${PN}-2.1.0-echo-less.patch" )
 
-	# Give a load-sensitive test a better chance of succeeding.
-	epatch "${FILESDIR}/${PN}-2.1.0-echo-less.patch"
+# Skip a test if twisted conch is not available
+# (see Twisted ticket #5703)
+PATCHES+=( "${FILESDIR}/twisted-12.1.0-remove-tests-conch-dependency.patch" )
 
-	# Skip a test if twisted conch is not available
-	# (see Twisted ticket #5703)
-	epatch "${FILESDIR}/twisted-12.1.0-remove-tests-conch-dependency.patch"
+# Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable.
+PATCHES+=( "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch" )
 
-	# Respect TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE variable.
-	epatch "${FILESDIR}/${PN}-9.0.0-respect_TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE.patch"
+python_prepare_all() {
+	distutils-r1_python_prepare_all
 
 	if [[ "${EUID}" -eq 0 ]]; then
 		# Disable tests failing with root permissions.
@@ -54,57 +51,43 @@ src_prepare(){
 	fi
 }
 
-src_test() {
-	testing() {
-		local exit_status="0"
-		"$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install --root="${T}/tests-${PYTHON_ABI}" --no-compile || die "Installation of tests failed with $(python_get_implementation_and_version)"
-
-		pushd "${T}/tests-${PYTHON_ABI}${EPREFIX}$(python_get_sitedir)" > /dev/null || die
+python_test() {
+	# NOTE: on pypy a couple of failures (refcounting, version-checking) is
+	# expected
 
-		# Skip broken tests.
-		sed -e "s/test_buildAllTarballs/_&/" -i twisted/python/test/test_release.py || die "sed failed"
+	"${PYTHON}" setup.py build -b "build-${EPYTHON}" install --root="${T}/tests-${EPYTHON}" --no-compile || die "Installation of tests failed"
 
-		# http://twistedmatrix.com/trac/ticket/5375
-		sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py || die "sed failed"
+	pushd "${T}/tests-${EPYTHON}${EPREFIX}$(python_get_sitedir)" > /dev/null || die
 
-		# tap2rpm is already skipped if rpm is not installed, but fails for me on a Gentoo box with it present.
-		# I currently lack the cycles to track this failure down.
-		rm twisted/scripts/test/test_tap2rpm.py
+	# Skip broken tests.
+	sed -e "s/test_buildAllTarballs/_&/" -i twisted/python/test/test_release.py || die "sed failed"
 
-		# Prevent it from pulling in plugins from already installed twisted packages.
-		rm -f twisted/plugins/__init__.py
+	# http://twistedmatrix.com/trac/ticket/5375
+	sed -e "/class ZshIntegrationTestCase/,/^$/d" -i twisted/scripts/test/test_scripts.py || die "sed failed"
 
-		# An empty file doesn't work because the tests check for doc strings in all packages.
-		echo "'''plugins stub'''" > twisted/plugins/__init__.py || die
+	# tap2rpm is already skipped if rpm is not installed, but fails for me on a Gentoo box with it present.
+	# I currently lack the cycles to track this failure down.
+	rm twisted/scripts/test/test_tap2rpm.py
 
-		if ! PYTHONPATH="." "${T}/tests-${PYTHON_ABI}${EPREFIX}/usr/bin/trial" twisted; then
-			if [[ -n "${TWISTED_DEBUG_TESTS}" ]]; then
-				die "Tests failed with $(python_get_implementation_and_version)"
-			else
-				exit_status="1"
-			fi
-		fi
+	# Prevent it from pulling in plugins from already installed twisted packages.
+	rm -f twisted/plugins/__init__.py
 
-		popd > /dev/null || die
-		return "${exit_status}"
-	}
-	python_execute_function testing
-}
+	# An empty file doesn't work because the tests check for doc strings in all packages.
+	echo "'''plugins stub'''" > twisted/plugins/__init__.py || die
 
-src_install() {
-	distutils_src_install
-	python_clean_installation_image
+	if ! PYTHONPATH="." "${T}/tests-${EPYTHON}${EPREFIX}/usr/bin/trial" twisted; then
+		die "Tests failed with ${EPYTHON}"
+	fi
 
-	python_generate_wrapper_scripts -E -f -q "${ED}usr/bin/trial"
+	popd > /dev/null || die
+}
 
-	postinstallational_preparation() {
-		touch "${ED}$(python_get_sitedir)/Twisted-${PV}-py$(python_get_version).egg-info"
+python_install_all() {
+	distutils-r1_python_install_all
 
-		# Delete dropin.cache to avoid collisions.
-		# dropin.cache is regenerated in pkg_postinst().
-		rm -f "${ED}$(python_get_sitedir)/twisted/plugins/dropin.cache"
-	}
-	python_execute_function -q postinstallational_preparation
+	# Delete dropin.cache to avoid collisions.
+	# dropin.cache is regenerated in pkg_postinst().
+	rm -f "${ED}$(python_get_sitedir)/twisted/plugins/dropin.cache"
 
 	# Don't install index.xhtml page.
 	doman doc/man/*.?
diff --git a/dev-python/vertex/vertex-0.3.0-r1.ebuild b/dev-python/vertex/vertex-0.3.0-r1.ebuild
index 3127785..d9e599a 100644
--- a/dev-python/vertex/vertex-0.3.0-r1.ebuild
+++ b/dev-python/vertex/vertex-0.3.0-r1.ebuild
@@ -2,18 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-python/vertex/vertex-0.3.0.ebuild,v 1.7 2012/10/17 09:16:30 patrick Exp $
 
-EAPI="3"
-PYTHON_DEPEND="2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.5 3.* *-jython"
-DISTUTILS_SRC_TEST="trial"
-DISTUTILS_DISABLE_TEST_DEPENDENCY="1"
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} )
 
-# setup.py uses epsilon.setuphelper.autosetup(), which tries to use
-# build-${PYTHON_ABI} directories as packages.
-DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
-
-inherit distutils
+inherit distutils-r1
 
 MY_PN="Vertex"
 MY_P="${MY_PN}-${PV}"
@@ -27,17 +19,16 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE=""
 
-DEPEND=">=dev-libs/openssl-0.9.7
-	>=dev-python/epsilon-0.5.0
-	>=dev-python/pyopenssl-0.6
-	>=dev-python/twisted-2.4"
+DEPEND="dev-libs/openssl
+	>=dev-python/epsilon-0.6.0-r1[${PYTHON_USEDEP}]
+	>=dev-python/pyopenssl-0.13-r1[${PYTHON_USEDEP}]
+	dev-python/twisted[${PYTHON_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}"
 
-DOCS="NAME.txt README.txt"
+DOCS=( "NAME.txt" "README.txt" )
 
-src_compile() {
-	# Skip distutils_src_compile to avoid installation of $(python_get_sitedir)/build directory.
-	:
+python_test() {
+	trial vertex || die "tests failed with $EPYTHON"
 }
diff --git a/eclass/twisted-r1.eclass b/eclass/twisted-r1.eclass
index 4a8704e..b811376 100644
--- a/eclass/twisted-r1.eclass
+++ b/eclass/twisted-r1.eclass
@@ -2,30 +2,30 @@
 # Distributed under the terms of the GNU General Public License, v2 or later
 # $Header: /var/cvsroot/gentoo-x86/eclass/twisted.eclass,v 1.10 2011/12/27 06:54:23 floppym Exp $
 
-# @ECLASS: twisted.eclass
+# @ECLASS: twisted-r1.eclass
 # @MAINTAINER:
 # Gentoo Python Project <python@gentoo.org>
 # @BLURB: Eclass for Twisted packages
 # @DESCRIPTION:
 # The twisted eclass defines phase functions for Twisted packages.
 
-# The following variables can be set in dev-python/twisted* packages before inheriting this eclass:
+# The following variables can be set in dev-python/twisted* packages
+# before inheriting this eclass:
 #   MY_PACKAGE - Package name suffix (required)
 #   MY_PV      - Package version (optional)
 
-inherit distutils versionator
+inherit distutils-r1 versionator
 
 EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
 
 if [[ "${CATEGORY}/${PN}" == "dev-python/twisted"* ]]; then
-	EXPORT_FUNCTIONS src_test
-
 	MY_PV="${MY_PV:-${PV}}"
 	MY_P="Twisted${MY_PACKAGE}-${MY_PV}"
 
 	HOMEPAGE="http://www.twistedmatrix.com/"
-	#SRC_URI="http://tmrc.mit.edu/mirror/twisted/${MY_PACKAGE}/$(get_version_component_range 1-2 ${MY_PV})/${MY_P}.tar.bz2"
-	SRC_URI="http://twistedmatrix.com/Releases/${MY_PACKAGE}/$(get_version_component_range 1-2 ${MY_PV})/${MY_P}.tar.bz2"
+	SRC_URI="http://twistedmatrix.com/Releases/${MY_PACKAGE}"
+	SRC_URI="${SRC_URI}/$(get_version_component_range 1-2 ${MY_PV})"
+	SRC_URI="${SRC_URI}/${MY_P}.tar.bz2"
 
 	LICENSE="MIT"
 	SLOT="0"
@@ -38,35 +38,27 @@ fi
 
 # @ECLASS-VARIABLE: TWISTED_PLUGINS
 # @DESCRIPTION:
-# Twisted plugins, whose cache is regenerated in pkg_postinst() and pkg_postrm() phases.
-
-twisted_src_test() {
-	if [[ "${CATEGORY}/${PN}" != "dev-python/twisted"* ]]; then
-		die "${FUNCNAME}() can be used only in dev-python/twisted* packages"
-	fi
-
-	testing() {
-		local sitedir="${EPREFIX}$(python_get_sitedir)"
+# Twisted plugins, whose cache is regenerated in pkg_postinst() and
+# pkg_postrm() phases.
 
-		# Copy modules of other Twisted packages from site-packages directory to temporary directory.
-		mkdir -p "${T}/${sitedir}"
-		cp -R "${ROOT}${sitedir}/twisted" "${T}/${sitedir}" || die "Copying of modules of other Twisted packages failed with $(python_get_implementation) $(python_get_version)"
-		rm -fr "${T}/${sitedir}/${PN/-//}"
+twisted-r1_twisted_test() {
+	local sitedir="${EPREFIX}$(python_get_sitedir)"
 
-		# Install modules of current package to temporary directory.
-		"$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install --force --no-compile --root="${T}" || die "Installation into temporary directory failed with $(python_get_implementation) $(python_get_version)"
+	distutils_install_for_testing || \
+		die "install for testing failed $EPYTHON"
 
-		pushd "${T}/${sitedir}" > /dev/null || return 1
-		PATH="${T}${EPREFIX}/usr/bin:${PATH}" PYTHONPATH="${T}/${sitedir}" trial ${PN/-/.} || return 1
-		popd > /dev/null || return 1
+	# Copy modules of other Twisted packages from site-packages
+	# directory to temporary directory.
+	cp -r "${ROOT}${sitedir}/twisted" "${TEST_DIR}/lib" || \
+		die "Copying twisted modules failed with ${EPYTHON}"
 
-		rm -fr "${T}/${sitedir}"
-	}
-	python_execute_function testing
+	pushd ${TEST_DIR}/lib > /dev/null || \
+		die "pushd failed for $EPYTHON"
+	trial ${PN/-/.} || die "tests failed for $EPYTHON"
 }
 
-twisted_src_install() {
-	distutils_src_install
+twisted-r1_src_install() {
+	distutils-r1_src_install
 
 	if [[ -d doc/man ]]; then
 		doman doc/man/*.[[:digit:]]
@@ -78,21 +70,21 @@ twisted_src_install() {
 	fi
 }
 
-_twisted_update_plugin_cache() {
+_twisted-r1_update_plugin_cache() {
 	local dir exit_status="0" module
 
 	for module in ${TWISTED_PLUGINS}; do
-		if [[ -d "${EROOT}$(python_get_sitedir -b)/${module//.//}" ]]; then
-			find "${EROOT}$(python_get_sitedir -b)/${module//.//}" -name dropin.cache -print0 | xargs -0 rm -f
+		if [[ -d "${EROOT}$(python_get_sitedir)/${module//.//}" ]]; then
+			find "${EROOT}$(python_get_sitedir)/${module//.//}" \
+				-name dropin.cache -print0 | xargs -0 rm -f
 		fi
 	done
 
-	if [[ -n "$(type -p "$(PYTHON)")" ]]; then
-		for module in ${TWISTED_PLUGINS}; do
-			# http://twistedmatrix.com/documents/current/core/howto/plugin.html
-			"$(PYTHON)" -c \
+	for module in ${TWISTED_PLUGINS}; do
+		# http://twistedmatrix.com/documents/current/core/howto/plugin.html
+		"${PYTHON}" -c \
 "import sys
-sys.path.insert(0, '${EROOT}$(python_get_sitedir -b)')
+sys.path.insert(0, '${EROOT}$(python_get_sitedir)')
 
 try:
 	import twisted.plugin
@@ -101,16 +93,17 @@ except ImportError:
 	if '${EBUILD_PHASE}' == 'postinst':
 		raise
 	else:
-	    # Twisted, zope.interface or given plugins might have been uninstalled.
+		# Twisted, zope.interface or given plugins might have been
+		# uninstalled.
 		sys.exit(0)
 
-list(twisted.plugin.getPlugins(twisted.plugin.IPlugin, ${module}))" || exit_status="1"
-		done
-	fi
+list(twisted.plugin.getPlugins(twisted.plugin.IPlugin, ${module}))" \
+		|| exit_status="1"
+	done
 
 	for module in ${TWISTED_PLUGINS}; do
 		# Delete empty parent directories.
-		local dir="${EROOT}$(python_get_sitedir -b)/${module//.//}"
+		local dir="${EROOT}$(python_get_sitedir)/${module//.//}"
 		while [[ "${dir}" != "${EROOT%/}" ]]; do
 			rmdir "${dir}" 2> /dev/null || break
 			dir="${dir%/*}"
@@ -120,20 +113,10 @@ list(twisted.plugin.getPlugins(twisted.plugin.IPlugin, ${module}))" || exit_stat
 	return "${exit_status}"
 }
 
-twisted_pkg_postinst() {
-	distutils_pkg_postinst
-	python_execute_function \
-		--action-message 'Regeneration of Twisted plugin cache with $(python_get_implementation) $(python_get_version)' \
-		--failure-message 'Regeneration of Twisted plugin cache failed with $(python_get_implementation) $(python_get_version)' \
-		--nonfatal \
-		_twisted_update_plugin_cache
+twisted-r1_pkg_postinst() {
+	_distutils-r1_run_foreach_impl _twisted-r1_update_plugin_cache
 }
 
-twisted_pkg_postrm() {
-	distutils_pkg_postrm
-	python_execute_function \
-		--action-message 'Regeneration of Twisted plugin cache with $(python_get_implementation) $(python_get_version)' \
-		--failure-message 'Regeneration of Twisted plugin cache failed with $(python_get_implementation) $(python_get_version)' \
-		--nonfatal \
-		_twisted_update_plugin_cache
+twisted-r1_pkg_postrm() {
+	_distutils-r1_run_foreach_impl _twisted-r1_update_plugin_cache
 }

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-26 17:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26 17:02 [gentoo-dev] New eclass: twisted-r1 yac

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