From 8f989e87776924fac0d84eae95352f30301737be Mon Sep 17 00:00:00 2001 From: Terje Røsten Date: May 05 2019 11:52:30 +0000 Subject: Remove Python 2 subpackage on Fedora 31+ and el8+ --- diff --git a/python-hglib.spec b/python-hglib.spec index 15cfdcb..cebcddb 100644 --- a/python-hglib.spec +++ b/python-hglib.spec @@ -1,14 +1,20 @@ +%if 0%{?fedora} < 31 && 0%{?rhel} < 8 +%global with_python2 1 +%endif + Summary: Mercurial Python library Name: python-hglib Version: 2.6.1 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT URL: http://selenic.com/repo/python-hglib Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: mercurial +%if 0%{?with_python2} BuildRequires: python2-devel BuildRequires: python2-nose +%endif BuildRequires: python3-devel BuildRequires: python3-nose %description @@ -16,6 +22,7 @@ python-hglib is a library with a fast, convenient interface to Mercurial. It uses Mercurials command server for communication with hg. +%if 0%{?with_python2} %package -n python2-hglib Summary: Mercurial Python library %{?python_provide:%python_provide python2-hglib} @@ -23,6 +30,7 @@ Summary: Mercurial Python library python-hglib is a library with a fast, convenient interface to Mercurial. It uses Mercurials command server for communication with hg. +%endif %package -n python3-hglib Summary: Mercurial Python library @@ -36,21 +44,29 @@ hg. %setup -q %build +%if 0%{?with_python2} %{py2_build} +%endif %{py3_build} %install +%if 0%{?with_python2} %{py2_install} +%endif %{py3_install} %check +%if 0%{?with_python2} %{__python2} test.py --with-doctest +%endif %{__python3} test.py --with-doctest +%if 0%{?with_python2} %files -n python2-hglib %license LICENSE %{python2_sitelib}/hglib %{python2_sitelib}/python_hglib-*-py*.egg-info +%endif %files -n python3-hglib %license LICENSE @@ -58,6 +74,9 @@ hg. %{python3_sitelib}/python_hglib-*-py*egg-info %changelog +* Sun May 05 2019 Terje Rosten - 2.6.1-5 +- Remove Python 2 subpackage on Fedora 31+ and el8+ + * Sat Feb 02 2019 Fedora Release Engineering - 2.6.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild