You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/doit/doit-0.23.0.ebuild

53 lines
1.3 KiB

# Copyright 1999-2014 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.2 2014/03/31 21:15:38 mgorny Exp $
EAPI=5
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} pypy 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
}