|
|
|
@ -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
|
|
|
|
|
Version: 0.10.1
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Summary: A pure Python network address representation and manipulation library
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://github.com/drkjam/netaddr
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
URL: https://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\
|
|
|
|
@ -47,35 +39,31 @@ Layer 2 addresses\
|
|
|
|
|
* looking up IEEE organisational information (OUI, IAB)\
|
|
|
|
|
* generating derived IPv6 addresses
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description\
|
|
|
|
|
%{desc}
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
@ -85,68 +73,101 @@ find netaddr -name "*.py" | \
|
|
|
|
|
# Make rpmlint happy, fix permissions on documentation files
|
|
|
|
|
chmod 0644 README.rst AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if 0%{?with_python2}
|
|
|
|
|
%py2_build
|
|
|
|
|
%endif
|
|
|
|
|
# Include missing THANKS file
|
|
|
|
|
# Remove once https://github.com/netaddr/netaddr/pull/345
|
|
|
|
|
mv %{SOURCE1} .
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%build
|
|
|
|
|
%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
|
|
|
|
|
%doc AUTHORS CHANGELOG README.rst
|
|
|
|
|
%if %{with docs}
|
|
|
|
|
%doc docs/python3/html
|
|
|
|
|
%endif
|
|
|
|
|
%{python3_sitelib}/*
|
|
|
|
|
|
|
|
|
|
%files -n python3-netaddr-shell
|
|
|
|
|
%{_bindir}/netaddr
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* 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
|
|
|
|
|
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.10.1-5
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.10.1-5
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.1-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.1-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 04 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 0.10.1-2
|
|
|
|
|
- Conditionalize docs
|
|
|
|
|
|
|
|
|
|
* Wed Jan 3 2024 John Eckersberg <jeckersb@redhat.com> - 0.10.1-1
|
|
|
|
|
- New upstream release 0.10.1 (rhbz#2256342)
|
|
|
|
|
- Remove patch for Python 3.13 compatibility (merged upstream in 0.10.0)
|
|
|
|
|
- Add new depencency on furo
|
|
|
|
|
- Include missing THANKS file (https://github.com/netaddr/netaddr/pull/345)
|
|
|
|
|
|
|
|
|
|
* Thu Dec 14 2023 John Eckersberg <jeckersb@redhat.com> - 0.9.0-2
|
|
|
|
|
- Add patch for Python 3.13 compatibility (rhbz#2246093)
|
|
|
|
|
|
|
|
|
|
* Tue Sep 19 2023 John Eckersberg <jeckersb@redhat.com> - 0.9.0-1
|
|
|
|
|
- New upstream release 0.9.0 (rhbz#2239532)
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-14
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.8.0-13
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Thu Feb 23 2023 Orion Poplawski <orion@nwra.com> - 0.8.0-12
|
|
|
|
|
- Cleanup spec
|
|
|
|
|
- Use SPDX License tag
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.8.0-9
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Fri May 13 2022 John Eckersberg <jeckersb@redhat.com> - 0.8.0-8
|
|
|
|
|
- Move netaddr shell into a separate subpackage (rhbz#2076031)
|
|
|
|
|
|
|
|
|
|
* Tue Apr 12 2022 John Eckersberg <jeckersb@redhat.com> - 0.8.0-7
|
|
|
|
|
- Add Recommends on python3-ipython (rhbz#2074313)
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.8.0-4
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.8.0-4
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|