commit:     6163985812c32dfb857483205b8c7afb650ad109
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 26 16:19:27 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 07:38:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61639858

dev-python/Pyro5: new package, add 5.15-r1

Closes: https://github.com/gentoo/gentoo/pull/33523
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 dev-python/Pyro5/Manifest                          |  1 +
 dev-python/Pyro5/Pyro5-5.15-r1.ebuild              | 43 ++++++++++++++++++++++
 .../Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch  | 36 ++++++++++++++++++
 dev-python/Pyro5/metadata.xml                      | 17 +++++++++
 4 files changed, 97 insertions(+)

diff --git a/dev-python/Pyro5/Manifest b/dev-python/Pyro5/Manifest
new file mode 100644
index 000000000000..56c28ac55ea0
--- /dev/null
+++ b/dev-python/Pyro5/Manifest
@@ -0,0 +1 @@
+DIST Pyro5-5.15.tar.gz 447559 BLAKE2B 
e8831a4321205a8affef5cf0b986b3a10480296b03ac132cb5faa5508a1dbe0ba59a8dfb9a7ec284483d0736224291d033a02061b277078b26c1f71b1fd6bcc8
 SHA512 
bafed86363b0fd94900f0c708ffb6aa664587a7c032aa974b766556ec86d5db0eb89a8ceffa0a1e7dd043be8d0a1d8826fa79e1ca95002dbe380213c367684a3

diff --git a/dev-python/Pyro5/Pyro5-5.15-r1.ebuild 
b/dev-python/Pyro5/Pyro5-5.15-r1.ebuild
new file mode 100644
index 000000000000..4c974b6370a9
--- /dev/null
+++ b/dev-python/Pyro5/Pyro5-5.15-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_REQ_USE="sqlite"
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Distributed object middleware for Python (RPC)"
+HOMEPAGE="
+       https://pyro5.readthedocs.io
+       https://pypi.org/project/Pyro5/
+       https://github.com/irmen/Pyro5
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       >=dev-python/serpent-1.40[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-fix-test-on-ipv6.patch
+)
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs/source \
+       dev-python/sphinx-rtd-theme
+
+EPYTEST_DESELECT=(
+       # https://github.com/irmen/Pyro5/issues/83 (pypy3 specific)
+       tests/test_server.py::TestServerOnce::testRegisterWeak
+)
+
+python_test() {
+       epytest -m 'not network'
+}

diff --git a/dev-python/Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch 
b/dev-python/Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch
new file mode 100644
index 000000000000..fb92d88b6f4f
--- /dev/null
+++ b/dev-python/Pyro5/files/Pyro5-5.15-fix-test-on-ipv6.patch
@@ -0,0 +1,36 @@
+https://github.com/irmen/Pyro5/commit/8db91b617dd08508053e54dea2a781749a00ffc8.patch
+https://bugs.gentoo.org/915997
+
+From 8db91b617dd08508053e54dea2a781749a00ffc8 Mon Sep 17 00:00:00 2001
+From: Irmen de Jong <[email protected]>
+Date: Sat, 21 Oct 2023 21:48:56 +0200
+Subject: [PATCH] made getGetInterface test work with ipv6 localhost
+
+---
+ tests/test_socketutil.py | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/tests/test_socketutil.py b/tests/test_socketutil.py
+index ef0720d..c9467ae 100644
+--- a/tests/test_socketutil.py
++++ b/tests/test_socketutil.py
+@@ -56,10 +56,15 @@ def testGetIP6(self):
+ 
+     def testGetInterface(self):
+         addr = socketutil.get_interface("localhost")
+-        assert addr.version == 4
+-        assert str(addr).startswith("127.")
+-        assert str(addr.ip).startswith("127.0")
+-        assert str(addr.network).startswith("127.0")
++        if addr.version == 6:
++            assert str(addr).startswith("::1")
++            assert str(addr.ip) == "::1"
++            assert str(addr.network).startswith("::1")
++        else:
++            assert addr.version == 4
++            assert str(addr).startswith("127.")
++            assert str(addr.ip).startswith("127.0")
++            assert str(addr.network).startswith("127.0")
+         if has_ipv6:
+             addr = socketutil.get_interface("::1")
+             assert addr.version == 6

diff --git a/dev-python/Pyro5/metadata.xml b/dev-python/Pyro5/metadata.xml
new file mode 100644
index 000000000000..7a9a2bcc2903
--- /dev/null
+++ b/dev-python/Pyro5/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Viorel Munteanu</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Python</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">irmen/Pyro5</remote-id>
+               <remote-id type="pypi">Pyro5</remote-id>
+       </upstream>
+       <stabilize-allarches/>
+</pkgmetadata>

Reply via email to