blob: 307b0d422260c1a1087a134e8fae45ae7166370f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/doit/doit-0.23.0.ebuild,v 1.1 2013/10/06 05:58:36 yngwin Exp $
EAPI=5
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy2_0 )
inherit eutils distutils-r1
DESCRIPTION="Automation tool"
HOMEPAGE="http://python-doit.sourceforge.net/ http://pypi.python.org/pypi/doit"
SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
DEPEND=""
RDEPEND="dev-python/pyinotify[${PYTHON_USEDEP}]"
python_prepare_all() {
use test && DISTUTILS_IN_SOURCE_BUILD=1
sed -e 's:from .conf:from conf:' -i tests/test_dependency.py || die
distutils-r1_python_prepare_all
}
python_test() {
local test
# https://bitbucket.org/schettino72/doit/issue/48/test-suite-has-me-perplexed-doit-0200
# "${PYTHON}" runtests.py # How it's supposed to work
# How it works
if [[ "${EPYTHON}" == python3* ]]; then
einfo "tests don't work for py3"
else
for test in tests/test_*.py
do
if ! "${PYTHON}" $test; then
die "Test $test failed under ${EPYTHON}"
else
einfo "Test ${test#tests/} passed under ${EPYTHON}"
fi
done
fi
}
src_install() {
distutils-r1_src_install
dodoc AUTHORS CHANGES README TODO.txt dev_requirements.txt
dodoc -r doc
docompress -x /usr/share/doc/${PF}/doc
}
|