/[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.1 - (hide annotations) (download)
Sat May 19 16:13:36 2012 UTC (2 years, 1 month ago) by floppym
Branch: MAIN
Version bump. Re-enable python 3 support.

(Portage version: 2.2.0_alpha107/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     # $Header: /var/cvsroot/gentoo-x86/dev-python/testtools/testtools-0.9.14.ebuild,v 1.2 2012/04/26 22:14:30 aballier Exp $
4    
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     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
19     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