diff --git a/rpmlint.spec b/rpmlint.spec index 53bbcb0..e764f29 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -2,7 +2,7 @@ %bcond_without tests Name: rpmlint -Version: 2.3.0 +Version: 2.4.0 Release: 1%{?dist} Summary: Tool for checking common errors in RPM packages License: GPL-2.0-or-later @@ -17,26 +17,22 @@ Source5: warn-on-functions.toml BuildArch: noarch 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 +%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: %{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 +%endif +Requires: dash +Requires: devscripts-checkbashisms +Requires: rpm-build +Requires: /usr/bin/appstream-util +Requires: /usr/bin/desktop-file-validate %description 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 sed -i '/^@pytest.mark.no_cover/d' test/test_lint.py +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files %{name} mkdir -p %{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 %endif -%files -%license COPYING +%files -f %{pyproject_files} %doc README.md %config(noreplace) %{_sysconfdir}/xdg/rpmlint/*.toml %{_bindir}/rpmdiff %{_bindir}/rpmlint -%{python3_sitelib}/rpmlint* %changelog +* Tue Oct 04 2022 Todd Zullinger - 2.4.0-1 +- update to 2.4.0 (rhbz#2088759) +- use python build-dependency generator + * Sat Sep 24 2022 Todd Zullinger - 2.3.0-1 - update to 2.3.0 (rhbz#2088759) - convert license to SPDX and correct to GPL-2.0-or-later diff --git a/sources b/sources index f133b5c..8575672 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rpmlint-2.3.0.tar.gz) = 8c10a58315695a5768a8f95de9bcae2cca264d48e1a672ff515a2696eee3664dc97c1653ef6e3e18e46f2286cb99430fb3eaa3b0dc6ac069a6b4b94d13584903 +SHA512 (rpmlint-2.4.0.tar.gz) = ca755c1aec2713411787bf73de70175876e8a25fca51039015042917415c596f76c2ef077edf28c8d29cdfb4ee2ae426b37df372e0e13b692cc45a5e73a99c97