diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-05-22 10:31:26 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-05-22 11:12:27 +0200 |
commit | 5d6ebd23a6b940ae33a525317c5ceb4e3803e37c (patch) | |
tree | 02fd49332fad43733212945ab24f956cb42dacbb /dev-python/txAMQP/txAMQP-0.7.0.ebuild | |
parent | dev-python/txAMQP: Update HOMEPAGE to GitHub (diff) | |
download | gentoo-5d6ebd23a6b940ae33a525317c5ceb4e3803e37c.tar.gz gentoo-5d6ebd23a6b940ae33a525317c5ceb4e3803e37c.tar.bz2 gentoo-5d6ebd23a6b940ae33a525317c5ceb4e3803e37c.zip |
dev-python/txAMQP: Bump to 0.7.0, add tests
Diffstat (limited to 'dev-python/txAMQP/txAMQP-0.7.0.ebuild')
-rw-r--r-- | dev-python/txAMQP/txAMQP-0.7.0.ebuild | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-python/txAMQP/txAMQP-0.7.0.ebuild b/dev-python/txAMQP/txAMQP-0.7.0.ebuild new file mode 100644 index 000000000000..f93060b1727b --- /dev/null +++ b/dev-python/txAMQP/txAMQP-0.7.0.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit distutils-r1 + +MY_P=${PN,,}-${PV} +DESCRIPTION="Python library for communicating with AMQP peers using Twisted" +HOMEPAGE="https://github.com/txamqp/txamqp" +# pypi tarball misses necessary test files +SRC_URI="https://github.com/txamqp/txamqp/archive/${PV}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +KEYWORDS="~amd64 ~x86 ~x64-solaris" +SLOT="0" +IUSE="test" + +RDEPEND="dev-python/twisted-core[${PYTHON_USEDEP}]" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + ${RDEPEND} + net-misc/rabbitmq-server + )" + +S=${WORKDIR}/${MY_P} + +# Tests connect to the system rabbitmq server +# TODO: figure out how to start an isolated instance +RESTRICT="test" + +python_test() { + cd src || die + # tests look for those files relatively to modules + cp -r specs "${BUILD_DIR}"/lib || die + + TXAMQP_BROKER=RABBITMQ trial txamqp + local ret=${?} + + # avoid installing spec files + rm -r "${BUILD_DIR}"/lib/specs || die + + [[ ${ret} == 0 ]] || die "Tests failed with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( doc/* ) + + distutils-r1_python_install_all +} |