summaryrefslogtreecommitdiff
path: root/dev-python/pycurl
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-05-06 00:39:16 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-05-06 00:39:16 +0000
commit9fb02fec29b8d4a8f841cc22fc7d091423c8a490 (patch)
tree5cb519e4f0ca1c13915c83b6b2ee956b30080a17 /dev-python/pycurl
parent8a4f25c17601de403342a103fed7b8809f820f63 (diff)
downloadbaldeagleos-repo-9fb02fec29b8d4a8f841cc22fc7d091423c8a490.tar.gz
baldeagleos-repo-9fb02fec29b8d4a8f841cc22fc7d091423c8a490.tar.xz
baldeagleos-repo-9fb02fec29b8d4a8f841cc22fc7d091423c8a490.zip
Adding metadata
Diffstat (limited to 'dev-python/pycurl')
-rw-r--r--dev-python/pycurl/files/7.44-fix-tests.patch34
-rw-r--r--dev-python/pycurl/pycurl-7.44.1.ebuild8
2 files changed, 40 insertions, 2 deletions
diff --git a/dev-python/pycurl/files/7.44-fix-tests.patch b/dev-python/pycurl/files/7.44-fix-tests.patch
new file mode 100644
index 000000000000..d5d900100086
--- /dev/null
+++ b/dev-python/pycurl/files/7.44-fix-tests.patch
@@ -0,0 +1,34 @@
+https://github.com/pycurl/pycurl/commit/d47c68b1364f8a1a45ab8c584c291d44b762f7b1
+From: Samuel Henrique <samueloph@debian.org>
+Date: Sat, 30 Apr 2022 23:02:34 +0100
+Subject: [PATCH] tests: fix error message on error_test (for curl >= 7.83)
+
+curl 7.83.0 removed exclamation marks from a few error messages, curl commit:
+https://github.com/curl/curl/commit/6968fb9d54dc3a1aaa1b16088f038eaf5dd8b2d7
+
+This commit adds support for the new curl release while also supporting the previous ones.
+--- a/tests/error_test.py
++++ b/tests/error_test.py
+@@ -29,7 +29,8 @@ def test_pycurl_error_libcurl(self):
+ err, msg = exc.args
+ self.assertEqual(pycurl.E_URL_MALFORMAT, err)
+ # possibly fragile
+- self.assertEqual('No URL set!', msg)
++ # curl < 7.83.0 has an exclamation mark in this error message
++ self.assertIn(msg, ['No URL set!', 'No URL set'])
+ else:
+ self.fail('Expected pycurl.error to be raised')
+
+@@ -43,9 +44,10 @@ def test_pycurl_errstr_type(self):
+ self.curl.perform()
+ except pycurl.error:
+ # might be fragile
+- self.assertEqual('No URL set!', self.curl.errstr())
++ # curl < 7.83.0 has an exclamation mark in this error message
++ self.assertIn(self.curl.errstr(), ['No URL set!', 'No URL set'])
+ # repeated checks do not clear value
+- self.assertEqual('No URL set!', self.curl.errstr())
++ self.assertIn(self.curl.errstr(), ['No URL set!', 'No URL set'])
+ # check the type - on all python versions
+ self.assertEqual(str, type(self.curl.errstr()))
+ else:
diff --git a/dev-python/pycurl/pycurl-7.44.1.ebuild b/dev-python/pycurl/pycurl-7.44.1.ebuild
index 178f0ab79db3..1b482739918f 100644
--- a/dev-python/pycurl/pycurl-7.44.1.ebuild
+++ b/dev-python/pycurl/pycurl-7.44.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -15,7 +15,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
IUSE="curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl examples ssl test"
RESTRICT="!test? ( test )"
@@ -44,6 +44,10 @@ DEPEND="${RDEPEND}
>=dev-python/bottle-0.12.7[${PYTHON_USEDEP}]
)"
+PATCHES=(
+ "${FILESDIR}/7.44-fix-tests.patch"
+)
+
python_prepare_all() {
# docs installed into the wrong directory
sed -e "/setup_args\['data_files'\] = /d" -i setup.py || die