diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
commit | 5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch) | |
tree | 66e860a5099bcad013f1cf667255dc372a7c11b3 /dev-python/regex | |
parent | 7218e1b46bceac05841e90472501742d905fb3fc (diff) |
gentoo resync : 20.03.2021
Diffstat (limited to 'dev-python/regex')
-rw-r--r-- | dev-python/regex/Manifest | 5 | ||||
-rw-r--r-- | dev-python/regex/files/regex-2019.11.1-pypy.patch | 221 | ||||
-rw-r--r-- | dev-python/regex/regex-2020.4.4-r1.ebuild | 8 | ||||
-rw-r--r-- | dev-python/regex/regex-2021.3.17.ebuild | 30 |
4 files changed, 35 insertions, 229 deletions
diff --git a/dev-python/regex/Manifest b/dev-python/regex/Manifest index c86761186d90..d3567c9cf1c7 100644 --- a/dev-python/regex/Manifest +++ b/dev-python/regex/Manifest @@ -1,4 +1,5 @@ -AUX regex-2019.11.1-pypy.patch 10520 BLAKE2B 7ba3b494c1562475ab3e5b996083bd75e2273104dd0e16d44a4162b5c6e994aa6ea109a05b1e338b0fc9e39be28edf193ca52d2642ac6bd57549d9dfde0825cc SHA512 145c7b530c807dc4a331a7c48a90a56418be1ab1cdd3072c554607f579836acf3199c8ff6dd56f74ef221dd24bf7ae390bde932f5d4a00761ce2e23dc2af1f4e DIST regex-2020.4.4.tar.gz 695848 BLAKE2B 0dc41e1f1464014bcdc10b7209f7ac0506aeb6a3e09c16b4ca302619aaa8271cb06138627e8ed7f64ff80cf661eb83f07b4514828cf7fa94f21211fc42ae9f7c SHA512 95eadaaffaf87a19b31024ad3cff670d34a31de8b9be430fc276a533a584203842d1634b66a346c4aaecf2407b973bb1ae9c8ee8b48785d03bd5e45a67a271a9 -EBUILD regex-2020.4.4-r1.ebuild 896 BLAKE2B fe084a1cda19b8e89f043a77f946acceb06bb0373973a5fb8b02445d0b5c2789b81e2025b58f1190a816f574c0a86197f273b2a17a0b09b0b3c8ec1b0ba025c7 SHA512 133fd4da4e67a997a47a2ea8f918639382569ed5d7ce7b1a02830ea7fddd28ac72b6365132aa8580c2637bd8f1ea86da856d2953ab209aab12fd04725fe1bd11 +DIST regex-2021.3.17.tar.gz 694380 BLAKE2B 9388038519cc4c11a332dd1fc9b4f742af3f69453890e148971105bb4a5e73f562f7eaa4e2533548066e87aade2f64b507a6e65cd4b0070a26733fa2675190ea SHA512 3eb5e307e5e3656ea88de9f762522412192c687d0f0a4175dd1c605c9142386b98035b177f73c8c0daf10e629e9a3a3cf8851a25cbe6f10a018ba252cb348b1b +EBUILD regex-2020.4.4-r1.ebuild 835 BLAKE2B d3fbf85b42a50969b970a451ab638571f739a7382c6882f795aa8c95b96fe6824c9d7bb64822427bdacadb7cce5552f3ca0991b6c3958678ab048498d174bfb6 SHA512 4c50797036036552cf01a712a90b410f7ffe523e46dc0f61230a205df9f8e86b191aa831cd59ee6948560d04f7678fdbd67f85003cf904371e06d74e0f536367 +EBUILD regex-2021.3.17.ebuild 812 BLAKE2B 52e76a296d5e299194b7f45557f1866135c56ca475eb56594eab5af17160d4a64ded5dc9148525642593711cafb37dc13482807827f02e79c888073d315ac834 SHA512 a8847f4ead0b698cf140bf674c9a8263bcd5a8c0a2a6df5b059c73c6890e4175aa56028b7350d35b9686fc70ad83e1a2be1843e5bf7d1484dc8a0c8a10379ec7 MISC metadata.xml 384 BLAKE2B 4928f66b54b5e4de6a8b913207ec6e46c124e55510eac304a7fd46c6ca63cce60704757e9289bf35d2d58e9ddcd4aa98d751a079c79f09dda9206553096e0561 SHA512 3db0a8abe7036cd9d0fd8b1450598436dbb30581806380ad51c3d0f49d129325aba1bad9700d14adffc7cfd199c4ec3377e6eb0225244bfc82368bbb50548e07 diff --git a/dev-python/regex/files/regex-2019.11.1-pypy.patch b/dev-python/regex/files/regex-2019.11.1-pypy.patch deleted file mode 100644 index f4bfade16eb9..000000000000 --- a/dev-python/regex/files/regex-2019.11.1-pypy.patch +++ /dev/null @@ -1,221 +0,0 @@ -diff -ur regex-2019.11.1.orig/regex_2/_regex.c regex-2019.11.1/regex_2/_regex.c ---- regex-2019.11.1.orig/regex_2/_regex.c 2019-11-23 12:25:18.247350004 -0800 -+++ regex-2019.11.1/regex_2/_regex.c 2019-11-23 14:04:38.357427925 -0800 -@@ -18636,7 +18636,8 @@ - } - - #endif --#if defined(PYPY_VERSION) -+/* https://bitbucket.org/pypy/pypy/issues/2909/pyobject_getbuffer-fails-on-arrays */ -+#if 0 && defined(PYPY_VERSION) - /* Get pointer to string buffer. */ - if (PyObject_GetBuffer(string, &str_info->view, PyBUF_SIMPLE) != 0) { - PyErr_SetString(PyExc_TypeError, "expected string or buffer"); -@@ -18670,9 +18671,11 @@ - /* It's a new-style buffer. */ - str_info->should_release = TRUE; - else if (buffer->bf_getreadbuffer && buffer->bf_getsegcount && -- buffer->bf_getsegcount(string, NULL) == 1) -+ buffer->bf_getsegcount(string, NULL) == 1) { - /* It's an old-style buffer. */ -+ PyErr_Clear(); - str_info->should_release = FALSE; -+ } - else { - PyErr_SetString(PyExc_TypeError, "expected string or buffer"); - return FALSE; -@@ -19904,6 +19907,11 @@ - PyObject* module; - PyObject* object; - -+#if defined(PYPY_VERSION) -+ if (strncmp(module_name, "regex.regex", 12) == 0) -+ module_name = "regex"; -+#endif -+ - module = PyImport_ImportModule(module_name); - if (!module) - return NULL; -diff -ur regex-2019.11.1.orig/regex_2/test_regex.py regex-2019.11.1/regex_2/test_regex.py ---- regex-2019.11.1.orig/regex_2/test_regex.py 2019-11-23 12:25:18.249349992 -0800 -+++ regex-2019.11.1/regex_2/test_regex.py 2019-11-23 14:08:49.283834618 -0800 -@@ -1,6 +1,7 @@ - from __future__ import with_statement - import regex - import string -+import platform - from weakref import proxy - import unittest - import copy -@@ -240,30 +241,32 @@ - self.assertEqual(regex.sub('x', r'\400', 'x'), "\x00") - self.assertEqual(regex.sub('x', r'\777', 'x'), "\xFF") - -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\1', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\8', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\9', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\11', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\18', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\1a', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\90', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\99', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\118', 'x')) # r'\11' + '8' -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\11a', 'x')) -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\181', 'x')) # r'\18' + '1' -- self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -- regex.sub('x', r'\800', 'x')) # r'\80' + '0' -+ # no idea what is broken here... -+ if 'pypy' not in platform.python_implementation().lower(): -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\1', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\8', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\9', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\11', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\18', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\1a', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\90', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\99', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\118', 'x')) # r'\11' + '8' -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\11a', 'x')) -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\181', 'x')) # r'\18' + '1' -+ self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: -+ regex.sub('x', r'\800', 'x')) # r'\80' + '0' - - # In Python 2.3 (etc), these loop endlessly in sre_parser.py. - self.assertEqual(regex.sub('(((((((((((x)))))))))))', r'\11', 'x'), -diff -ur regex-2019.11.1.orig/regex_3/test_regex.py regex-2019.11.1/regex_3/test_regex.py ---- regex-2019.11.1.orig/regex_3/test_regex.py 2019-11-23 12:25:18.253349967 -0800 -+++ regex-2019.11.1/regex_3/test_regex.py 2019-11-23 14:19:32.075730389 -0800 -@@ -2,6 +2,7 @@ - import string - from weakref import proxy - import unittest -+import platform - import copy - import pickle - from test.support import run_unittest -@@ -562,6 +563,7 @@ - self.assertEqual(regex.match(r"(a)(?!\s\1)", "a b")[1], 'a') - self.assertEqual(regex.match(r"(a)(?!\s(abc|a))", "a b")[1], 'a') - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_ignore_case(self): - self.assertEqual(regex.match("abc", "ABC", regex.I)[0], 'ABC') - self.assertEqual(regex.match(b"abc", b"ABC", regex.I)[0], b'ABC') -@@ -588,6 +590,7 @@ - self.assertEqual(bool(regex.match(r"(?i)n\xE3o", "N\xC3O")), True) - self.assertEqual(bool(regex.match(r"(?i)s", "\u017F")), True) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_case_folding(self): - self.assertEqual(regex.search(r"(?fi)ss", "SS").span(), (0, 2)) - self.assertEqual(regex.search(r"(?fi)SS", "ss").span(), (0, 2)) -@@ -687,6 +690,7 @@ - self.assertEqual(regex.search(r"\s(b)", " b")[1], 'b') - self.assertEqual(regex.search(r"a\s", "a ")[0], 'a ') - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_re_escape(self): - p = "" - self.assertEqual(regex.escape(p), p) -@@ -729,6 +733,7 @@ - self.assertEqual(repr(type(regex.compile('^pattern$', flag))), - self.PATTERN_CLASS) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_sre_character_literals(self): - for i in [0, 8, 16, 32, 64, 127, 128, 255]: - self.assertEqual(bool(regex.match(r"\%03o" % i, chr(i))), True) -@@ -745,6 +750,7 @@ - self.assertRaisesRegex(regex.error, self.INVALID_GROUP_REF, lambda: - regex.match(r"\911", "")) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_sre_character_class_literals(self): - for i in [0, 8, 16, 32, 64, 127, 128, 255]: - self.assertEqual(bool(regex.match(r"[\%03o]" % i, chr(i))), True) -@@ -887,6 +893,7 @@ - self.assertEqual(next(it).span(), (4, 4)) - self.assertRaises(StopIteration, lambda: next(it)) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_empty_array(self): - # SF buf 1647541. - import array -@@ -969,6 +976,7 @@ - self.assertRaisesRegex(ValueError, self.MIXED_FLAGS, lambda: - regex.compile(r'(?au)\w')) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_ascii_and_unicode_flag(self): - # String patterns. - for flags in (0, regex.UNICODE): -@@ -1013,6 +1021,7 @@ - if not (m0 and m1 and m0[:] == m1[:]): - self.fail("Failed") - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_properties(self): - self.assertEqual(regex.match(b'(?ai)\xC0', b'\xE0'), None) - self.assertEqual(regex.match(br'(?ai)\xC0', b'\xE0'), None) -@@ -1672,6 +1681,7 @@ - self.assertEqual(regex.match(r"(?|(?<a>a)(?<b>b)|(c)(?<a>d))(e)", - "cde").capturesdict(), {"a": ["c", "d"], "b": []}) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_set(self): - self.assertEqual(regex.match(r"[a]", "a").span(), (0, 1)) - self.assertEqual(regex.match(r"(?i)[a]", "A").span(), (0, 1)) -@@ -1749,6 +1759,7 @@ - self.assertEqual(regex.findall(r"(?V1)[\w--a]","abc"), ["b", "c"]) - self.assertEqual(regex.findall(r"(?iV1)[\w--a]","abc"), ["b", "c"]) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_various(self): - tests = [ - # Test ?P< and ?P= extensions. -@@ -2578,6 +2589,7 @@ - self.fail("{} not matching {}".format(ascii(ch1), - ascii(ch2))) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_named_lists(self): - options = ["one", "two", "three"] - self.assertEqual(regex.match(r"333\L<bar>444", "333one444", -@@ -2975,6 +2987,7 @@ - self.assertEqual(bool(regex.fullmatch(r"(?r)abc", "xabcy", pos=1, - endpos=4)), True) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_issue_18468(self): - # Applies only after Python 3.4 for compatibility with re. - if (sys.version_info.major, sys.version_info.minor) < (3, 4): -@@ -4199,6 +4212,7 @@ - 'x right').capturesdict(), {'mydef': ['right'], 'wrong': [], 'right': - ['right']}) - -+ @unittest.skipIf('pypy' in platform.python_implementation().lower(), "broken on pypy") - def test_fuzzy_ext(self): - self.assertEquals(bool(regex.fullmatch(r'(?r)(?:a){e<=1:[a-z]}', 'e')), - True) diff --git a/dev-python/regex/regex-2020.4.4-r1.ebuild b/dev-python/regex/regex-2020.4.4-r1.ebuild index ab7ea301540f..f3243ad82643 100644 --- a/dev-python/regex/regex-2020.4.4-r1.ebuild +++ b/dev-python/regex/regex-2020.4.4-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7..9} pypy3 ) +PYTHON_COMPAT=( python3_{7..9} ) inherit distutils-r1 flag-o-matic @@ -16,10 +16,6 @@ SLOT="0" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-macos" IUSE="doc" -PATCHES=( - "${FILESDIR}/regex-2019.11.1-pypy.patch" -) - python_test() { distutils_install_for_testing diff --git a/dev-python/regex/regex-2021.3.17.ebuild b/dev-python/regex/regex-2021.3.17.ebuild new file mode 100644 index 000000000000..613b0c430603 --- /dev/null +++ b/dev-python/regex/regex-2021.3.17.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit distutils-r1 flag-o-matic + +DESCRIPTION="Alternative regular expression module to replace re" +HOMEPAGE="https://bitbucket.org/mrabarnett/mrab-regex" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +IUSE="doc" + +python_test() { + pushd "${BUILD_DIR}/lib" > /dev/null || die + "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}" + popd > /dev/null || die +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/Features.html ) + local DOCS=( README.rst docs/*.rst ) + + distutils-r1_python_install_all +} |