Rebase to version 0.10.1

Resolves: RHEL-25506
This commit is contained in:
Rafael Guterres Jeffman 2024-11-11 19:24:46 -03:00
parent 69898d4eae
commit 91d73a572f
3 changed files with 33 additions and 63 deletions

2
.gitignore vendored
View File

@ -10,3 +10,5 @@ netaddr-0.7.4.tar.gz
/netaddr-0.7.19.tar.gz
/netaddr-0.7.20.tar.gz
/netaddr-0.8.0.tar.gz
/netaddr-0.10.1.tar.gz
/THANKS

View File

@ -1,28 +1,20 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%endif
%if 0%{?fedora} < 32 && 0%{?rhel} < 9
%global with_python2 1
%endif
%bcond docs %{undefined rhel}
Name: python-netaddr
Version: 0.8.0
Release: 5%{?dist}
Version: 0.10.1
Release: 1%{?dist}
Summary: A pure Python network address representation and manipulation library
License: BSD
URL: http://github.com/drkjam/netaddr
Source0: https://pypi.python.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
# Remove once https://github.com/netaddr/netaddr/pull/345
Source1: THANKS
BuildArch: noarch
# sphinx is python3-only f31 onward
# https://fedoraproject.org/wiki/Changes/Sphinx2
%if %{with docs}
BuildRequires: python3-sphinx
%if 0%{?with_python2}
BuildRequires: python2-pytest
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python3-furo
%endif
%global desc A network address manipulation library for Python\
@ -53,29 +45,25 @@ Layer 2 addresses\
%description %_description
%if 0%{?with_python2}
%package -n python2-netaddr
Summary: %summary
%{?python_provide:%python_provide python2-netaddr}
%description -n python2-netaddr %_description
%endif
%if 0%{?with_python3}
%package -n python3-netaddr
Summary: A pure Python network address representation and manipulation library
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-sphinx
BuildRequires: python3-pytest
%{?python_provide:%python_provide python3-netaddr}
%description -n python3-netaddr
%{desc}
%endif
%package -n python3-netaddr-shell
Summary: An IPython-based shell environment for the netaddr library
Requires: python3-netaddr = %{version}-%{release}
Requires: python3-ipython
%description -n python3-netaddr-shell
An IPython-based shell environment for the netaddr library
%prep
%setup -q -n netaddr-%{version}
%autosetup -n netaddr-%{version} -p1
# Make rpmlint happy, rip out python shebang lines from most python
# modules
@ -86,61 +74,40 @@ find netaddr -name "*.py" | \
chmod 0644 README.rst AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO
%build
%if 0%{?with_python2}
%py2_build
%endif
%if 0%{?with_python3}
%py3_build
%endif
#docs
%if %{with docs}
pushd docs
PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source html
rm -f html/.buildinfo
%if 0%{?with_python3}
PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source python3/html
rm -f python3/html/.buildinfo
%endif
popd
%endif
%install
%if 0%{?with_python2}
%py2_install
%endif
%if 0%{?with_python3}
%py3_install
%endif
%check
%if 0%{?with_python2}
py.test-%{python2_version}
%endif
%if 0%{?with_python3}
py.test-%{python3_version}
%endif
%if 0%{?with_python2}
%files -n python2-netaddr
%license COPYRIGHT LICENSE
%doc AUTHORS CHANGELOG
%doc README.rst docs/html
%{python2_sitelib}/*
%endif
%if 0%{?with_python3}
%files -n python3-netaddr
%license COPYRIGHT
%doc AUTHORS CHANGELOG
%doc README.rst docs/python3/html
%{python3_sitelib}/*
%{_bindir}/netaddr
%doc AUTHORS CHANGELOG README.rst
%if %{with docs}
%doc docs/python3/html
%endif
%{python3_sitelib}/*
%files -n python3-netaddr-shell
%{_bindir}/netaddr
%changelog
* Mon Nov 11 2024 Rafael Jeffman <rjeffman@redhat.com> - 0.10.1-1
- Rebase to version 0.10.1
Resolves: RHEL-25506
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.8.0-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688

View File

@ -1 +1,2 @@
SHA512 (netaddr-0.8.0.tar.gz) = a158bef87e862330c583f8b6709c4f575ec036dd31d725dad679e583ad4bef1a34f43225453bc93970ab720ae5f9f0fc2a6a3b92cbb922ed6f201414fd1e96d3
SHA512 (netaddr-0.10.1.tar.gz) = ca04171d5cbfd569d4f262f4870610edfd98be35899cb70983dbff5f37add963e05987ddbe1ab22d9b615580ac1abe96a8c2903681b18af8c9f2f96899b618ff
SHA512 (THANKS) = 056e48f59f855125c636c5e94a775a6c76d8d7318a71d4c4ac502f9e2c7ac503bc65816b9c62674aa67dda7ce3fa240ac67818ac0b76d00ae21f2db35c76e1c2