From 0a3c3e13b59e6e43fe9bfa6905b6256105f640d5 Mon Sep 17 00:00:00 2001 From: jackeyji Date: Fri, 22 Sep 2023 11:43:57 +0800 Subject: [PATCH] upgrade to 1.1.7 Signed-off-by: jackeyji --- python-lark-parser.spec | 27 +++++++++++++++++---------- python3.11.patch | 33 --------------------------------- sources | 2 +- 3 files changed, 18 insertions(+), 44 deletions(-) delete mode 100644 python3.11.patch diff --git a/python-lark-parser.spec b/python-lark-parser.spec index d9fe7d1..d7759a5 100644 --- a/python-lark-parser.spec +++ b/python-lark-parser.spec @@ -2,13 +2,11 @@ Summary: Lark is a modern general-purpose parsing library for Python Name: python-%{pypi_name} -Version: 0.9.0 -Release: 5%{?dist} +Version: 1.1.7 +Release: 1%{?dist} License: MIT Url: https://github.com/lark-parser/lark -Source0: https://files.pythonhosted.org/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.tar.gz - -Patch3000: python3.11.patch +Source0: https://github.com/lark-parser/lark/archive/%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch @@ -65,14 +63,20 @@ Features: - Unicode fully supported %prep -%autosetup -p1 -n %{pypi_name}-%{version} +%autosetup -p1 -n lark-%{version} + +# Fix wrong-file-end-of-line-encoding. +sed -i 's/\r$//' README.md examples/*.py + +%generate_buildrequires +%pyproject_buildrequires %build -%py3_build +%pyproject_wheel %install -%py3_install -rm -rfv %{buildroot}/%{python3_sitelib}/lark-stubs/ +%pyproject_install +%pyproject_save_files lark %check %{python3} -m tests @@ -80,10 +84,13 @@ rm -rfv %{buildroot}/%{python3_sitelib}/lark-stubs/ %files -n python3-%{pypi_name} %license LICENSE %doc README.md examples -%{python3_sitelib}/lark_parser-*.egg-info +%{python3_sitelib}/lark-*.dist-info %{python3_sitelib}/lark/ %changelog +* Fri Sep 22 2023 jackeyji - 1.1.7-1 +- upgrade to 1.1.7 + * Tue Sep 19 2023 OpenCloudOS Release Engineering - 0.9.0-5 - Rebuilt for python 3.11 diff --git a/python3.11.patch b/python3.11.patch deleted file mode 100644 index 59a9aed..0000000 --- a/python3.11.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7bbb353dd258905510289bda3de87a8354daca3c Mon Sep 17 00:00:00 2001 -From: Florian Bruhin -Date: Tue, 26 Apr 2022 13:37:12 +0200 -Subject: [PATCH] Adjust imports for Python 3.11 - -sre_parse and sre_constants are deprecated in 3.11, see https://github.com/python/cpython/issues/91308 ---- - lark/utils.py | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/lark/utils.py b/lark/utils.py -index 36f50d1..29d998b 100644 ---- a/lark/utils.py -+++ b/lark/utils.py -@@ -173,8 +173,13 @@ except ImportError: - import sys, re - Py36 = (sys.version_info[:2] >= (3, 6)) - --import sre_parse --import sre_constants -+if sys.version_info >= (3, 11): -+ import re._parser as sre_parse -+ import re._constants as sre_constants -+else: -+ import sre_parse -+ import sre_constants -+ - categ_pattern = re.compile(r'\\p{[A-Za-z_]+}') - def get_regexp_width(expr): - if regex: --- -2.35.3 - diff --git a/sources b/sources index 68a7fb9..d1ceeb2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lark-parser-0.9.0.tar.gz) = e22f35666aa39cc504eaf48950170bd44eb9d9e15ae2f13d47a4950576be31f1bbabf799847b02e5ee22c0f96fb75c5256c8e4a4aa195caa830444f5b91d6852 +SHA512 (lark-parser-1.1.7.tar.gz) = 2f57eb4e99e8c378831205d9dd6ccb889b46dede53dd9256027351612997ea0e974a696dbf7ad3e6959a1efca9c8a2360ab03bac1f5172ca2414656bb928142f -- Gitee