drop py2
This commit is contained in:
parent
711ba05149
commit
bdb1377b77
|
@ -1,11 +1,3 @@
|
|||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
%bcond_with python2
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_without python2
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
# Currently broken in koji
|
||||
%bcond_with tests
|
||||
|
||||
|
@ -34,7 +26,6 @@ BuildRequires: rpm-sign
|
|||
BuildRequires: cpio
|
||||
BuildRequires: valgrind
|
||||
BuildRequires: zstd
|
||||
%if %{with python3}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
BuildRequires: python%{python3_pkgversion}-koji
|
||||
|
@ -42,29 +33,6 @@ BuildRequires: python%{python3_pkgversion}-rpm
|
|||
BuildRequires: python%{python3_pkgversion}-cryptography
|
||||
BuildRequires: python%{python3_pkgversion}-pyxattr
|
||||
%{?python_provide:%python_provide python3-%{pkgname}}
|
||||
%if %{undefined python_enable_dependency_generator} && %{undefined python_disable_dependency_generator}
|
||||
Requires: python%{python3_pkgversion}-cryptography
|
||||
Requires: python%{python3_pkgversion}-koji
|
||||
Requires: python%{python3_pkgversion}-six
|
||||
Requires: python%{python3_pkgversion}-xattr
|
||||
Requires: python%{python3_pkgversion}-rpm
|
||||
%endif
|
||||
%endif
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-koji
|
||||
BuildRequires: python2-rpm
|
||||
BuildRequires: python2-cryptography
|
||||
BuildRequires: pyxattr
|
||||
%{?python_provide:%python_provide python2-%{pkgname}}
|
||||
%if %{undefined python_enable_dependency_generator} && %{undefined python_disable_dependency_generator}
|
||||
Requires: python2-koji
|
||||
Requires: python2-six
|
||||
Requires: python2-pyxattr
|
||||
Requires: rpm-python
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description
|
||||
A small Python module (with C helper) to extract a RPM header and file
|
||||
|
@ -82,23 +50,11 @@ done
|
|||
|
||||
|
||||
%build
|
||||
%if %{with python2}
|
||||
%py2_build
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
%if %{with python2}
|
||||
%py2_install
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
|
@ -106,27 +62,16 @@ done
|
|||
# To make sure we get to use the installed version
|
||||
mv rpm_head_signing rpm_head_signing.orig
|
||||
|
||||
%if %{with python2}
|
||||
PYTHONPATH=%{buildroot}%{python2_sitearch} SKIP_BYTEORDER_CHECK=true SKIP_IMA_LIVE_CHECK=true ONLY_ALTERNATIVE_EVMCTL_CHECK=true python2 test.py
|
||||
%endif
|
||||
%if %{with python3}
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch} SKIP_IMA_LIVE_CHECK=true python3 test.py
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/verify-rpm-ima-signatures
|
||||
%if %{with python3}
|
||||
%{python3_sitearch}/%{srcname}/
|
||||
%{python3_sitearch}/%{srcname}-*/
|
||||
%endif
|
||||
%if %{with python2}
|
||||
%{python2_sitearch}/%{srcname}/
|
||||
%{python2_sitearch}/%{srcname}-*/
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
|
|
Loading…
Reference in New Issue