From b811d419fc212693d88595c2ccbe415e58c86e4c677dbe0b81205d9d0f0d7977 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 3 Oct 2023 02:36:51 +0000 Subject: [PATCH] - Switch to pyproject macros. - Also skip the recalcitrant test under Python 3.12. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parso?expand=0&rev=44 --- python-parso.changes | 6 ++++++ python-parso.spec | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/python-parso.changes b/python-parso.changes index 2d0f87a..bee06b5 100644 --- a/python-parso.changes +++ b/python-parso.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 3 02:36:16 UTC 2023 - Steve Kowalik + +- Switch to pyproject macros. +- Also skip the recalcitrant test under Python 3.12. + ------------------------------------------------------------------- Fri Apr 21 12:29:02 UTC 2023 - Dirk Müller diff --git a/python-parso.spec b/python-parso.spec index 2421790..b5f8f69 100644 --- a/python-parso.spec +++ b/python-parso.spec @@ -16,8 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 %{?sle15_python_module_pythons} Name: python-parso Version: 0.8.3 @@ -27,8 +25,10 @@ License: MIT AND Python-2.0 URL: https://github.com/davidhalter/parso Source0: https://files.pythonhosted.org/packages/source/p/parso/parso-%{version}.tar.gz Patch1: https://github.com/davidhalter/parso/commit/cf5969d7a109798adbf9538d70e92138f077d700.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest >= 3.0.7} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -50,21 +50,23 @@ tree. %autosetup -p1 -n parso-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # Python 3.10 has deviating exception messages -- gh#davidhalter/parso#192 python310_args=("-k" "not test_python_exception_matches") +# Python 3.12 also changes how f-strings are parsed +python312_args=("-k" "not test_python_exception_matches") %pytest "${$python_args[@]}" %files %{python_files} %license LICENSE.txt %doc AUTHORS.txt CHANGELOG.rst README.rst -%{python_sitelib}/parso-%{version}-py*.egg-info +%{python_sitelib}/parso-%{version}.dist-info %{python_sitelib}/parso/ %changelog