Remove python2 subpackage from Fedora 32+ (rhbz#1769871)
This commit is contained in:
parent
1e95f96b71
commit
5c386cec93
@ -2,9 +2,13 @@
|
|||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} < 32
|
||||||
|
%global with_python2 1
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: python-netaddr
|
Name: python-netaddr
|
||||||
Version: 0.7.19
|
Version: 0.7.19
|
||||||
Release: 19%{?dist}
|
Release: 20%{?dist}
|
||||||
Summary: A pure Python network address representation and manipulation library
|
Summary: A pure Python network address representation and manipulation library
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -12,12 +16,14 @@ URL: http://github.com/drkjam/netaddr
|
|||||||
Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
|
Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
# sphinx is python3-only f31 onward
|
# sphinx is python3-only f31 onward
|
||||||
# https://fedoraproject.org/wiki/Changes/Sphinx2
|
# https://fedoraproject.org/wiki/Changes/Sphinx2
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
|
%if 0%{?with_python2}
|
||||||
BuildRequires: python2-pytest
|
BuildRequires: python2-pytest
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
%endif
|
||||||
|
|
||||||
Patch0: 0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch
|
Patch0: 0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch
|
||||||
Patch1: 0001-Do-not-override-executable-path.patch
|
Patch1: 0001-Do-not-override-executable-path.patch
|
||||||
@ -51,11 +57,13 @@ Layer 2 addresses\
|
|||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
|
|
||||||
|
%if 0%{?with_python2}
|
||||||
%package -n python2-netaddr
|
%package -n python2-netaddr
|
||||||
Summary: %summary
|
Summary: %summary
|
||||||
%{?python_provide:%python_provide python2-netaddr}
|
%{?python_provide:%python_provide python2-netaddr}
|
||||||
|
|
||||||
%description -n python2-netaddr %_description
|
%description -n python2-netaddr %_description
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%package -n python3-netaddr
|
%package -n python3-netaddr
|
||||||
@ -90,7 +98,9 @@ sed -i -e '1s,/usr/bin/env python,%{__python2} %{?py_shbang_opts},' netaddr/tool
|
|||||||
chmod 0644 README.md AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO
|
chmod 0644 README.md AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if 0%{?with_python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -106,7 +116,9 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if 0%{?with_python2}
|
||||||
%py2_install
|
%py2_install
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%py3_install
|
%py3_install
|
||||||
@ -114,16 +126,20 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if 0%{?with_python2}
|
||||||
py.test-%{python2_version}
|
py.test-%{python2_version}
|
||||||
|
%endif
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
py.test-%{python3_version}
|
py.test-%{python3_version}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?with_python2}
|
||||||
%files -n python2-netaddr
|
%files -n python2-netaddr
|
||||||
%license COPYRIGHT LICENSE
|
%license COPYRIGHT LICENSE
|
||||||
%doc AUTHORS CHANGELOG
|
%doc AUTHORS CHANGELOG
|
||||||
%doc README.md docs/html
|
%doc README.md docs/html
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-netaddr
|
%files -n python3-netaddr
|
||||||
@ -135,6 +151,9 @@ py.test-%{python3_version}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 7 2019 John Eckersberg <eck@redhat.com> - 0.7.19-20
|
||||||
|
- Remove python2 subpackage from Fedora 32+ (rhbz#1769871)
|
||||||
|
|
||||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.19-19
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.19-19
|
||||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user