summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2015-06-09 14:08:48 +0000
committerIan Delaney <idella4@gentoo.org>2015-06-09 14:08:48 +0000
commit96810930ff1470867e8ac6ef5c2173fc42f0feb8 (patch)
tree495759a9b29ee40832bc641fe360bf7259027438 /dev-python/txaio
parentUpdating remote-id in metadata.xml (diff)
downloadgentoo-2-96810930ff1470867e8ac6ef5c2173fc42f0feb8.tar.gz
gentoo-2-96810930ff1470867e8ac6ef5c2173fc42f0feb8.tar.bz2
gentoo-2-96810930ff1470867e8ac6ef5c2173fc42f0feb8.zip
ebuild written by me, new runtime dep to autobahn-0.10.4
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Diffstat (limited to 'dev-python/txaio')
-rw-r--r--dev-python/txaio/ChangeLog9
-rw-r--r--dev-python/txaio/Manifest4
-rw-r--r--dev-python/txaio/files/util.py40
-rw-r--r--dev-python/txaio/metadata.xml5
-rw-r--r--dev-python/txaio/txaio-1.0.0.ebuild47
5 files changed, 105 insertions, 0 deletions
diff --git a/dev-python/txaio/ChangeLog b/dev-python/txaio/ChangeLog
new file mode 100644
index 000000000000..19ea91d16966
--- /dev/null
+++ b/dev-python/txaio/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-python/txaio
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/txaio/ChangeLog,v 1.1 2015/06/09 14:08:48 idella4 Exp $
+
+*txaio-1.0.0 (09 Jun 2015)
+
+ 09 Jun 2015; Ian Delaney <idella4@gentoo.org> +files/util.py, +metadata.xml,
+ +txaio-1.0.0.ebuild:
+ ebuild written by me, new runtime dep to autobahn-0.10.4
diff --git a/dev-python/txaio/Manifest b/dev-python/txaio/Manifest
new file mode 100644
index 000000000000..42ceb63c0c77
--- /dev/null
+++ b/dev-python/txaio/Manifest
@@ -0,0 +1,4 @@
+AUX util.py 977 SHA256 50c5d06848ba4ad77a5a81248607ade9b9f56c08dc76aa545f88abaf320c044d SHA512 a82754ff4b81cdacd7010cb30065ae1a3408b2ed6e8a47021a2c7066adb614a87cc3d70b7980f10b9a6b063f4087ee44c5df2adab0d23ce90c1beb1368b4a498 WHIRLPOOL 6f9813bf1fe2a29ef127d13df7e7b4b5065a7a6d33cfea46ffcb92c479ca738844f32c61767e69ee9d840e952abac7bbb523b8a55e6bc16d4a70660cb1dd85bd
+DIST txaio-1.0.0.zip 33656 SHA256 4b38afc5d416b23426ed4e7f582d949317df5173c50efec999f2cc97ed368a57 SHA512 7ca543721139e3da96e86d3d2feafbd0901df7a48585f43f46407a17c226e24bbd18841c50bf911c3f208d614c9e32bfc0a7bee37b03b9ddea87a8a47e940572 WHIRLPOOL d11ea36f27d26566a5dcce83751a723ac2e33c51ecc7019b95d66014850e94fc820ae44b36cbbe3c5a3f5b86de666a2b59cec29194ca3d4b9d39908bb47b2556
+EBUILD txaio-1.0.0.ebuild 1141 SHA256 22c281dca41a9fefe2075bee1c212c51506a9e34799fd1792d66dcbe8da1a124 SHA512 a9043913761a7a498effb906bcd213f56dc74c6019b2f9c22c071bd0345c3ead949576e851bd273fd17f61b3eae5fc62d5e4eceee3b8961ab5cd615116d93194 WHIRLPOOL b0db2035b6ac9c0a59617000059361b96be1b29f9ad5645d24ec66b6c8108efaa7ba8f699f3b7c7a34b56f9ec397131134f1b1508b0b71d5ce19e51238134c6b
+MISC metadata.xml 160 SHA256 6cd954a9de2307c57d32b25fa3599dee2908a4ddc6a98594f593d53577307a3a SHA512 7c02a1de1ddcb6b7c6378cceff0458da3a15d5381417f7cdf01874e7c372664b8899863f41b3a2fd8d6ad67ceb732dac6da0cc17575bf8e3e6d89480417c6628 WHIRLPOOL ed2795e4466eda8c804d5067c87386e269a59fe959393057ca5ddc36851e00f5210c4da1adf4bbdfdbb7d1d3d5c60aced25727ca12fdc8305d9e263a3aca9b13
diff --git a/dev-python/txaio/files/util.py b/dev-python/txaio/files/util.py
new file mode 100644
index 000000000000..254df70a5aac
--- /dev/null
+++ b/dev-python/txaio/files/util.py
@@ -0,0 +1,40 @@
+try:
+ import asyncio
+ from asyncio.test_utils import run_once as _run_once
+
+ def run_once():
+ return _run_once(asyncio.get_event_loop())
+
+except ImportError as e:
+ try:
+ import trollius as asyncio
+ except ImportError:
+ asyncio = None
+
+ def run_once():
+ '''
+ copied from asyncio.testutils because trollius has no
+ "testutils"
+ '''
+ # in Twisted, this method is a no-op
+ if asyncio is None:
+ return
+
+ # just like modern asyncio.testutils.run_once does it...
+ loop = asyncio.get_event_loop()
+ loop.stop()
+ loop.run_forever()
+ asyncio.gather(*asyncio.Task.all_tasks())
+
+
+try:
+ # XXX fixme hack better way to detect twisted
+ # (has to work on py3 where asyncio exists always, though)
+ import twisted # noqa
+
+ def await(_):
+ return
+
+except ImportError:
+ def await(future):
+ asyncio.get_event_loop().run_until_complete(future)
diff --git a/dev-python/txaio/metadata.xml b/dev-python/txaio/metadata.xml
new file mode 100644
index 000000000000..301d2207cc29
--- /dev/null
+++ b/dev-python/txaio/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+</pkgmetadata>
diff --git a/dev-python/txaio/txaio-1.0.0.ebuild b/dev-python/txaio/txaio-1.0.0.ebuild
new file mode 100644
index 000000000000..b2080e112577
--- /dev/null
+++ b/dev-python/txaio/txaio-1.0.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/txaio/txaio-1.0.0.ebuild,v 1.1 2015/06/09 14:08:48 idella4 Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="a helper library for writing code unmodified on both Twisted and asyncio"
+HOMEPAGE="https://github.com/tavendo/txaio"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+
+RDEPEND="dev-python/six[${PYTHON_USEDEP}]
+ >=dev-python/pep8-1.6.2[${PYTHON_USEDEP}]"
+
+DEPEND="app-arch/unzip
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/alabaster[${PYTHON_USEDEP}] )
+ test? ( >=dev-python/pytest-2.6.4[${PYTHON_USEDEP}]
+ >=dev-python/pytest-cov-1.8.1[${PYTHON_USEDEP}] )"
+
+python_prepare() {
+ # https://github.com/tavendo/txaio/issues/3
+ cp -r "${FILESDIR}"/util.py test || die
+
+ distutils-r1_python_prepare
+}
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ py.test || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && HTML_DOCS=( doc/_build/html/. )
+ distutils-r1_python_install_all
+}