summaryrefslogtreecommitdiff
path: root/dev-python/doit/doit-0.23.0-r1.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/doit/doit-0.23.0-r1.ebuild')
-rw-r--r--dev-python/doit/doit-0.23.0-r1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-python/doit/doit-0.23.0-r1.ebuild b/dev-python/doit/doit-0.23.0-r1.ebuild
new file mode 100644
index 000000000000..d3f06af7c264
--- /dev/null
+++ b/dev-python/doit/doit-0.23.0-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 pypy )
+inherit eutils distutils-r1
+
+DESCRIPTION="Automation tool"
+HOMEPAGE="http://python-doit.sourceforge.net/ https://pypi.org/project/doit/"
+SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="test"
+
+RDEPEND="dev-python/pyinotify[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]"
+DEPEND="test? ( ${RDEPEND}
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}] )"
+# Required for test phase
+DISTUTILS_IN_SOURCE_BUILD=1
+DOCS=( AUTHORS CHANGES README TODO.txt dev_requirements.txt )
+
+python_prepare_all() {
+ use test && DISTUTILS_IN_SOURCE_BUILD=1
+ # Tests of this file fail due to setting of a tmp dir which can be fixed.
+ # This known spurious cause does not warrant halting a testsuite
+ rm -f tests/test_cmd_strace.py || die
+
+ # These 2 tests succeed on running the suite a second time, so they are NOT broken
+ # A gentoo test phase is run only once, so these unbroken tests can be safely skipped.
+ sed -e s':testInit:_&:' -e s':testLoop:_&:' \
+ -i tests/test_filewatch.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ # Testsuite is designed to be run by py.test, called by runtests.py
+ # https://bitbucket.org/schettino72/doit/issue/78/tests-that-fail-under-pypy
+ if [[ "${EPYTHON}" == pypy-c2.0 ]]; then
+ sed -e 's:test_corrupted_file:_&:' \
+ -e 's:test_corrupted_file_unrecognized_excep_pdep:_&:' \
+ -i tests/test_dependency.py || die
+ elif [[ "${EPYTHON}" == python2.6 ]]; then
+ rm -f tests/test___main__.py || die
+ sed -e 's:test_invalid_param_stdout:_&:' \
+ -i tests/test_action.py || die
+ sed -e 's:test_run_wait:_&:' \
+ -i tests/test_cmd_auto.py || die
+ fi
+ "${PYTHON}" runtests.py
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ dodoc -r doc
+ docompress -x /usr/share/doc/${PF}/doc
+}