From 27d53f330ef869b97c9ae135ba890dc63c36aa7a Mon Sep 17 00:00:00 2001 From: rdobuilder Date: Jul 09 2024 14:55:05 +0000 Subject: Import python-netaddr-0.10.1-4.fc40 Although python-netaddr-0.8.0-5.el9 is provided in CS9 repo, some projects upstream are requiring it to be >=0.10.1 [1][2] which is backwards compatible with 0.8.0 (it has just some minor backwards incompatible changes that seems to be negligible [3]). I'm creating this repo to rebuild 0.10.1 from Fedora. [1] https://review.opendev.org/c/openstack/ovsdbapp/+/918970 [2] https://review.opendev.org/c/openstack/oslo.utils/+/909307 [3] https://netaddr.readthedocs.io/en/latest/changes.html#release-0-10-1 Related-to: https://review.rdoproject.org/r/q/Icb02006fea0d52264584ef520c0bfdae27bcefd5 --- diff --git a/.python-netaddr.metadata b/.python-netaddr.metadata index 0dffcfd..a5763aa 100644 --- a/.python-netaddr.metadata +++ b/.python-netaddr.metadata @@ -1 +1 @@ -00e0ce7d7ebc1d6e7943e884aa51ccb7becdc9ea SOURCES/netaddr-0.7.19.tar.gz +bbfa2b78bb3c5b9558f8efb7bc3f1f57ac5fd644 SOURCES/netaddr-0.10.1.tar.gz diff --git a/SOURCES/THANKS b/SOURCES/THANKS new file mode 100644 index 0000000..0910cee --- /dev/null +++ b/SOURCES/THANKS @@ -0,0 +1,49 @@ +netaddr is written and maintained by David P. D. Moss + +It is released under the BSD License. + +Many people further contributed to netaddr by reporting problems, suggesting +various improvements or submitting actual code. Here is a list of these people +(in alphabetical order). Help me keep it complete and free of errors. + + Vincent Bernat + + Sebastien Douche + + John Eckersberg + + Yi-Jheng Lin + + Clay McClure + + Duncan McGreggor + + Stefan Nordhausen + + Brian F. Peters + + James William Pye + + Chaitan Rogers + + Victor Stinner + + Andrew Stromnov + +Thanks to everyone on the netaddr mailing list, those who raised bug reports +and to all those who have, directly and indirectly, guided and influenced the +development and distribution of this library. + +Thanks also for the use of the following code contributions :- + +a) Python Cookbook recipe 18.11: "Formatting Integers as Binary Strings" + + Python Cookbook 2d ed. (O'Reilly Media 2005) ISBN 0596-00797-3 + Alex Martelli, Anna Martelli Ravenscroft and David Ascher + +b) ASPN Cookbook Recipe 466286: "Integer set type" by Heiko Wundram + + http://code.activestate.com/recipes/466286/ + +And last but not least, thanks to Guido van Rossum for his encouraging words +and for giving us all Python. diff --git a/SPECS/python-netaddr.spec b/SPECS/python-netaddr.spec index d8048cc..366ebd7 100644 --- a/SPECS/python-netaddr.spec +++ b/SPECS/python-netaddr.spec @@ -1,26 +1,21 @@ -%if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python3 1 -%endif - -%if 0%{?rhel} > 7 -%bcond_with python2 -%else -%bcond_without python2 -%endif +%bcond docs %{undefined rhel} Name: python-netaddr -Version: 0.7.19 -Release: 8%{?dist} +Version: 0.10.1 +Release: 4%{?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 - -Patch0: 0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch -Patch1: 0001-Do-not-override-executable-path.patch +%if %{with docs} +BuildRequires: python3-sphinx +BuildRequires: python3-furo +%endif %global desc A network address manipulation library for Python\ \ @@ -31,7 +26,8 @@ Layer 3 addresses\ * IPv4 and IPv6 addresses, subnets, masks, prefixes\ * iterating, slicing, sorting, summarizing and classifying IP networks\ * dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)\ - * set based operations (unions, intersections etc) over IP addresses and subnets\ + * set based operations (unions, intersections etc) over IP addresses and\ + subnets\ * parsing a large variety of different formats and notations\ * looking up IANA IP block information\ * generating DNS reverse lookups\ @@ -43,119 +39,191 @@ Layer 2 addresses\ * looking up IEEE organisational information (OUI, IAB)\ * generating derived IPv6 addresses - %global _description\ %{desc} %description %_description -%if %{with python2} -%package -n python2-netaddr -Summary: %summary -%{?python_provide:%python_provide python2-netaddr} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-sphinx -BuildRequires: python2-pytest - -%description -n python2-netaddr %_description -%endif #{with python2} - -%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 %description -n python3-netaddr %{desc} -%endif -%prep -%setup -q -n netaddr-%{version} -%patch0 -p1 -%patch1 -p1 +%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 -# Make rpmlint happy, get rid of DOS line endings -sed -i 's/\r//' netaddr/*.py netaddr/ip/*.py netaddr/eui/*.idx +%prep +%autosetup -n netaddr-%{version} -p1 # Make rpmlint happy, rip out python shebang lines from most python # modules find netaddr -name "*.py" | \ xargs sed -i -e '1 {/^#!\//d}' -# Fix python executable -%if %{with python2} -sed -i -e '1s,/usr/bin/env python,%{__python2} %{?py_shbang_opts},' netaddr/tools/netaddr -%else -sed -i -e '1s,/usr/bin/env python,%{__python3} %{?py_shbang_opts},' netaddr/tools/netaddr -%endif #{with python2} # Make rpmlint happy, fix permissions on documentation files -chmod 0644 README.md AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO +chmod 0644 README.rst AUTHORS CHANGELOG COPYRIGHT LICENSE PKG-INFO -%build -%if %{with python2} -%py2_build -%endif #{with python2} +# 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 -%if %{with python2} -PYTHONPATH='../' sphinx-build -b html -d build/doctrees source html -%endif #{with python2} -%if 0%{?with_python3} PYTHONPATH='../' sphinx-build-%{python3_version} -b html -d build/doctrees source python3/html -%endif +rm -f python3/html/.buildinfo popd +%endif %install -%if 0%{?with_python3} %py3_install -mv %{buildroot}%{_bindir}/netaddr %{buildroot}%{_bindir}/netaddr3 -%endif - -%if %{with python2} -%py2_install -%endif #{with python2} %check -%if %{with python2} -py.test-%{python2_version} -%endif #{with python2} -%if 0%{?with_python3} -LANG=en_US.UTF-8 py.test-%{python3_version} -%endif - -%if %{with python2} -%files -n python2-netaddr -%license COPYRIGHT LICENSE -%doc AUTHORS CHANGELOG -%doc README.md docs/html -%{python2_sitelib}/* -%{_bindir}/netaddr -%endif #{with python2} +py.test-%{python3_version} -%if 0%{?with_python3} %files -n python3-netaddr %license COPYRIGHT -%doc AUTHORS CHANGELOG -%doc README.md docs/python3/html -%{python3_sitelib}/* -%{_bindir}/netaddr3 +%doc AUTHORS CHANGELOG README.rst +%if %{with docs} +%doc docs/python3/html %endif +%{python3_sitelib}/* + +%files -n python3-netaddr-shell +%{_bindir}/netaddr %changelog -* Mon Jul 09 2018 Petr Viktorin - 0.7.19-8 -- Don't build python2 subpackage on rhel>7 - https://bugzilla.redhat.com/show_bug.cgi?id=1567153 +* Fri Jan 26 2024 Fedora Release Engineering - 0.10.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 0.10.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jan 04 2024 Yaakov Selkowitz - 0.10.1-2 +- Conditionalize docs + +* Wed Jan 3 2024 John Eckersberg - 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 - 0.9.0-2 +- Add patch for Python 3.13 compatibility (rhbz#2246093) + +* Tue Sep 19 2023 John Eckersberg - 0.9.0-1 +- New upstream release 0.9.0 (rhbz#2239532) + +* Fri Jul 21 2023 Fedora Release Engineering - 0.8.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 0.8.0-13 +- Rebuilt for Python 3.12 + +* Thu Feb 23 2023 Orion Poplawski - 0.8.0-12 +- Cleanup spec +- Use SPDX License tag + +* Fri Jan 20 2023 Fedora Release Engineering - 0.8.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 0.8.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.8.0-9 +- Rebuilt for Python 3.11 + +* Fri May 13 2022 John Eckersberg - 0.8.0-8 +- Move netaddr shell into a separate subpackage (rhbz#2076031) + +* Tue Apr 12 2022 John Eckersberg - 0.8.0-7 +- Add Recommends on python3-ipython (rhbz#2074313) + +* Fri Jan 21 2022 Fedora Release Engineering - 0.8.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.8.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.8.0-4 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.8.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 3 2020 John Eckersberg - 0.8.0-1 +- New upstream release 0.8.0 (rhbz#1853684) + +* Fri Jun 19 2020 John Eckersberg - 0.7.20-1 +- New upstream release 0.7.20 (rhbz#1848782) +- Minor spec and rpmlint cleanups + +* Tue May 26 2020 Miro Hrončok - 0.7.19-22 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.7.19-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Nov 7 2019 John Eckersberg - 0.7.19-20 +- Remove python2 subpackage from Fedora 32+ (rhbz#1769871) + +* Thu Oct 03 2019 Miro Hrončok - 0.7.19-19 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 0.7.19-18 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 0.7.19-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jul 22 2019 John Eckersberg - 0.7.19-16 +- Move /usr/bin/netaddr to python3 and remove python2 version + See https://fedoraproject.org/wiki/Changes/Python_means_Python3 + +* Mon Mar 11 2019 John Eckersberg - 0.7.19-15 +- Remove BuildRequires on python2-sphinx + See https://fedoraproject.org/wiki/Changes/Sphinx2 + +* Sat Feb 02 2019 Fedora Release Engineering - 0.7.19-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Nov 28 2018 John Eckersberg - 0.7.19-13 +- Add python_provide for python3 subpackage per packaging guidelines (RHBZ#1654198) + +* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek - 0.7.19-12 +- Drop explicit locale setting + See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot + +* Sat Jul 14 2018 Fedora Release Engineering - 0.7.19-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 0.7.19-10 +- Rebuilt for Python 3.7 + +* Tue Jun 19 2018 Miro Hrončok - 0.7.19-9 +- Rebuilt for Python 3.7 + +* Thu Feb 22 2018 Iryna Shcherbina - 0.7.19-8 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Mon Feb 19 2018 John Eckersberg - 0.7.19-7 - Fix shebang mangling for python3 (RHBZ#1546800)