160412e
Name:           python-typeguard
86e136c
Version:        4.3.0
d6c045b
Release:        %autorelease
Christopher Brown 34a7cd4
Summary:        Run-time type checker for Python
160412e
160412e
# SPDX
Christopher Brown 34a7cd4
License:        MIT
160412e
URL:            https://github.com/agronholm/typeguard
cd24e29
Source:         %{pypi_source typeguard}
160412e
Christopher Brown 34a7cd4
BuildArch:      noarch
Christopher Brown 34a7cd4
160412e
BuildRequires:  python3-devel
4dd9139
BuildRequires:  tomcli
160412e
160412e
%global common_description %{expand:
160412e
This library provides run-time type checking for functions defined with PEP 484
160412e
argument (and return) type annotations.}
Christopher Brown 34a7cd4
160412e
%description %{common_description}
Christopher Brown 34a7cd4
Christopher Brown 34a7cd4
160412e
%package -n python3-typeguard
160412e
Summary:        %{summary}
Christopher Brown 34a7cd4
6631a26
# Removed for F41:
6631a26
Obsoletes:      python-typeguard-doc < 4.2.1-2
Christopher Brown 34a7cd4
6631a26
%description -n python3-typeguard %{common_description}
0820aa7
0820aa7
Christopher Brown 34a7cd4
%prep
135186e
%autosetup -n typeguard-%{version}
160412e
4dd9139
# Downstream-only: do not treat warnings in tests as errors
4dd9139
#
4dd9139
# This makes sense for upstream development and CI, but is too strict for
4dd9139
# distribution packaging.
4dd9139
tomcli set pyproject.toml lists delitem \
4dd9139
    'tool.pytest.ini_options.filterwarnings' error
d3cf76c
9885e59
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
4dd9139
tomcli set pyproject.toml lists delitem --type regex \
4dd9139
    'project.optional-dependencies.test' 'coverage\b.*'
9885e59
# Note that we *do* need mypy for some of the tests; it is not just a
9885e59
# “typechecking linter.”
9885e59
160412e
160412e
%generate_buildrequires
ecafd47
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
6631a26
%pyproject_buildrequires -x test
160412e
Christopher Brown 34a7cd4
Christopher Brown 34a7cd4
%build
ecafd47
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
160412e
%pyproject_wheel
160412e
Christopher Brown 34a7cd4
Christopher Brown 34a7cd4
%install
ecafd47
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
160412e
%pyproject_install
6c0355a
%pyproject_save_files -l typeguard
160412e
Christopher Brown 34a7cd4
Christopher Brown 34a7cd4
%check
553b2b2
%pytest -v -rs
160412e
160412e
160412e
%files -n python3-typeguard -f %{pyproject_files}
Christopher Brown 34a7cd4
%doc README.rst
160412e
Christopher Brown 34a7cd4
Christopher Brown 34a7cd4
%changelog
d6c045b
%autochangelog