/[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.6 - (hide annotations) (download)
Wed Jun 27 01:38:55 2012 UTC (2 years, 3 months ago) by jer
Branch: MAIN
Changes since 1.5: +2 -2 lines
Stable for HPPA (bug #422071).

(Portage version: 2.2.0_alpha113/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 jer 1.6 # $Header: /var/cvsroot/gentoo-x86/dev-python/testtools/testtools-0.9.15.ebuild,v 1.5 2012/06/25 19:54:43 maekke 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 jer 1.6 KEYWORDS="~alpha amd64 arm hppa ~ia64 ~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