Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pysvn/files/, dev-python/pysvn/
Date: Tue, 29 Nov 2022 00:43:28
Message-Id: 1669682557.ca605b5dee67291e0a12b608ef3f416e46da2fbd.sping@gentoo
1 commit: ca605b5dee67291e0a12b608ef3f416e46da2fbd
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 29 00:23:44 2022 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 29 00:42:37 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca605b5d
7
8 dev-python/pysvn: 1.9.18 + Python 3.11 + DistutilsNonPEP517Build
9
10 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
11
12 dev-python/pysvn/Manifest | 1 +
13 .../pysvn/files/pysvn-1.9.18-tests-3.11.patch | 33 +++++++++++
14 dev-python/pysvn/pysvn-1.9.18.ebuild | 66 ++++++++++++++++++++++
15 3 files changed, 100 insertions(+)
16
17 diff --git a/dev-python/pysvn/Manifest b/dev-python/pysvn/Manifest
18 index 80ed5fc49c1c..242b0c338cd9 100644
19 --- a/dev-python/pysvn/Manifest
20 +++ b/dev-python/pysvn/Manifest
21 @@ -1 +1,2 @@
22 DIST pysvn-1.9.15.tar.gz 667161 BLAKE2B 35e9e0967d5c0b4cebf546e40df17b66c66406d0f8100c32e6e840220f60b0083c0ed3f3af5f54e2264d06905ea90970d6b7cbfad2bab872a14d5d4aea5900df SHA512 0809507134fd31f6bcc90217e7840eb166e2eb2ed56316010a549dd70f6f855599f596942574343cdefd5997947b12c847df2cd145669f50aa93f603e46a5ee0
23 +DIST pysvn-1.9.18.tar.gz 667827 BLAKE2B cd32b4ec55118becd496a9aab6f4dd2b9d57c82e12d5a08b18d36d0caffbafe7066ff45c9493a36499979e759d38dd6b15a68e7bb5819464362c2691e7599160 SHA512 0ca2924223cdc5f29e961e879db6b0f88e82b5c4c40df50169468dd5a72cbccddea9f0d1680ef4a54d45e89b4b2b2c3c22f5e76c66196783a89cac8b583b6623
24
25 diff --git a/dev-python/pysvn/files/pysvn-1.9.18-tests-3.11.patch b/dev-python/pysvn/files/pysvn-1.9.18-tests-3.11.patch
26 new file mode 100644
27 index 000000000000..06a0bec16720
28 --- /dev/null
29 +++ b/dev-python/pysvn/files/pysvn-1.9.18-tests-3.11.patch
30 @@ -0,0 +1,33 @@
31 +From 0f4a2071dfeb90357a3eba947d6dd7cc879675ce Mon Sep 17 00:00:00 2001
32 +From: Sebastian Pipping <sebastian@×××××××.org>
33 +Date: Tue, 29 Nov 2022 01:08:49 +0100
34 +Subject: [PATCH] Examples/Client/svn_cmd.py: Stop DeprecationWarning from
35 + breaking tests with Python 3.11
36 +
37 +---
38 + Examples/Client/svn_cmd.py | 9 ++++++++-
39 + 1 file changed, 8 insertions(+), 1 deletion(-)
40 +
41 +diff --git a/Examples/Client/svn_cmd.py b/Examples/Client/svn_cmd.py
42 +index 42e4c87..b8ef4ff 100644
43 +--- a/Examples/Client/svn_cmd.py
44 ++++ b/Examples/Client/svn_cmd.py
45 +@@ -72,7 +72,14 @@ def initLocale():
46 + locale.setlocale( locale.LC_ALL, '' )
47 +
48 + else:
49 +- language_code, encoding = locale.getdefaultlocale()
50 ++ import warnings
51 ++
52 ++ with warnings.catch_warnings():
53 ++ if sys.version_info >= (3, 11):
54 ++ warnings.filterwarnings("ignore", category=DeprecationWarning)
55 ++
56 ++ language_code, encoding = locale.getdefaultlocale()
57 ++
58 + if language_code is None:
59 + language_code = 'en_GB'
60 +
61 +--
62 +2.38.1
63 +
64
65 diff --git a/dev-python/pysvn/pysvn-1.9.18.ebuild b/dev-python/pysvn/pysvn-1.9.18.ebuild
66 new file mode 100644
67 index 000000000000..ebc6f2e8f2cf
68 --- /dev/null
69 +++ b/dev-python/pysvn/pysvn-1.9.18.ebuild
70 @@ -0,0 +1,66 @@
71 +# Copyright 1999-2022 Gentoo Authors
72 +# Distributed under the terms of the GNU General Public License v2
73 +
74 +EAPI=8
75 +
76 +PYTHON_COMPAT=( python3_{8..11} )
77 +DISTUTILS_USE_PEP517=setuptools
78 +
79 +inherit distutils-r1 toolchain-funcs
80 +
81 +DESCRIPTION="Object-oriented python bindings for subversion"
82 +HOMEPAGE="https://pysvn.sourceforge.io/"
83 +SRC_URI="mirror://sourceforge/project/pysvn/pysvn/V${PV}/${P}.tar.gz"
84 +
85 +LICENSE="Apache-1.1"
86 +SLOT="0"
87 +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
88 +IUSE="doc examples"
89 +
90 +DEPEND="
91 + >=dev-python/pycxx-7.0.2[${PYTHON_USEDEP}]
92 + >=dev-vcs/subversion-1.9"
93 +RDEPEND="${DEPEND}"
94 +
95 +PATCHES=(
96 + "${FILESDIR}"/${PN}-1.9.18-tests-3.11.patch
97 +)
98 +
99 +python_prepare_all() {
100 + # Don't use internal copy of dev-python/pycxx.
101 + rm -r Import || die
102 +
103 + distutils-r1_python_prepare_all
104 +}
105 +
106 +python_configure() {
107 + cd Source || die
108 + CC="$(tc-getCC)" CCC="$(tc-getCXX)" \
109 + esetup.py configure
110 +}
111 +
112 +python_compile() {
113 + cd Source || die
114 + emake
115 +}
116 +
117 +python_test() {
118 + cd Tests || die
119 + emake
120 +}
121 +
122 +python_install() {
123 + cd Source || die
124 + python_domodule pysvn
125 +}
126 +
127 +python_install_all() {
128 + use doc && local HTML_DOCS=( Docs/. )
129 + if use examples; then
130 + docinto examples
131 + dodoc -r Examples/Client/.
132 + docompress -x /usr/share/doc/${PF}/examples
133 + fi
134 +
135 + distutils-r1_python_install_all
136 +}