Skip to content

Commit 220465e

Browse files
committed
rpm: Yet more spec file changes
This is so much more work than I expected. Let's just copy the blueprint from the Fedora packaging guidelines [1]. [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/ Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent dc2c0fe commit 220465e

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

rpm/git-pw.spec

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ BuildArch: noarch
1212
BuildRequires: python3-devel
1313
BuildRequires: python3-pbr
1414
BuildRequires: python3-setuptools
15-
BuildRequires: python3-pytest
16-
17-
Requires: git
18-
Requires: python3-arrow
19-
Requires: python3-click
20-
Requires: python3-requests
21-
Requires: python3-tabulate
22-
Requires: python3-pyyaml
2315

2416
%description
2517
git-pw is a tool for integrating Git with Patchwork, the web-based patch
@@ -30,24 +22,26 @@ tracking system.
3022
# Remove bundled egg-info
3123
rm -rf %{name}.egg-info
3224

25+
%generate_buildrequires
26+
%pyproject_buildrequires -t
27+
3328
%build
34-
%py3_build
29+
%pyproject_wheel
3530

3631
%install
37-
%py3_install
32+
%pyproject_install
33+
%pyproject_save_files git_pw
3834
mkdir -p %{buildroot}%{_mandir}/man1
3935
install -p -D -m 644 man/*.1 %{buildroot}%{_mandir}/man1/
4036

4137
%check
42-
%pytest -Wall
38+
%tox
4339

44-
%files
40+
%files -f %{pyproject_files}
4541
%license LICENSE
4642
%doc README.rst
4743
%{_bindir}/git-pw
4844
%{_mandir}/man1/git-pw*.1*
49-
%{python3_sitelib}/git_pw/
50-
%{python3_sitelib}/git_pw-%{version}-py%{python3_version}*.egg-info
5145

5246
%changelog
5347
* Fri Nov 26 2021 Stephen Finucane <stephen@that.guru> - 2.2.2-1

0 commit comments

Comments
 (0)