summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-08-11 00:49:47 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-08-11 00:49:47 +0000
commita2d76d6b036a5f1d8322d32b778b5cd5cb9fdba2 (patch)
tree6509fa474a3fcf37f6fbdd81b625dc1b8d3ee07c /dev-python
parent9a66a2165c5390f179ea02fda9b8c91b636a4996 (diff)
downloadbaldeagleos-repo-a2d76d6b036a5f1d8322d32b778b5cd5cb9fdba2.tar.gz
baldeagleos-repo-a2d76d6b036a5f1d8322d32b778b5cd5cb9fdba2.tar.xz
baldeagleos-repo-a2d76d6b036a5f1d8322d32b778b5cd5cb9fdba2.zip
Adding metadata
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/css-parser/css-parser-1.0.7-r1.ebuild4
-rw-r--r--dev-python/css-parser/files/css-parser-1.0.7-python311-tests.patch51
-rw-r--r--dev-python/editorconfig-core-py/editorconfig-core-py-0.12.3-r1.ebuild2
-rw-r--r--dev-python/exam/exam-0.10.6.ebuild2
-rw-r--r--dev-python/pyxattr/pyxattr-0.7.2.ebuild2
-rw-r--r--dev-python/scandir/files/scandir-1.10.0-python3.9.patch62
-rw-r--r--dev-python/scandir/scandir-1.10.0-r3.ebuild27
7 files changed, 147 insertions, 3 deletions
diff --git a/dev-python/css-parser/css-parser-1.0.7-r1.ebuild b/dev-python/css-parser/css-parser-1.0.7-r1.ebuild
index 4531a4a391ac..2643b091b8ca 100644
--- a/dev-python/css-parser/css-parser-1.0.7-r1.ebuild
+++ b/dev-python/css-parser/css-parser-1.0.7-r1.ebuild
@@ -20,4 +20,8 @@ BDEPEND="
test? ( dev-python/chardet[${PYTHON_USEDEP}] )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-python311-tests.patch
+)
+
distutils_enable_tests unittest
diff --git a/dev-python/css-parser/files/css-parser-1.0.7-python311-tests.patch b/dev-python/css-parser/files/css-parser-1.0.7-python311-tests.patch
new file mode 100644
index 000000000000..c9e4801cafbe
--- /dev/null
+++ b/dev-python/css-parser/files/css-parser-1.0.7-python311-tests.patch
@@ -0,0 +1,51 @@
+https://github.com/ebook-utils/css-parser/commit/ad79cfcb6e55837a4353b92d051de023c18f6581
+
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Sat, 21 May 2022 14:21:28 +0200
+Subject: [PATCH] tests: adjust exception string checks for python 3.11
+
+Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2062102.
+--- a/css_parser_tests/test_property.py
++++ b/css_parser_tests/test_property.py
+@@ -5,6 +5,7 @@
+ import xml.dom
+ from . import basetest
+ import css_parser
++import sys
+
+
+ class PropertyTestCase(basetest.BaseTestCase):
+@@ -162,8 +163,9 @@ def test_literalname(self):
+ "Property.literalname"
+ p = css_parser.css.property.Property(r'c\olor', 'red')
+ self.assertEqual(r'c\olor', p.literalname)
+- self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", p.__setattr__,
+- 'literalname', 'color')
++ pattern = "object has no setter" if sys.version_info >= (3,11) else "can't set attribute"
++ self.assertRaisesMsgSubstring(AttributeError, pattern,
++ p.__setattr__, 'literalname', 'color')
+
+ def test_validate(self):
+ "Property.valid"
+--- a/css_parser_tests/test_selector.py
++++ b/css_parser_tests/test_selector.py
+@@ -11,6 +11,7 @@
+ import xml.dom
+ from . import basetest
+ import css_parser
++import sys
+
+
+ class SelectorTestCase(basetest.BaseTestCase):
+@@ -412,7 +413,9 @@ def test_specificity(self):
+
+ # readonly
+ def _set(): selector.specificity = 1
+- self.assertRaisesMsgSubstring(AttributeError, "can't set attribute", _set)
++
++ pattern = "object has no setter" if sys.version_info >= (3,11) else "can't set attribute"
++ self.assertRaisesMsgSubstring(AttributeError, pattern, _set)
+
+ tests = {
+ '*': (0, 0, 0, 0),
+
diff --git a/dev-python/editorconfig-core-py/editorconfig-core-py-0.12.3-r1.ebuild b/dev-python/editorconfig-core-py/editorconfig-core-py-0.12.3-r1.ebuild
index 88f60c6aada0..2653e9d9f089 100644
--- a/dev-python/editorconfig-core-py/editorconfig-core-py-0.12.3-r1.ebuild
+++ b/dev-python/editorconfig-core-py/editorconfig-core-py-0.12.3-r1.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=7
diff --git a/dev-python/exam/exam-0.10.6.ebuild b/dev-python/exam/exam-0.10.6.ebuild
index dadbb22d9a4a..90d47429775a 100644
--- a/dev-python/exam/exam-0.10.6.ebuild
+++ b/dev-python/exam/exam-0.10.6.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
diff --git a/dev-python/pyxattr/pyxattr-0.7.2.ebuild b/dev-python/pyxattr/pyxattr-0.7.2.ebuild
index a826102f8e22..ad0e2ae17f8c 100644
--- a/dev-python/pyxattr/pyxattr-0.7.2.ebuild
+++ b/dev-python/pyxattr/pyxattr-0.7.2.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=7
diff --git a/dev-python/scandir/files/scandir-1.10.0-python3.9.patch b/dev-python/scandir/files/scandir-1.10.0-python3.9.patch
new file mode 100644
index 000000000000..c8683c1c6b9b
--- /dev/null
+++ b/dev-python/scandir/files/scandir-1.10.0-python3.9.patch
@@ -0,0 +1,62 @@
+https://github.com/benhoyt/scandir/commit/3396aa4155ffde8600a0e9ca50d5872569169b5d
+
+From 3396aa4155ffde8600a0e9ca50d5872569169b5d Mon Sep 17 00:00:00 2001
+From: Ben Hoyt <benhoyt@gmail.com>
+Date: Mon, 24 Jan 2022 08:44:07 +1300
+Subject: [PATCH] Add Python 3.10 to tests (#137)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fix PyStructSequence_UnnamedField build issues on Python 3.9/3.10
+
+_scandir.c:663:7: error: conflicting type qualifiers for ‘PyStructSequence_UnnamedField’
+ 663 | char *PyStructSequence_UnnamedField = "unnamed field";
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In file included from /usr/local/include/python3.10/Python.h:127,
+ from _scandir.c:14:
+/usr/local/include/python3.10/structseq.h:22:27: note: previous declaration of ‘PyStructSequence_UnnamedField’ was here
+ 22 | extern const char * const PyStructSequence_UnnamedField;
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Fixes https://github.com/benhoyt/scandir/pull/137
+---
+ _scandir.c | 10 +++++-----
+ scandir.py | 2 +-
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/_scandir.c b/_scandir.c
+index 6cc28c8..433483f 100644
+--- a/_scandir.c
++++ b/_scandir.c
+@@ -660,7 +660,7 @@ _pystat_fromstructstat(STRUCT_STAT *st)
+ return v;
+ }
+
+-char *PyStructSequence_UnnamedField = "unnamed field";
++static char *scandir_unnamed_field = "unnamed field";
+
+ PyDoc_STRVAR(stat_result__doc__,
+ "stat_result: Result from stat, fstat, or lstat.\n\n\
+@@ -681,7 +681,7 @@ static PyStructSequence_Field stat_result_fields[] = {
+ {"st_uid", "user ID of owner"},
+ {"st_gid", "group ID of owner"},
+ {"st_size", "total size, in bytes"},
+- /* The NULL is replaced with PyStructSequence_UnnamedField later. */
++ /* The NULL is replaced with scandir_unnamed_field later. */
+ {NULL, "integer time of last access"},
+ {NULL, "integer time of last modification"},
+ {NULL, "integer time of last change"},
+@@ -1817,9 +1817,9 @@ init_scandir(void)
+ if (!billion)
+ INIT_ERROR;
+
+- stat_result_desc.fields[7].name = PyStructSequence_UnnamedField;
+- stat_result_desc.fields[8].name = PyStructSequence_UnnamedField;
+- stat_result_desc.fields[9].name = PyStructSequence_UnnamedField;
++ stat_result_desc.fields[7].name = scandir_unnamed_field;
++ stat_result_desc.fields[8].name = scandir_unnamed_field;
++ stat_result_desc.fields[9].name = scandir_unnamed_field;
+ PyStructSequence_InitType(&StatResultType, &stat_result_desc);
+ structseq_new = StatResultType.tp_new;
+ StatResultType.tp_new = statresult_new;
diff --git a/dev-python/scandir/scandir-1.10.0-r3.ebuild b/dev-python/scandir/scandir-1.10.0-r3.ebuild
new file mode 100644
index 000000000000..61741835311b
--- /dev/null
+++ b/dev-python/scandir/scandir-1.10.0-r3.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+# Do NOT add Python 3.11 without verifying the C extension is actually built
+# and installed for it!
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit distutils-r1
+
+DESCRIPTION="A better directory iterator and faster os.walk()"
+HOMEPAGE="https://github.com/benhoyt/scandir"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-python3.9.patch
+)
+
+python_test() {
+ "${EPYTHON}" test/run_tests.py -v || die "tests failed under ${EPYTHON}"
+}