15
0
forked from pool/python-parso

- 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
This commit is contained in:
2023-10-03 02:36:51 +00:00
committed by Git OBS Bridge
parent d0e2c48e25
commit b811d419fc
2 changed files with 13 additions and 5 deletions

View File

@@ -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