2013-04-24 19:00:02 +04:00
|
|
|
# Copyright 1999-2013 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2013-04-28 12:05:06 +04:00
|
|
|
# $Header: /var/cvsroot/gentoo-x86/dev-python/kombu/kombu-2.5.10.ebuild,v 1.2 2013/04/28 01:04:01 idella4 Exp $
|
2013-04-24 19:00:02 +04:00
|
|
|
|
|
|
|
EAPI=5
|
|
|
|
|
2013-04-28 12:05:06 +04:00
|
|
|
PYTHON_COMPAT=( python{2_7,3_2,3_3} )
|
2013-04-24 19:00:02 +04:00
|
|
|
|
|
|
|
inherit distutils-r1
|
|
|
|
|
|
|
|
DESCRIPTION="AMQP Messaging Framework for Python"
|
|
|
|
HOMEPAGE="http://pypi.python.org/pypi/kombu https://github.com/celery/kombu"
|
|
|
|
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="BSD"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
IUSE="amqplib doc examples test"
|
|
|
|
|
|
|
|
RDEPEND=">=dev-python/anyjson-0.3.3[${PYTHON_USEDEP}]
|
2013-04-28 12:05:06 +04:00
|
|
|
>=dev-python/py-amqp-1.0.6[${PYTHON_USEDEP}]
|
|
|
|
amqplib? ( >=dev-python/amqplib-1.0.2[${PYTHON_USEDEP}] )"
|
2013-04-24 19:00:02 +04:00
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
test? ( dev-python/nose-cover3[${PYTHON_USEDEP}]
|
2013-04-28 12:05:06 +04:00
|
|
|
>=dev-python/mock-0.7[${PYTHON_USEDEP}]
|
|
|
|
dev-python/django[${PYTHON_USEDEP}]
|
|
|
|
>=dev-python/anyjson-0.3.3[${PYTHON_USEDEP}]
|
|
|
|
dev-python/redis-py[${PYTHON_USEDEP}]
|
|
|
|
dev-python/pymongo[$(python_gen_usedep python2_7)]
|
|
|
|
dev-python/msgpack[${PYTHON_USEDEP}] )
|
2013-04-24 19:00:02 +04:00
|
|
|
doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
|
2013-04-28 12:05:06 +04:00
|
|
|
dev-python/django[${PYTHON_USEDEP}]
|
|
|
|
dev-python/beanstalkc[$(python_gen_usedep python2_7)]
|
|
|
|
dev-python/couchdb-python[$(python_gen_usedep python2_7)] )
|
2013-04-24 19:00:02 +04:00
|
|
|
dev-python/setuptools[${PYTHON_USEDEP}]"
|
|
|
|
|
2013-04-28 12:05:06 +04:00
|
|
|
DISTUTILS_IN_SOURCE_BUILD=1
|
|
|
|
|
|
|
|
python_compile_all() {
|
2013-04-24 19:00:02 +04:00
|
|
|
if use doc; then
|
2013-04-28 12:05:06 +04:00
|
|
|
emake -C docs html || die "kombu docs failed installation"
|
2013-04-24 19:00:02 +04:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-04-28 12:05:06 +04:00
|
|
|
# wip; https://github.com/celery/kombu/issues/227; at this point upstr. maintainer established these tests
|
|
|
|
# 'can and do' pass, acks their failing 'on Travis' and offers neither a solution nor any plan to make 1.
|
2013-04-24 19:00:02 +04:00
|
|
|
python_test() {
|
2013-04-28 12:05:06 +04:00
|
|
|
if [[ "${EPYTHON}" == python3* ]]; then
|
|
|
|
nosetests --py3where=build/lib -e test_basic_consume_registers_ack_status \
|
|
|
|
-e test_close_resolves_connection_cycle -e test_init \
|
|
|
|
-e test_message_to_python -e test_prepare_message \
|
|
|
|
-e test_produce_consume -e test_produce_consume_noack kombu/tests \
|
2013-04-24 19:00:02 +04:00
|
|
|
|| die "Tests failed under ${EPYTHON}"
|
2013-04-28 12:05:06 +04:00
|
|
|
else
|
|
|
|
nosetests -e test_basic_consume_registers_ack_status -e test_close_resolves_connection_cycle \
|
|
|
|
-e test_init -e test_message_to_python -e test_prepare_message \
|
|
|
|
|| die "Tests failed under ${EPYTHON}"
|
|
|
|
fi
|
2013-04-24 19:00:02 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
python_install_all() {
|
|
|
|
distutils-r1_python_install_all
|
2013-04-28 12:05:06 +04:00
|
|
|
|
2013-04-24 19:00:02 +04:00
|
|
|
if use examples; then
|
|
|
|
docompress -x usr/share/doc/${P}/examples/
|
|
|
|
insinto usr/share/doc/${PF}/
|
|
|
|
doins -r examples/
|
|
|
|
fi
|
2013-04-28 12:05:06 +04:00
|
|
|
|
2013-04-24 19:00:02 +04:00
|
|
|
use doc && dohtml -r docs/.build/html/
|
|
|
|
}
|