dev-python/preggy: Add this (indirect) thumbor test dependency
authorW. Trevor King <wking@tremily.us>
Mon, 29 Sep 2014 22:03:11 +0000 (15:03 -0700)
committerW. Trevor King <wking@tremily.us>
Mon, 29 Sep 2014 22:23:11 +0000 (15:23 -0700)
I've submitted the find_packages sed upstream [1].

[1]: https://github.com/heynemann/preggy/pull/18

preggy-9999.ebuild [new file with mode: 0644]

diff --git a/preggy-9999.ebuild b/preggy-9999.ebuild
new file mode 100644 (file)
index 0000000..61ca11e
--- /dev/null
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
+
+inherit distutils-r1
+
+if [[ "${PV}" == "9999" ]]; then
+       inherit git-2
+       EGIT_REPO_URI="git://github.com/heynemann/${PN}.git"
+       SRC_URI=""
+else
+       SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+fi
+
+DESCRIPTION="An assertion library for Python"
+HOMEPAGE="http://heynemann.github.io/preggy https://pypi.python.org/pypi/preggy"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="
+       dev-python/six[${PYTHON_USEDEP}]
+       dev-python/unidecode[${PYTHON_USEDEP}]
+       "
+DEPEND="
+       test? (
+               ${RDEPEND}
+               dev-python/nose[${PYTHON_USEDEP}]
+               dev-python/coverage[${PYTHON_USEDEP}]
+       )"
+
+python_prepare_all() {
+       sed -i "s/packages=find_packages()/packages=find_packages(exclude=['tests', 'tests.*'])/" setup.py || die
+       distutils-r1_python_prepare_all
+}
+
+python_test() {
+       "${EPYTHON}" -c 'import nose; nose.run_exit()' -vv --detailed-errors --with-coverage --cover-package=preggy --cover-package=preggy.assertions --cover-package=preggy.assertions.types tests/ ||
+       die "tests failed with ${EPYTHON}"
+}