Merge remote-tracking branch 'origin/dev-python/exam'
[wtk-overlay.git] / dev-python / exam / exam-9999.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
7
8 inherit distutils-r1
9
10 if [[ "${PV}" == "9999" ]]; then
11         inherit git-2
12         EGIT_REPO_URI="git://github.com/Fluxx/${PN}.git"
13         SRC_URI=""
14 else
15         SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
16 fi
17
18 DESCRIPTION="Helpers for better testing"
19 HOMEPAGE="https://github.com/Fluxx/exam https://pypi.python.org/pypi/exam"
20
21 LICENSE="MIT"
22 SLOT="0"
23 KEYWORDS="~amd64 ~x86"
24 IUSE="test"
25
26 RDEPEND="
27         dev-python/mock[${PYTHON_USEDEP}]
28         "
29 DEPEND="
30         test? (
31                 ${RDEPEND}
32                 dev-python/nose[${PYTHON_USEDEP}]
33         )"
34
35 python_prepare_all() {
36         sed -i "s/packages=find_packages()/packages=find_packages(exclude=['tests', 'tests.*'])/" setup.py || die
37         distutils-r1_python_prepare_all
38 }
39
40 python_test() {
41         esetup.py test
42 }