Do not build python2 version for Fedora 30+
This commit is contained in:
parent
a1e633309d
commit
e8da257d01
@ -4,10 +4,15 @@
|
||||
%else
|
||||
%bcond_without python3
|
||||
%endif
|
||||
%if 0%{?fedora} > 29
|
||||
%bcond_with python2
|
||||
%else
|
||||
%bcond_without python2
|
||||
%endif
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 1.3.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Linux Distribution - a Linux OS platform information API
|
||||
|
||||
License: ASL 2.0
|
||||
@ -31,6 +36,7 @@ for more information.
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%if %{with python2}
|
||||
%package -n python2-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||
@ -49,6 +55,7 @@ Suggests: /usr/bin/lsb_release
|
||||
%description -n python2-%{pypi_name} %{_description}
|
||||
|
||||
Python 2 version.
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python3-%{pypi_name}
|
||||
@ -72,22 +79,28 @@ Python 3 version.
|
||||
rm -rf %{pypi_name}.egg-info
|
||||
|
||||
%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 python2}
|
||||
%files -n python2-%{pypi_name}
|
||||
%doc README.rst CHANGELOG.md CONTRIBUTORS.md README.md
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/%{pypi_name}-*.egg-info/
|
||||
%{python2_sitelib}/%{pypi_name}.py*
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{pypi_name}
|
||||
@ -101,12 +114,17 @@ rm -rf %{pypi_name}.egg-info
|
||||
%{_bindir}/distro
|
||||
|
||||
%check
|
||||
%if %{with python2}
|
||||
%{__python2} -m pytest tests -v
|
||||
%endif
|
||||
%if %{with python3}
|
||||
%{__python3} -m pytest tests -v
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Aug 30 2018 Marek Blaha <mblaha@redhat.com> - 1.3.0-5
|
||||
- do not build python2 version for Fedora 30+
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user