summaryrefslogtreecommitdiff
path: root/dev-python/amqplib
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/amqplib
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/amqplib')
-rw-r--r--dev-python/amqplib/Manifest7
-rw-r--r--dev-python/amqplib/amqplib-1.0.2-r1.ebuild40
-rw-r--r--dev-python/amqplib/files/amqplib-0.6.1_disable_socket_tests.patch17
-rw-r--r--dev-python/amqplib/files/amqplib-1.0.2-unicode_tests_py3.patch63
-rw-r--r--dev-python/amqplib/metadata.xml16
5 files changed, 143 insertions, 0 deletions
diff --git a/dev-python/amqplib/Manifest b/dev-python/amqplib/Manifest
new file mode 100644
index 000000000000..5fdea4afc344
--- /dev/null
+++ b/dev-python/amqplib/Manifest
@@ -0,0 +1,7 @@
+AUX amqplib-0.6.1_disable_socket_tests.patch 652 SHA256 420e8a5e4f89357288af95080fa5e5f6f3b59c9334628cfb354bee4f6e458f4e SHA512 9808f03c281a1384c2753441355fc563663579c178e59a65140146ca670e2e90a2a486eec1760dfdf5dd0f91f522cb427094c758bac04c6f0f06b9e9c7ea2434 WHIRLPOOL fc1d98e7f128f391499fb4f996b8cd952b3948ebbb532b7c8ccb215f1991d7fc3ca7d9648576d405fc80fa75a2db155fe12959016a7f624e07f55bafa6a9ef36
+AUX amqplib-1.0.2-unicode_tests_py3.patch 1943 SHA256 16fcde28424f0f4015e5f6f02cdc885d5e8b7ce2cda3bf6014da381e95abea30 SHA512 8f7f0896593d5fc166de14116e6e67924e41332ae7cedf83501697fa64b847f9f6decd5bb9c6a3af6921607c0ec62b972be74f961a9e616de60d50a01f8ed482 WHIRLPOOL c2308b55b11bdb5f58b1f8ab32de99cc5f729250a2941b661f9ef9c573869fb1686fb03c4ecb74b96e6cef829a661bba1b11a8275fa9a5ac21ef822901009e37
+DIST amqplib-1.0.2.tgz 58544 SHA256 843d69b681a60afd21fbf50f310404ec67fcdf9d13dfcf6e9d41f3b456217e5b SHA512 6c8c9fd7fd68fd6a1eb944962094e57f89525bc78dd002dc0dadd491b262293367a86569dfc52f0701723b4327b7c290150dc2e69e3ac1a28613578d9e0d0710 WHIRLPOOL f3584906a9f6407271335d838cd3b49d3d04b1ec9da04cbc0483272c6f3a73c7307f6bacd6ef8f4a6cf64a348eae631619c1ab09a951d0f3aaa69a1271964cb2
+EBUILD amqplib-1.0.2-r1.ebuild 863 SHA256 db853885d7053a1163d55212c3eb0e28f6a90cd26a9e7816301ddbdcd582fbe3 SHA512 551d0c231b3d08affca5034666cc00feefb54de8f953aaacc675066509a499ecc1822129f588c42d74907c7eec7e6be13aaaae1f104ede63155b1c5f5577944d WHIRLPOOL bd0fea8c96552191a34e60712f7bb6d5adb9cc0aad5be6a87cfe4d30d76b5cbb9b620857f16baa5171aaa2a5bbe28b92a83c5f379a91144c172bb9c8f6fd7fd2
+MISC ChangeLog 3520 SHA256 920a5eb8d287651c9ff8cb56119153c9a6f05ed6b56b76f4f94549c18bf9be16 SHA512 1cb7d8cdc5b5acbe650ecb48d1f7aa919607c3a80e80e8b432224e83260e8509aae9dd1dfe474781b779ddcb6b825324a2c6435bc8eab96651fbd5ab66575aa7 WHIRLPOOL 4105d807e77d83a0501f375a2b5a0c53a0ee6d5cbb424a2bd89b428c78bd59519e093eb190dd57fda9c48c7afc32e8d53b67bc060dc2e04d776357e73c50b6db
+MISC ChangeLog-2015 2063 SHA256 ce81eb425b4e35b68afccdb3eea8e3072498bad0db675080503fab1bae7004ee SHA512 42100c48032657453fa3b4b9bcd942d30cd1b24a78faa308e386ab8ad3dab4557a3e8b32060c6578d65275f5ffd9c9154312fff3e6bb83ed21918e1426669d33 WHIRLPOOL 132c25fe0bd664ab415557176a5537e8862d741c1c09c20991c8632ff05404230ac8e1e6f07d8ff74ad760f604be33bd2df579733e882d2432f7380de06c4651
+MISC metadata.xml 485 SHA256 e6b026e96e8a18d50384878c068184a3cb8a453f9d4080e749e2fba79c36b9b9 SHA512 95c41cbe50f47f275c9e746bc7a7a90ecc63d17f02d7f94dd0eec0cc58de3ef8083a5f96cde53dd284e4ca0c218789b36766d798ba63ad0064838e308431e3ac WHIRLPOOL c6be344ea8e9246c261643ca54bdd43500872bffb50f58e5340af6a27301663dd1e86ce3eadd24b6bb92fe25bcd2dc4a38893551baf0f6bbc603335b114978df
diff --git a/dev-python/amqplib/amqplib-1.0.2-r1.ebuild b/dev-python/amqplib/amqplib-1.0.2-r1.ebuild
new file mode 100644
index 000000000000..4b11bc8dc954
--- /dev/null
+++ b/dev-python/amqplib/amqplib-1.0.2-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="Python client for the Advanced Message Queuing Procotol (AMQP)"
+HOMEPAGE="https://barryp.org/software/py-amqplib/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tgz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 x86"
+IUSE="examples extras test"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.6.1_disable_socket_tests.patch"
+ "${FILESDIR}/${P}-unicode_tests_py3.patch"
+)
+
+python_test() {
+ "${PYTHON}" tests/client_0_8/run_all.py \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ dodoc -r docs/.
+ if use examples; then
+ docinto examples
+ dodoc -r demo/.
+ fi
+ if use extras; then
+ insinto /usr/share/${PF}
+ doins -r extras
+ fi
+}
diff --git a/dev-python/amqplib/files/amqplib-0.6.1_disable_socket_tests.patch b/dev-python/amqplib/files/amqplib-0.6.1_disable_socket_tests.patch
new file mode 100644
index 000000000000..c92e3cba64f4
--- /dev/null
+++ b/dev-python/amqplib/files/amqplib-0.6.1_disable_socket_tests.patch
@@ -0,0 +1,17 @@
+diff -uNr amqplib-0.6.1.org/tests/client_0_8/run_all.py amqplib-0.6.1/tests/client_0_8/run_all.py
+--- amqplib-0.6.1.org/tests/client_0_8/run_all.py 2011-07-06 16:21:22.000000000 -0400
++++ amqplib-0.6.1/tests/client_0_8/run_all.py 2011-07-06 16:21:38.000000000 -0400
+@@ -28,13 +28,8 @@
+ 'test_exceptions',
+ 'test_serialization',
+ 'test_basic_message',
+- 'test_connection',
+- 'test_channel',
+ ]
+
+-if sys.version_info >= (2, 5):
+- TEST_NAMES.append('test_with')
+-
+ def main():
+ suite = unittest.TestLoader().loadTestsFromNames(TEST_NAMES)
+ unittest.TextTestRunner(**settings.test_args).run(suite)
diff --git a/dev-python/amqplib/files/amqplib-1.0.2-unicode_tests_py3.patch b/dev-python/amqplib/files/amqplib-1.0.2-unicode_tests_py3.patch
new file mode 100644
index 000000000000..14252a678203
--- /dev/null
+++ b/dev-python/amqplib/files/amqplib-1.0.2-unicode_tests_py3.patch
@@ -0,0 +1,63 @@
+--- a/tests/client_0_8/test_serialization.py 2011-07-18 00:11:48.000000000 -0400
++++ b/tests/client_0_8/test_serialization.py 2012-03-02 16:54:35.000000000 -0500
+@@ -32,6 +32,18 @@
+ # Python 2.5 and lower
+ bytes = str
+
++#Unicode Strings for py3 tests
++uni_strings = {
++ 'u0100' : '\u0100',
++ 'hello' : 'hello',
++ 'a' : 'a',
++ 'another' : 'And something in unicode'
++}
++
++if hasattr(str, 'decode'):
++ for wk, wv in uni_strings.iteritems():
++ uni_strings[wk] = wv.decode("utf-8")
++
+ import settings
+
+ from amqplib.client_0_8.serialization import AMQPReader, AMQPWriter, GenericContent
+@@ -232,12 +244,12 @@
+
+ def test_shortstr_unicode(self):
+ w = AMQPWriter()
+- w.write_shortstr(u'hello')
++ w.write_shortstr(uni_strings['hello'])
+ s = w.getvalue()
+ self.assertEqualBinary(s, '\x05hello')
+
+ r = AMQPReader(s)
+- self.assertEqual(r.read_shortstr(), u'hello')
++ self.assertEqual(r.read_shortstr(),uni_strings['hello'])
+
+ def test_long_shortstr(self):
+ w = AMQPWriter()
+@@ -245,7 +257,7 @@
+
+ def test_long_shortstr_unicode(self):
+ w = AMQPWriter()
+- self.assertRaises(ValueError, w.write_shortstr, u'\u0100' * 128)
++ self.assertRaises(ValueError, w.write_shortstr, uni_strings['u0100'] * 128)
+
+
+ #
+@@ -273,7 +285,7 @@
+ self.assertEqual(r.read_longstr(), str(val))
+
+ def test_longstr_unicode(self):
+- val = u'a' * 512
++ val = uni_strings['a'] * 512
+ w = AMQPWriter()
+ w.write_longstr(val)
+ s = w.getvalue()
+@@ -324,7 +336,7 @@
+ 'foo': 7,
+ 'bar': Decimal('123345.1234'),
+ 'baz': 'this is some random string I typed',
+- 'ubaz': u'And something in unicode',
++ 'ubaz': uni_strings['another'],
+ 'dday_aniv': datetime(1994, 6, 6),
+ 'more': {
+ 'abc': -123,
diff --git a/dev-python/amqplib/metadata.xml b/dev-python/amqplib/metadata.xml
new file mode 100644
index 000000000000..1846993fbe99
--- /dev/null
+++ b/dev-python/amqplib/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <use>
+ <flag name="extras">Install extra tools to generate initial Python mod
+ from an AMQP XML file</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">py-amqplib</remote-id>
+ <remote-id type="pypi">amqplib</remote-id>
+ </upstream>
+</pkgmetadata>