| |
@@ -10,6 +10,16 @@
|
| |
Source0: https://releases.pagure.org/Fedora-Infra/rpmautospec/rpmautospec-%{version}.tar.gz
|
| |
|
| |
BuildArch: noarch
|
| |
+ BuildRequires: python3-devel >= 3.6.0
|
| |
+ # EPEL7 does not have python3-koji and the other dependencies here are only
|
| |
+ # needed in the buildroot for the tests, which can't run because of the lack of
|
| |
+ # python3-koji
|
| |
+ %if ! 0%{?rhel} || 0%{?rhel} > 7
|
| |
+ BuildRequires: koji
|
| |
+ BuildRequires: python3-koji
|
| |
+ BuildRequires: python%{python3_pkgversion}-pytest
|
| |
+ BuildRequires: git
|
| |
+ %endif
|
| |
|
| |
%global _description %{expand:
|
| |
A package and CLI tool to generate RPM release fields and changelogs.}
|
| |
@@ -20,10 +30,6 @@
|
| |
|
| |
%package -n python3-%{srcname}
|
| |
Summary: %{summary}
|
| |
- BuildRequires: python3-devel >= 3.6.0
|
| |
- BuildRequires: koji
|
| |
- BuildRequires: python3-koji
|
| |
- BuildRequires: python%{python3_pkgversion}-pytest
|
| |
%{?python_provide:%python_provide python3-%{srcname}}
|
| |
|
| |
Requires: koji
|
| |
@@ -109,8 +115,12 @@
|
| |
mkdir -p %{buildroot}%{_sysconfdir}/koji-hub/plugins/
|
| |
install -m 0644 koji_plugins/rpmautospec_hub.conf %{buildroot}%{_sysconfdir}/koji-hub/plugins/rpmautospec_hub.conf
|
| |
|
| |
+ # EPEL7 does not have python3-koji which is needed to run the tests, so there
|
| |
+ # is no point in running them
|
| |
+ %if ! 0%{?rhel} || 0%{?rhel} > 7
|
| |
%check
|
| |
%{__python3} -m pytest
|
| |
+ %endif
|
| |
|
| |
%changelog
|
| |
* Wed Mar 18 2020 Adam Saleh <asaleh@redhat.com> - 0.0.1-1
|
| |
BuildRequires are for the entire spec file they do not depend on sub-packages
so it does not make sense to tie them with one.
We also need to have
git
installed in the buildroot for the test to runsuccessully, so we're adding it to the list of BuildRequires while at it.
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr