update to 2.4.0 (rhbz#2088759)
Replace manual BuildRequires with automatic python build-dependency generator. This also requires replacing %py3_build/%py3_install with the more modern %pyproject_wheel/%pyproject_install macros. Make use of %pyproject_save_files and %pyproject_files in the process, to ensure we keep up with any future changes in the python deployment process. Note that %pyproject_save_files includes `%license COPYING` so we don't need to list it separately. Make test dependencies conditional on `--with tests` (which is the default). While here, re-order the BuildRequires and Requires sections.
This commit is contained in:
parent
4cc3a95149
commit
5e52b632f1
48
rpmlint.spec
48
rpmlint.spec
@ -2,7 +2,7 @@
|
|||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
|
|
||||||
Name: rpmlint
|
Name: rpmlint
|
||||||
Version: 2.3.0
|
Version: 2.4.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Tool for checking common errors in RPM packages
|
Summary: Tool for checking common errors in RPM packages
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
@ -17,26 +17,22 @@ Source5: warn-on-functions.toml
|
|||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: %{py3_dist setuptools}
|
|
||||||
BuildRequires: %{py3_dist pybeam}
|
|
||||||
BuildRequires: %{py3_dist pyxdg}
|
|
||||||
BuildRequires: %{py3_dist rpm}
|
|
||||||
BuildRequires: %{py3_dist toml}
|
|
||||||
BuildRequires: %{py3_dist zstandard}
|
|
||||||
Requires: devscripts-checkbashisms, dash, rpm-build
|
|
||||||
# Technically works without it, but results are better with it.
|
|
||||||
Requires: /usr/bin/appstream-util
|
|
||||||
# E: fatal error while reading ...: [Errno 2] No such file or directory: 'desktop-file-validate'
|
|
||||||
Requires: /usr/bin/desktop-file-validate
|
|
||||||
Requires: %{py3_dist pyenchant}
|
|
||||||
# tests
|
# tests
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: dash
|
||||||
|
BuildRequires: devscripts-checkbashisms
|
||||||
|
BuildRequires: hunspell-cs
|
||||||
|
BuildRequires: hunspell-en-US
|
||||||
|
BuildRequires: python3dist(pytest)
|
||||||
|
BuildRequires: python3dist(pytest-xdist)
|
||||||
BuildRequires: /usr/bin/appstream-util
|
BuildRequires: /usr/bin/appstream-util
|
||||||
BuildRequires: %{py3_dist pytest}
|
|
||||||
BuildRequires: %{py3_dist pytest-xdist}
|
|
||||||
BuildRequires: %{py3_dist pyenchant}
|
|
||||||
BuildRequires: %{py3_dist file-magic}
|
|
||||||
BuildRequires: devscripts-checkbashisms, dash, hunspell-cs, hunspell-en-US
|
|
||||||
BuildRequires: /usr/bin/desktop-file-validate
|
BuildRequires: /usr/bin/desktop-file-validate
|
||||||
|
%endif
|
||||||
|
Requires: dash
|
||||||
|
Requires: devscripts-checkbashisms
|
||||||
|
Requires: rpm-build
|
||||||
|
Requires: /usr/bin/appstream-util
|
||||||
|
Requires: /usr/bin/desktop-file-validate
|
||||||
|
|
||||||
%description
|
%description
|
||||||
rpmlint is a tool for checking common errors in RPM packages. Binary
|
rpmlint is a tool for checking common errors in RPM packages. Binary
|
||||||
@ -54,11 +50,15 @@ sed -i -e 's/ --cov=rpmlint//' -e 's/ --flake8//' setup.cfg
|
|||||||
# Avoid warnings about pytest.mark.no_cover marker
|
# Avoid warnings about pytest.mark.no_cover marker
|
||||||
sed -i '/^@pytest.mark.no_cover/d' test/test_lint.py
|
sed -i '/^@pytest.mark.no_cover/d' test/test_lint.py
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%pyproject_buildrequires
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install
|
||||||
|
%pyproject_save_files %{name}
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/xdg/rpmlint/
|
mkdir -p %{buildroot}%{_sysconfdir}/xdg/rpmlint/
|
||||||
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}/xdg/rpmlint/
|
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}/xdg/rpmlint/
|
||||||
@ -68,15 +68,17 @@ cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysc
|
|||||||
%pytest
|
%pytest
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files
|
%files -f %{pyproject_files}
|
||||||
%license COPYING
|
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%config(noreplace) %{_sysconfdir}/xdg/rpmlint/*.toml
|
%config(noreplace) %{_sysconfdir}/xdg/rpmlint/*.toml
|
||||||
%{_bindir}/rpmdiff
|
%{_bindir}/rpmdiff
|
||||||
%{_bindir}/rpmlint
|
%{_bindir}/rpmlint
|
||||||
%{python3_sitelib}/rpmlint*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 04 2022 Todd Zullinger <tmz@pobox.com> - 2.4.0-1
|
||||||
|
- update to 2.4.0 (rhbz#2088759)
|
||||||
|
- use python build-dependency generator
|
||||||
|
|
||||||
* Sat Sep 24 2022 Todd Zullinger <tmz@pobox.com> - 2.3.0-1
|
* Sat Sep 24 2022 Todd Zullinger <tmz@pobox.com> - 2.3.0-1
|
||||||
- update to 2.3.0 (rhbz#2088759)
|
- update to 2.3.0 (rhbz#2088759)
|
||||||
- convert license to SPDX and correct to GPL-2.0-or-later
|
- convert license to SPDX and correct to GPL-2.0-or-later
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (rpmlint-2.3.0.tar.gz) = 8c10a58315695a5768a8f95de9bcae2cca264d48e1a672ff515a2696eee3664dc97c1653ef6e3e18e46f2286cb99430fb3eaa3b0dc6ac069a6b4b94d13584903
|
SHA512 (rpmlint-2.4.0.tar.gz) = ca755c1aec2713411787bf73de70175876e8a25fca51039015042917415c596f76c2ef077edf28c8d29cdfb4ee2ae426b37df372e0e13b692cc45a5e73a99c97
|
||||||
|
Loading…
Reference in New Issue
Block a user