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