commit 8df2c1809a2b4a152bafa03268bd609613c7e79f Author: tigro Date: Sat Jan 4 18:02:24 2025 +0300 import python-dirty-equals-0.8.0-1.el10 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..98f2d9d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/dirty_equals-0.8.0.tar.gz diff --git a/.python-dirty-equals.metadata b/.python-dirty-equals.metadata new file mode 100644 index 0000000..1029945 --- /dev/null +++ b/.python-dirty-equals.metadata @@ -0,0 +1 @@ +6adfe5360fd81defa471448621cb6a94c8698684 SOURCES/dirty_equals-0.8.0.tar.gz diff --git a/SPECS/python-dirty-equals.spec b/SPECS/python-dirty-equals.spec new file mode 100644 index 0000000..1923dcc --- /dev/null +++ b/SPECS/python-dirty-equals.spec @@ -0,0 +1,144 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.7.1) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + 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 0 + +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 +* Sat Jan 04 2025 Arkady L. Shane - 0.8.0-1 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* 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