diff --git a/python-platformdirs.spec b/python-platformdirs.spec index d658b91..9e3604c 100644 --- a/python-platformdirs.spec +++ b/python-platformdirs.spec @@ -1,10 +1,12 @@ +%bcond_without tests + %global srcname platformdirs %global common_description %{expand: A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".} Name: python-%{srcname} -Version: 2.5.1 +Version: 2.5.2 Release: 1%{?dist} Summary: Python module for determining appropriate platform-specific dirs License: MIT @@ -19,6 +21,8 @@ BuildArch: noarch %package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-devel +# RHBZ#1712140, RHBZ#2076994 +BuildRequires: pyproject-rpm-macros >= 1.2.0 %description -n python3-%{srcname} %{common_description} @@ -26,14 +30,13 @@ BuildRequires: python3-devel %prep %autosetup -n %{srcname}-%{version} -# No need to measure coverage -sed -i '/pytest-cov/d' setup.cfg + +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters +sed -r -i '/^[[:blank:]]*"pytest-cov\b/d' pyproject.toml %generate_buildrequires -# Upstream uses tox, but we don't use it, to avoid a build dependency loop -# platformdirs <- virtualenv <- tox -%pyproject_buildrequires -x test +%pyproject_buildrequires -w %{?with_tests:-x test} %build @@ -46,7 +49,13 @@ sed -i '/pytest-cov/d' setup.cfg %check +%if %{with tests} +# Upstream uses tox, but we don’t use it, to avoid a build dependency loop +# platformdirs <- virtualenv <- tox %pytest +%else +%pyproject_check_import +%endif %files -n python3-%{srcname} -f %{pyproject_files} @@ -55,6 +64,10 @@ sed -i '/pytest-cov/d' setup.cfg %changelog +* Thu Apr 21 2022 Benjamin A. Beasley - 2.5.2-1 +- Update to 2.5.2; accommodate upstream’s switch to hatchling build backend +- Add a build conditional for the tests + * Tue Mar 22 2022 Benjamin A. Beasley - 2.5.1-1 - Update to 2.5.1 (close RHBZ#2007878) diff --git a/sources b/sources index f116f03..5a2872c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (platformdirs-2.5.1.tar.gz) = 44e31df3f76475de2db4ca0e998d0540b87d7eb514fa139b80f26c2217bf7040d725ea1b89751f8660f0c41a59f63a9efc8c70919d0db8a1ce479821c7051e73 +SHA512 (platformdirs-2.5.2.tar.gz) = b0b0dee3ac4176e64f302b3d34e253b2e33784160051b9dafb563962e597df75f2c9f714c050d5bdeb1769a1f56c2878a47e9a42361596e287ae7b2afe870370