gentoo/dev-python/doit/doit-0.23.0-r1.ebuild
Robin H. Johnson 56bd759df1
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.

This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.

Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
2015-08-08 17:38:18 -07:00

64 lines
1.9 KiB
Bash

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
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"
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
}