## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: python-typeguard Version: 2.13.3 Release: %autorelease Summary: Run-time type checker for Python # SPDX License: MIT URL: https://github.com/agronholm/typeguard Source0: %{pypi_source typeguard} BuildArch: noarch BuildRequires: python3-devel %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} %description -n python3-typeguard %{common_description} %prep %autosetup -n typeguard-%{version} # Normally, we should skip linters and typecheckers # (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters). # In this case, it could make sense to allow the tests to depend on mypy for # this package since it is itself a typechecker, and some tests seem to want to # compare results against mypy. However, the tests are brittle in that they # depend on the exact messages produced by a particular version of mypy, which # makes them unsuitable for downstream testing. sed -r -i '/\b(mypy)\b/d' setup.cfg # In future versions, with project metadata migrated to pyproject.toml: # sed -r -i 's/^([[:blank:]]*)(.(mypy))\b/\1# \2/' \ # pyproject.toml %generate_buildrequires %pyproject_buildrequires -x test %build %pyproject_wheel %install %pyproject_install %pyproject_save_files typeguard %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. k="${k-}${k+ and }not test_positive" k="${k-}${k+ and }not test_negative" %pytest -k "${k-}" %files -n python3-typeguard -f %{pyproject_files} # pyproject_files handles LICENSE; verify with “rpm -qL -p …” %doc README.rst %changelog ## START: Generated by rpmautospec * Tue Aug 16 2022 Benjamin A. Beasley - 2.13.3-4 - Port to pyproject-rpm-macros - Clean up obsolete macros and stale dependencies/BR’s * Fri Jul 22 2022 Fedora Release Engineering - 2.13.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 2.13.3-2 - Rebuilt for Python 3.11 * Sat Jan 29 2022 Michel Alexandre Salim - 2.13.3-1 - Update to 2.13.3 (fixes: rhbz#2025745) * Fri Jan 21 2022 Fedora Release Engineering - 2.13.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Nov 07 2021 Davide Cavalca - 2.13.0-1 - Update to 2.13.0; Fixes: RHBZ#2012648 * Tue Jun 08 2021 Davide Cavalca - 2.12.1-1 - Update to 2.12.1 - Gate out broken tests * Fri Jun 04 2021 Python Maint - 2.10.0-4 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 2.10.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Jan 14 2021 Michel Alexandre Salim - 2.10.0-2 - Fix egginfo on Fedora < 33 so the auto-generated Provides has the right version * Mon Oct 26 2020 Christopher Brown - 2.10.0-1 - Update to 2.10.0 - Remove conditional as python 3.9 now supported * Mon Jul 6 2020 Christopher Brown - 2.9.1-1 - Fix description - Remove egg-info in prep - Add conditional for python 3.9 * Wed May 27 2020 Christopher Brown - 2.7.1-2 - Remove dep generator - Simplify description - Fix file glob * Wed May 6 2020 Christopher Brown - 2.7.1-1 - Initial package at 2.7.1 ## END: Generated by rpmautospec