!6 remove python2-IPy subpackage

From: @jinzhimin369
Reviewed-by: @zengwefeng
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2020-10-30 15:19:02 +08:00 committed by Gitee
commit d5eff64cc9

View File

@ -1,6 +1,6 @@
Name: IPy
Version: 1.00
Release: 0
Release: 1
Summary: Class and Tools for Handling of IPv4 and IPv6 Addresses and Networks
License: BSD
URL: https://github.com/autocracy/python-ipy
@ -8,13 +8,7 @@ Source0: https://pypi.python.org/packages/source/I/IPy/IPy-%{version}.t
BuildArch: noarch
%if 0%{?with_python2}
BuildRequires: python2-devel python2-setuptools
%endif
%if 0%{?with_python3}
BuildRequires: python3-devel python3-setuptools
%endif
%description
The IP class allows a comfortable parsing and handling for most notations
@ -23,17 +17,6 @@ by RIPE's Perl module NET::IP's interface but doesn't share the
implementation. It doesn't share non-CIDR netmasks, so funky stuff like a
netmask of 0xffffff0f can't be done here.
%if 0%{?with_python2}
%package -n python2-IPy
Summary: Python2 package for python-IPy
Provides: python-IPy = %{version}-%{release}
Obsoletes: python-IPy < %{version}-%{release}
%description -n python2-IPy
Python2 package for python-IPy
%endif
%if 0%{?with_python3}
%package -n python3-IPy
Summary: Python3 package for python-IPy
%{?python_provide: %python_provide python3-IPy}
@ -42,57 +25,30 @@ Obsoletes: %{name}-python3
%description -n python3-IPy
Python3 package for python-IPy
%endif
%prep
%autosetup -n python-ipy-IPy-%{version} -p1
%build
%if 0%{?with_python2}
%py2_build
%endif
%if 0%{?with_python3}
%py3_build
%endif
%install
%if 0%{?with_python2}
%py2_install
%endif
%if 0%{?with_python3}
%py3_install
%endif
%check
%if 0%{?with_python2}
PYTHONPATH=$PWD %{__python2} test/test_IPy.py
PYTHONPATH=$PWD %{__python2} test_doc.py
%endif
%if 0%{?with_python3}
PYTHONPATH=$PWD %{__python3} test/test_IPy.py
#PYTHONPATH=$PWD %{__python3} test_doc.py # FAILS
%endif
%if 0%{?with_python2}
%files -n python2-IPy
%defattr(-,root,root)
%license COPYING
%doc AUTHORS
%{python2_sitelib}/*
%endif
%if 0%{?with_python3}
%files -n python3-IPy
%defattr(-,root,root)
%license COPYING
%doc AUTHORS
%{python3_sitelib}/*
%endif
%changelog
* Fri Oct 30 2020 jinzhimin <jinzhimin2@huawei.com> - 1.00-1
- remove python2-IPy subpackage
* Thu Jul 23 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.00-0
- update package to 1.00