diff --git a/.gitignore b/.gitignore index 8214dce..015d08b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/netaddr-0.7.19.tar.gz +netaddr-1.3.0.tar.gz diff --git a/.python-netaddr.metadata b/.python-netaddr.metadata deleted file mode 100644 index 0dffcfd..0000000 --- a/.python-netaddr.metadata +++ /dev/null @@ -1 +0,0 @@ -00e0ce7d7ebc1d6e7943e884aa51ccb7becdc9ea SOURCES/netaddr-0.7.19.tar.gz diff --git a/SOURCES/0001-Do-not-override-executable-path.patch b/SOURCES/0001-Do-not-override-executable-path.patch deleted file mode 100644 index 89c0a9c..0000000 --- a/SOURCES/0001-Do-not-override-executable-path.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8b08c463a49bdcca455cdfbefa971c89bd309ddf Mon Sep 17 00:00:00 2001 -From: John Eckersberg -Date: Mon, 19 Feb 2018 15:20:54 -0500 -Subject: [PATCH] Do not override executable path - -Resolves: RHBZ#1546800 ---- - setup.py | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/setup.py b/setup.py -index 2bd2a08..4cd2780 100644 ---- a/setup.py -+++ b/setup.py -@@ -177,11 +177,6 @@ def main(): - scripts=['netaddr/tools/netaddr'], - url='https://github.com/drkjam/netaddr/', - version=netaddr.__version__, -- options={ -- 'build_scripts': { -- 'executable': '/usr/bin/env python', -- }, -- }, - ) - - setup(**setup_options) --- -2.14.3 - diff --git a/SOURCES/0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch b/SOURCES/0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch deleted file mode 100644 index 0c03e02..0000000 --- a/SOURCES/0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 2ab73f10be7069c9412e853d2d0caf29bd624012 Mon Sep 17 00:00:00 2001 -From: David Moss -Date: Mon, 16 Jan 2017 22:17:16 +0000 -Subject: [PATCH] - fixed broken tests in issue #149 (python 3 regression in - 0.7.19) - only affects test suite - ---- - netaddr/tests/eui/test_ieee_parsers.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/netaddr/tests/eui/test_ieee_parsers.py b/netaddr/tests/eui/test_ieee_parsers.py -index 7877f09..81f1faa 100644 ---- a/netaddr/tests/eui/test_ieee_parsers.py -+++ b/netaddr/tests/eui/test_ieee_parsers.py -@@ -12,7 +12,7 @@ SAMPLE_DIR = os.path.dirname(__file__) - def test_oui_parser_py2(): - from cStringIO import StringIO - outfile = StringIO() -- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile: -+ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile: - iab_parser = OUIIndexParser(infile) - iab_parser.attach(FileIndexer(outfile)) - iab_parser.parse() -@@ -23,7 +23,7 @@ def test_oui_parser_py2(): - def test_iab_parser_py2(): - from cStringIO import StringIO - outfile = StringIO() -- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile: -+ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile: - iab_parser = IABIndexParser(infile) - iab_parser.attach(FileIndexer(outfile)) - iab_parser.parse() -@@ -34,7 +34,7 @@ def test_iab_parser_py2(): - def test_oui_parser_py3(): - from io import StringIO - outfile = StringIO() -- with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile: -+ with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile: - iab_parser = OUIIndexParser(infile) - iab_parser.attach(FileIndexer(outfile)) - iab_parser.parse() -@@ -45,7 +45,7 @@ def test_oui_parser_py3(): - def test_iab_parser_py3(): - from io import StringIO - outfile = StringIO() -- with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile: -+ with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile: - iab_parser = IABIndexParser(infile) - iab_parser.attach(FileIndexer(outfile)) - iab_parser.parse() --- -2.9.3 - diff --git a/SPECS/python-netaddr.spec b/python-netaddr.spec similarity index 59% rename from SPECS/python-netaddr.spec rename to python-netaddr.spec index d8048cc..58c22ed 100644 --- a/SPECS/python-netaddr.spec +++ b/python-netaddr.spec @@ -1,26 +1,20 @@ -%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: 1.3.0 +Release: 2%{?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 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 +25,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 +38,194 @@ 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 - -# Make rpmlint happy, get rid of DOS line endings -sed -i 's/\r//' netaddr/*.py netaddr/ip/*.py netaddr/eui/*.idx +%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.rst CHANGELOG.rst COPYRIGHT.rst LICENSE.rst PKG-INFO + +%generate_buildrequires +%pyproject_buildrequires %build -%if %{with python2} -%py2_build -%endif #{with python2} - -%if 0%{?with_python3} -%py3_build -%endif +%pyproject_wheel #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} - +%pyproject_install +%pyproject_save_files netaddr %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 +py.test-%{python3_version} -%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} - -%if 0%{?with_python3} %files -n python3-netaddr -%license COPYRIGHT -%doc AUTHORS CHANGELOG -%doc README.md docs/python3/html -%{python3_sitelib}/* -%{_bindir}/netaddr3 +%license COPYRIGHT.rst +%doc AUTHORS.rst CHANGELOG.rst README.rst +%if %{with docs} +%doc docs/python3/html %endif +%{python3_sitelib}/* +%{_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 +* Mon Jan 20 2025 Rafael Jeffman - 1.3.0-2 +- Remove subpackage python-netaddr-shell + Resolves: RHEL-74187 + +* Thu Jan 16 2025 Rafael Jeffman - 1.3.0-1 +- New upstream release 1.3.0 + Resolves: RHEL-74187 + +* Tue Oct 29 2024 Troy Dawson - 0.10.1-6 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Mon Jun 24 2024 Troy Dawson - 0.10.1-5 +- Bump release for June 2024 mass rebuild + +* 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) diff --git a/sources b/sources new file mode 100644 index 0000000..2a06ada --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (netaddr-1.3.0.tar.gz) = 07dc08b5b24265c48fc303dc20b62a37b28c752a8ce44cb560ac7cd6fb8db874f05a5dfb18c26c0137c440e39a5e40e55a6b660f7298bfabead837dd075ba3a7