Remove python2-netaddr subpackage

This commit is contained in:
lingsheng 2020-08-10 16:39:59 +08:00
parent 669202706a
commit c8bdbdb6d0

View File

@ -1,6 +1,6 @@
Name: python-netaddr
Version: 0.7.19
Release: 14
Release: 15
Summary: A pure Python network address representation and manipulation library
License: BSD
@ -8,7 +8,6 @@ URL: http://github.com/drkjam/netaddr
Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python2-setuptools python2-sphinx python2-pytest
BuildRequires: python3-devel python3-setuptools python3-sphinx python3-pytest
Patch0001: 0001-PEP-479-return-instead-of-raise-StopIteration.patch
@ -22,15 +21,6 @@ Layer 3 addresses
Layer 2 addresses
* generating derived IPv6 addresses
%package -n python2-netaddr
Summary: Netaddr for 2 matching expressions
%{?python_provide:%python_provide python2-netaddr}
%description -n python2-netaddr
Based on Python2 network address representation and operation library Package
%package -n python3-netaddr
Summary: A pure Python network address representation and manipulation library
%{?python_provide:%python_provide python3-netaddr}
@ -38,43 +28,32 @@ Summary: A pure Python network address representation and manipulation library
%description -n python3-netaddr
Based on Python3 network address representation and operation library Package
%prep
%autosetup -n netaddr-%{version} -p1
sed -i 's/\r//' netaddr/*.py netaddr/ip/*.py netaddr/eui/*.idx
find netaddr -name "*.py" | xargs sed -i -e '1 {/^#!\//d}'
sed -i -e '1s,/usr/bin/env python,%{__python2} %{?py_shbang_opts},' netaddr/tools/netaddr
%build
%py2_build
%py3_build
#docs
cd docs
PYTHONPATH='../' sphinx-build -b html -d build/doctrees source html
PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source html
PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source python3/html
%install
%py3_install
mv %{buildroot}%{_bindir}/netaddr %{buildroot}%{_bindir}/netaddr3
%py2_install
%files -n python2-netaddr
%license COPYRIGHT LICENSE
%doc AUTHORS CHANGELOG README.md docs/html
%{python2_sitelib}/*
%{_bindir}/netaddr
%files -n python3-netaddr
%license COPYRIGHT
%doc AUTHORS CHANGELOG README.md docs/python3/html
%{python3_sitelib}/*
%{_bindir}/netaddr3
%{_bindir}/netaddr
%changelog
* Mon Aug 10 2020 lingsheng<lingsheng@huawei.com> - 0.7.19-15
- Remove python2-netaddr subpackage
* Fri Feb 14 2020 gulining<gulining1@huawei.com> - 0.7.19-14
- Package init