summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2014-11-21 01:55:45 +0000
committerMike Gilbert <floppym@gentoo.org>2014-11-21 01:55:45 +0000
commit9c937c8284cdbe5b2a7ce12603559d0b9f51b9f3 (patch)
treed6e90592ca5e5ac9d0c3c270992fdeef7c949429 /eclass
parentRemove ebuilds using twisted.eclass. (diff)
downloadgentoo-2-9c937c8284cdbe5b2a7ce12603559d0b9f51b9f3.tar.gz
gentoo-2-9c937c8284cdbe5b2a7ce12603559d0b9f51b9f3.tar.bz2
gentoo-2-9c937c8284cdbe5b2a7ce12603559d0b9f51b9f3.zip
Remove unused eclass.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/twisted.eclass141
2 files changed, 4 insertions, 142 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 2c6b7ea66f3a..edc3b0cdc351 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1435 2014/11/21 01:21:44 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1436 2014/11/21 01:55:45 floppym Exp $
+
+ 21 Nov 2014; Mike Gilbert <floppym@gentoo.org> -twisted.eclass:
+ Remove unused eclass.
21 Nov 2014; Andreas K. Huettel <dilfridge@gentoo.org> perl-module.eclass:
Add usage warnings to pkg_postinst and pkg_postrm, deprecate pkg_prerm
diff --git a/eclass/twisted.eclass b/eclass/twisted.eclass
deleted file mode 100644
index b99d023fdc40..000000000000
--- a/eclass/twisted.eclass
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/eclass/twisted.eclass,v 1.11 2014/11/20 15:32:09 mgorny Exp $
-
-# @ECLASS: twisted.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:
-# MY_PACKAGE - Package name suffix (required)
-# MY_PV - Package version (optional)
-#
-# This eclass is DEPRECATED. Please use twisted-r1 instead.
-
-inherit distutils 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"
-
- LICENSE="MIT"
- SLOT="0"
- IUSE=""
-
- S="${WORKDIR}/${MY_P}"
-
- TWISTED_PLUGINS="${TWISTED_PLUGINS:-twisted.plugins}"
-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)"
-
- # 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/-//}"
-
- # 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)"
-
- 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
-
- rm -fr "${T}/${sitedir}"
- }
- python_execute_function testing
-}
-
-twisted_src_install() {
- distutils_src_install
-
- if [[ -d doc/man ]]; then
- doman doc/man/*.[[:digit:]]
- fi
-
- if [[ -d doc ]]; then
- insinto /usr/share/doc/${PF}
- doins -r $(find doc -mindepth 1 -maxdepth 1 -not -name man)
- fi
-}
-
-_twisted_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
- 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 \
-"import sys
-sys.path.insert(0, '${EROOT}$(python_get_sitedir -b)')
-
-try:
- import twisted.plugin
- import ${module}
-except ImportError:
- if '${EBUILD_PHASE}' == 'postinst':
- raise
- else:
- # 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
-
- for module in ${TWISTED_PLUGINS}; do
- # Delete empty parent directories.
- local dir="${EROOT}$(python_get_sitedir -b)/${module//.//}"
- while [[ "${dir}" != "${EROOT%/}" ]]; do
- rmdir "${dir}" 2> /dev/null || break
- dir="${dir%/*}"
- done
- done
-
- 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_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
-}