## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 # Break a circular build dependency with python-pydantic %bcond bootstrap 1 Name: python-dirty-equals Version: 0.8.0 Release: %autorelease Summary: Doing dirty (but extremely useful) things with equals # SPDX License: MIT URL: https://github.com/samuelcolvin/dirty-equals Source: %{pypi_source dirty_equals} BuildArch: noarch BuildRequires: python3-devel %global common_description %{expand: The dirty-equals Python library (mis)uses the __eq__ method to make python code (generally unit tests) more declarative and therefore easier to read and write. You can use dirty-equals in whatever context you like, but it comes into its own when writing unit tests for applications where you’re commonly checking the response to API calls and the contents of a database.} %description %{common_description} %package -n python3-dirty-equals Summary: %{summary} %description -n python3-dirty-equals %{common_description} %if %{without bootstrap} %pyproject_extras_subpkg -n python3-dirty-equals pydantic %endif %prep %autosetup -n dirty_equals-%{version} # Patch out coverage analysis dependencies # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters # # Patch out pytest-pretty, which is purely cosmetic # # Patch out pytest-examples, which would enable tests in tests/test_docs.py, # but is not yet packaged. sed -r 's/^(coverage|pytest-(pretty|examples))/# \1/' requirements/tests.in | tee requirements/tests-filtered.txt # Erroring on DeprecationWarnings makes sense upstream, but is probably too # strict for distribution packaging. # # This specifically works around: # # DeprecationWarning for datetime.utcfromtimestamp() in Python 3.12 # https://github.com/samuelcolvin/dirty-equals/issues/71 sed -r -i 's/^filterwarnings = "error"$/# &/' pyproject.toml %generate_buildrequires %pyproject_buildrequires %{?!with_bootstrap:-x pydantic} requirements/tests-filtered.txt %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l dirty_equals %check # Tests in this module require pytest-examples; see %%prep for notes on this. ignore="${ignore-} --ignore=tests/test_docs.py" %if %{with bootstrap} # Imports in this module require Pydantic. ignore="${ignore-} --ignore=tests/test_other.py" %endif # Some tests require TZ == UTC; see the “test” target in the Makefile TZ=UTC %pytest -v ${ignore-} %files -n python3-dirty-equals -f %{pyproject_files} %doc README.md %changelog ## START: Generated by rpmautospec * Thu Dec 26 2024 Benjamin A. Beasley - 0.8.0-2 - Bootstrap for EPEL10 * Fri Aug 16 2024 Benjamin A. Beasley - 0.8.0-1 - Update to 0.8.0 (close RHBZ#2304719) * Fri Jul 19 2024 Fedora Release Engineering - 0.7.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 29 2024 Python Maint - 0.7.1-8 - Rebuilt for Python 3.13 * Fri Jun 07 2024 Python Maint - 0.7.1-7 - Bootstrap for Python 3.13 * Tue Jan 23 2024 Benjamin A. Beasley - 0.7.1-5 - Add a bootstrap conditional - Helps break a build dependency loop with python-pydantic * Mon Jan 22 2024 Fedora Release Engineering - 0.7.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Dec 17 2023 Benjamin A. Beasley - 0.7.1-2 - Assert that %%pyproject_files contains a license file * Tue Nov 14 2023 Benjamin A. Beasley - 0.7.1-1 - Update to 0.7.1 (close RHBZ#2249638) * Mon Sep 25 2023 Benjamin A. Beasley - 0.7.0-2 - Skip failing URL tests when Pydantic is v2 * Sat Sep 16 2023 Benjamin A. Beasley - 0.7.0-1 - Update to 0.7.0 - Backport commit 9ea7e27 “fix pydantic version checking” * Fri Jul 21 2023 Fedora Release Engineering - 0.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jun 30 2023 Benjamin A. Beasley - 0.6.0-1 - Initial package (close RHBZ#2218306) ## END: Generated by rpmautospec