Skip to content

Commit

Permalink
dev-python/txAMQP: bump to 0.8.2 which supports Python 3
Browse files Browse the repository at this point in the history
Also require Python with xml support and add bugs-to to metadata.xml.

Package-Manager: Portage-2.3.38, Repoman-2.3.9
  • Loading branch information
sbraz authored and mgorny committed Jun 7, 2018
1 parent 40c5fd4 commit 91c7947
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-python/txAMQP/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST txAMQP-0.6.2.tar.gz 20749 BLAKE2B 697271755e2f736424cbbaecd6a009b875326c0da9fe4c06f03da9c7b662ecd263c5ac4c770debc0c8c65098e2d01bf9ca74509972b5be56da8572a43260cd0a SHA512 676797a5ae4e013d3cbf42e94f2a3e0421c9db0056e2abaee7bfacbb2b31b50948b5ac51d389ba6f8c609207a294c35ee9359813f3151f37d049092bd1aed78a
DIST txamqp-0.7.0.tar.gz 117964 BLAKE2B 0ad4c0e9606b6a333ee55f8717d8ead587e5980274d84f1c04652461fddca2f8202485c0f13cba8507ecd7049a1a414166d685326ef146f4d14d1734f0634065 SHA512 8af8dee44885fce6a8015fc3763ff1fd6a3effb8cc954b5ee2baed7c652a34440df4c6d8360b22930dc5b488e9965c3f8ad4ff8d49604ad80e31b6de70c233c5
DIST txamqp-0.8.2.tar.gz 118560 BLAKE2B 6e60cc0785462b92d046a620cc09eda8b7783bd09186a60299eba11c8f6f5780fc38b094ea974e4f1e443d3d30ee1428f30ad25fdb43554d25db17f36d323527 SHA512 4a5e468482433e684dc690abddeba3e0a6c77630055afe44487de72feecad9c750d179c43dee4e781d09c9c21259cecd615dc9f6eaa7d9ff7ca0796248ad5a02
1 change: 1 addition & 0 deletions dev-python/txAMQP/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<upstream>
<remote-id type="pypi">txAMQP</remote-id>
<remote-id type="github">txamqp/txamqp</remote-id>
<bugs-to>https://github.com/txamqp/txamqp/issues</bugs-to>
</upstream>
</pkgmetadata>
62 changes: 62 additions & 0 deletions dev-python/txAMQP/txAMQP-0.8.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
PYTHON_REQ_USE="xml(+)"

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 doc files
# https://github.com/txamqp/txamqp/pull/10
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"

# TODO: split twisted-core gives minor test failure, get rid of it
# when we port revdeps
RDEPEND="
|| (
dev-python/twisted[${PYTHON_USEDEP}]
dev-python/twisted-core[${PYTHON_USEDEP}]
)
dev-python/six[${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
}

0 comments on commit 91c7947

Please sign in to comment.