|
|
|
@ -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 <code@musicinmybrain.net> - 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 <code@musicinmybrain.net> - 2.5.1-1
|
|
|
|
|
- Update to 2.5.1 (close RHBZ#2007878)
|
|
|
|
|
|
|
|
|
|