-
Notifications
You must be signed in to change notification settings - Fork 3
/
rpmdeplint.spec
69 lines (53 loc) · 1.83 KB
/
rpmdeplint.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Name: rpmdeplint
Version: 2.0
Release: %autorelease
Summary: Tool to find errors in RPM packages in the context of their dependency graph
License: GPL-2.0-or-later
URL: https://github.com/fedora-ci/rpmdeplint
Source0: %{pypi_source rpmdeplint}
BuildArch: noarch
# The base package is just the CLI, which pulls in the rpmdeplint
# Python modules to do the real work.
Requires: python3-rpmdeplint = %{version}-%{release}
%description
Rpmdeplint is a tool to find errors in RPM packages in the context of their
dependency graph.
%package -n python3-rpmdeplint
%{?python_provide:%python_provide python3-rpmdeplint}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: make
# These rpms don't provide python3.11dist(librepo|solv)
# https://bugzilla.redhat.com/show_bug.cgi?id=2237481
BuildRequires: python3-librepo
BuildRequires: python3-solv
Requires: python3-librepo
Requires: python3-solv
%description -n python3-rpmdeplint
Rpmdeplint is a tool to find errors in RPM packages in the context of their
dependency graph.
This package provides a Python 3 API for performing the checks.
%prep
%autosetup -n rpmdeplint-%{version}
%generate_buildrequires
# The -w flag is required for EPEL 9's older hatchling
%pyproject_buildrequires %{?el9:-w} -x docs -x tests
%build
%pyproject_wheel
make -C docs man
%install
%pyproject_install
mkdir -p %{buildroot}%{_mandir}/man1/
mv docs/_build/man/rpmdeplint.1 %{buildroot}%{_mandir}/man1/
%pyproject_save_files rpmdeplint
%check
%pytest tests/unit/ -k "not TestDependencyAnalyzer"
# Acceptance tests do not work in mock because they require .i686 packages.
%files
%{_bindir}/rpmdeplint
%{_mandir}/man1/rpmdeplint.1.*
%files -n python3-rpmdeplint -f %{pyproject_files}
%license COPYING
%doc README.md
%changelog
%autochangelog