Matej Cepl 2024-09-06 21:06:51 +00:00 committed by Git OBS Bridge
parent 91606b508b
commit 87e7d1e60c
2 changed files with 23 additions and 4 deletions

View File

@ -25,18 +25,21 @@ License: MIT
Group: Development/Languages/Python
URL: https://github.com/jaraco/inflect
Source0: https://files.pythonhosted.org/packages/source/i/inflect/inflect-%{version}.tar.gz
# PATCH-FIX-UPSTREAM typing_extensions-version.patch bsc#[0-9]+ mcepl@suse.com
# Correct handling of the potential missing Annotated type
Patch0: typing_extensions-version.patch
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module more-itertools}
BuildRequires: %{python_module more-itertools >= 8.5.0}
BuildRequires: %{python_module pip}
Requires: %{python_module typeguard}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module typeguard}
BuildRequires: %{python_module typing_extensions}
BuildRequires: %{python_module typing_extensions if %python-base < 3.9}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: more-itertools
Requires: %{python_module typeguard}
Requires: python-more-itertools >= 8.5.0
BuildArch: noarch
%python_subpackages

View File

@ -0,0 +1,16 @@
---
inflect/compat/py38.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/inflect/compat/py38.py
+++ b/inflect/compat/py38.py
@@ -1,7 +1,7 @@
import sys
-if sys.version_info >= (3, 9):
+try:
from typing import Annotated
-else: # pragma: no cover
+except ImportError:
from typing_extensions import Annotated # noqa: F401