/[gentoo-x86]/dev-python/testtools/testtools-0.9.15.ebuild
Gentoo

Contents of /dev-python/testtools/testtools-0.9.15.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Sat Jul 28 13:03:04 2012 UTC (2 years, 1 month ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +2 -2 lines
Keyword ~mips, bug #428356

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 floppym 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 blueness 1.9 # $Header: /var/cvsroot/gentoo-x86/dev-python/testtools/testtools-0.9.15.ebuild,v 1.8 2012/07/15 18:14:15 armin76 Exp $
4 floppym 1.1
5     EAPI="4"
6     SUPPORT_PYTHON_ABIS="1"
7     DISTUTILS_SRC_TEST="setup.py"
8     inherit distutils versionator
9    
10     SERIES="$(get_version_component_range 1-2)"
11    
12     DESCRIPTION="Extensions to the Python unittest library"
13     HOMEPAGE="https://launchpad.net/testtools http://pypi.python.org/pypi/testtools"
14     SRC_URI="http://launchpad.net/${PN}/${SERIES}/${PV}/+download/${P}.tar.gz"
15    
16     LICENSE="MIT"
17     SLOT="0"
18 blueness 1.9 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
19 floppym 1.1 IUSE=""
20    
21     DEPEND=""
22     RDEPEND=""
23    
24     src_compile() {
25     distutils_src_compile
26    
27     if [[ ! -e testtools/_compat2x.py ]]; then
28     die "_compat2x.py removed upstream; fix src_compile"
29     fi
30    
31     fix_compat() {
32     # _compat2x.py is expected to have syntax incompatible with python 3.
33     # This breaks compileall. Replace with "raise SyntaxError".
34     if [[ $(python_get_version -l --major) == 3 ]]; then
35     echo "raise SyntaxError" > build-${PYTHON_ABI}/lib/testtools/_compat2x.py
36     fi
37     }
38     python_execute_function -q fix_compat
39     }
40    
41     # dev-python/subunit imports some objects from testtools.tests.helpers, so
42     # tests need to be installed.

  ViewVC Help
Powered by ViewVC 1.1.20