/[gentoo-x86]/eclass/twisted.eclass
Gentoo

Diff of /eclass/twisted.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 Revision 1.6
1# Copyright 2005 Gentoo Foundation 1# Copyright 2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License, v2 or later 2# Distributed under the terms of the GNU General Public License, v2 or later
3# $Header: /var/cvsroot/gentoo-x86/eclass/twisted.eclass,v 1.5 2006/05/16 16:52:49 marienz Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/twisted.eclass,v 1.6 2006/05/29 18:46:08 marienz Exp $
4# 4#
5# Author: Marien Zwart <marienz@gentoo.org> 5# Author: Marien Zwart <marienz@gentoo.org>
6# 6#
7# eclass to aid installing and testing twisted packages. 7# eclass to aid installing and testing twisted packages.
8# 8#
9# you should set MY_PACKAGE to something like 'Names' before inheriting. 9# you should set MY_PACKAGE to something like 'Names' before inheriting.
10# you may set MY_PV to the right version (defaults to PV). 10# you may set MY_PV to the right version (defaults to PV).
11#
12# twisted_src_test relies on the package installing twisted.names to
13# have a ${PN} of twisted-names.
11 14
12inherit distutils versionator eutils 15inherit distutils versionator eutils
13 16
14MY_PV=${MY_PV:-${PV}} 17MY_PV=${MY_PV:-${PV}}
15MY_VERSION=$(get_version_component_range 1-2 ${MY_PV}) 18MY_VERSION=$(get_version_component_range 1-2 ${MY_PV})
31 # filesystem. We copy the twisted site-packages to a temporary 34 # filesystem. We copy the twisted site-packages to a temporary
32 # dir, install there, and run from there. 35 # dir, install there, and run from there.
33 local spath="usr/$(get_libdir)/python${PYVER}/site-packages/" 36 local spath="usr/$(get_libdir)/python${PYVER}/site-packages/"
34 mkdir -p "${T}/${spath}" 37 mkdir -p "${T}/${spath}"
35 cp -R "${ROOT}${spath}/twisted" "${T}/${spath}" || die 38 cp -R "${ROOT}${spath}/twisted" "${T}/${spath}" || die
39
40 # We have to get rid of the existing version of this package
41 # instead of just installing on top of it, since if the existing
42 # package has tests in files the version we are installing does
43 # not have we end up running fex twisted-names-0.3.0 tests when
44 # downgrading to twisted-names-0.1.0-r1.
45 rm -rf "${T}/${spath}/${PN/-//}"
46
36 if has_version ">=dev-lang/python-2.3"; then 47 if has_version ">=dev-lang/python-2.3"; then
37 "${python}" setup.py install --root="${T}" --no-compile --force \ 48 "${python}" setup.py install --root="${T}" --no-compile --force \
38 --install-lib="${spath}" || die 49 --install-lib="${spath}" || die
39 else 50 else
40 "${python}" setup.py install --root="${T}" --force \ 51 "${python}" setup.py install --root="${T}" --force \

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20