2023-06-06 17:07:34 +08:00
|
|
|
|
Name: python-typeguard
|
2024-11-20 16:58:43 +08:00
|
|
|
|
Version: 4.4.1
|
2023-06-06 17:07:34 +08:00
|
|
|
|
Release: 1
|
|
|
|
|
|
Summary: Run-time type checker for Python
|
|
|
|
|
|
|
|
|
|
|
|
# SPDX
|
|
|
|
|
|
License: MIT
|
|
|
|
|
|
URL: https://github.com/agronholm/typeguard
|
|
|
|
|
|
Source0: %{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
%global common_description %{expand:
|
|
|
|
|
|
This library provides run-time type checking for functions defined with PEP 484
|
|
|
|
|
|
argument (and return) type annotations.}
|
|
|
|
|
|
|
|
|
|
|
|
%description %{common_description}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-typeguard
|
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
2024-11-20 16:58:43 +08:00
|
|
|
|
BuildRequires: python3-devel python3-pip python3-wheel
|
2023-06-06 17:07:34 +08:00
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
|
BuildRequires: python3-typing-extensions
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-typeguard %{common_description}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
%autosetup -n typeguard-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
2024-11-20 16:58:43 +08:00
|
|
|
|
%pyproject_build
|
2023-06-06 17:07:34 +08:00
|
|
|
|
|
|
|
|
|
|
%install
|
2024-11-20 16:58:43 +08:00
|
|
|
|
%pyproject_install
|
2023-06-06 17:07:34 +08:00
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
|
# The test_cached_module test fails to find a byte-compiled .pyc module where
|
|
|
|
|
|
# it is expecting it. Manually byte-compiling the tests (%%py_byte_compile
|
|
|
|
|
|
# %%{python3} tests) doesn’t help. This is almost certainly specific to the RPM
|
|
|
|
|
|
# build environment and not a real bug.
|
|
|
|
|
|
#
|
|
|
|
|
|
# See also:
|
|
|
|
|
|
# 2.13.3: pytest is failing in three units
|
|
|
|
|
|
# https://github.com/agronholm/typeguard/issues/248
|
|
|
|
|
|
k="${k-}${k+ and }not test_cached_module"
|
|
|
|
|
|
|
|
|
|
|
|
# Tests comparing against mypy output are too brittle—tightly coupled to
|
|
|
|
|
|
# particular mypy versions—so we skip them downstream. (Plus, there is no
|
|
|
|
|
|
# python3-mypy in EPEL8.)
|
|
|
|
|
|
k="${k-}${k+ and }not test_positive"
|
|
|
|
|
|
k="${k-}${k+ and }not test_negative"
|
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
|
|
|
|
|
%__python3 -m pytest -k "${k-}"
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-typeguard
|
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
%doc README.rst
|
|
|
|
|
|
|
|
|
|
|
|
%{python3_sitelib}/typeguard/
|
2024-11-20 16:58:43 +08:00
|
|
|
|
%{python3_sitelib}/typeguard-0.0.0.dist-info/
|
2023-06-06 17:07:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-11-20 16:58:43 +08:00
|
|
|
|
* Wed Nov 20 2024 sqfu <dev01203@linx-info.com> - 4.4.1-1
|
|
|
|
|
|
- update to 4.4.1
|
|
|
|
|
|
|
2023-06-06 17:07:34 +08:00
|
|
|
|
* Sun May 7 2023 will_niutao <niutao2@huawei.com> - 2.13.3-1
|
|
|
|
|
|
- Init for openEuler
|
|
|
|
|
|
|