[packages/python3-netaddr] - python-netaddr.spec updated to 1.3.0 for python 3.7+
qboosh
qboosh at pld-linux.org
Sun Nov 2 11:08:37 CET 2025
commit 26b171ae5ad97fb14ee597b2a7c192ab9ee78b49
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Nov 2 11:08:38 2025 +0100
- python-netaddr.spec updated to 1.3.0 for python 3.7+
netaddr-coding.patch | 7 --
python-netaddr.spec => python3-netaddr.spec | 128 +++++-----------------------
2 files changed, 21 insertions(+), 114 deletions(-)
---
diff --git a/python-netaddr.spec b/python3-netaddr.spec
similarity index 52%
rename from python-netaddr.spec
rename to python3-netaddr.spec
index 894145f..ef93915 100644
--- a/python-netaddr.spec
+++ b/python3-netaddr.spec
@@ -2,37 +2,34 @@
# Conditional build:
%bcond_without doc # Sphinx based documentation
%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x modules
-%bcond_without python3 # CPython 3.x modules
%define module netaddr
Summary: A pure Python network address representation and manipulation library
Summary(pl.UTF-8): Czysto pythonowa biblioteka do reprezentacji i operacji na adresach sieciowych
-Name: python-netaddr
-Version: 0.10.1
-Release: 3
+Name: python3-netaddr
+Version: 1.3.0
+Release: 1
License: BSD
Group: Development/Languages/Python
Source0: https://files.pythonhosted.org/packages/source/n/netaddr/%{module}-%{version}.tar.gz
-# Source0-md5: c0d7b080da18c851ea436389813d7652
-Patch0: netaddr-coding.patch
+# Source0-md5: b0307617f8f3aa73bbcfadac52d91df7
URL: https://github.com/drkjam/netaddr/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.7
+BuildRequires: python3-setuptools
%if %{with tests}
-BuildRequires: python-importlib_resources
-BuildRequires: python-pytest
+BuildRequires: python3-packaging
+BuildRequires: python3-pytest >= 2.4.2
%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.5
-%if %{with tests}
-BuildRequires: python3-pytest
-%endif
-%endif
-BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: rpmbuild(macros) >= 2.044
BuildRequires: rpm-pythonprov
-%{?with_doc:BuildRequires: sphinx-pdg-3}
+%if %{with doc}
+BuildRequires: python3-furo >= 2023.9.10
+BuildRequires: python3-sphinx_issues >= 4.0.0
+BuildRequires: sphinx-pdg-3 >= 7.2.6
+%endif
+Requires: python3-modules >= 1:3.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -75,59 +72,11 @@ Zawiera funkcje do:
- zapytań o informacje organizacyjne dotyczące IEEE OUI i IAB
- zapytań o dane związane ze standardami IP z kluczowych źródeł IANA
-%package -n python3-netaddr
-Summary: A pure Python network address representation and manipulation library
-Summary(pl.UTF-8): Czysto pythonowa biblioteka do reprezentacji i operacji na adresach sieciowych
-Group: Development/Languages/Python
-
-%description -n python3-netaddr
-A pure Python network address representation and manipulation library.
-
-netaddr provides a Pythonic way to work with:
-- IPv4 and IPv6 addresses and subnets (including CIDR notation)
-- MAC (Media Access Control) addresses in multiple presentation
- formats
-- IEEE EUI-64, OUI and IAB identifiers
-- nmap-style IP address ranges
-- a user friendly IP glob-style format
-
-Included are routines for:
-- generating, sorting and summarizing IP addresses
-- converting IP addresses and ranges between various different formats
-- performing set based operations on groups of IP addresses and
- subnets
-- arbitrary IP address range calculations and conversions
-- querying IEEE OUI and IAB organisational information
-- querying of IP standards related data from key IANA data sources
-
-%description -n python3-netaddr -l pl.UTF-8
-Czysto pythonowa biblioteka do reprezentacji i operacji na adresach
-sieciowych.
-
-Zapewnia pythonowe sposoby pracy z:
-- adresami i podsieciami IPv4 i IPv6 (wraz z notacją CIDR)
-- adresami MAC (Media Access Control) w wielu formatach
-- identyfikatorami IEEE EUI-64, OUI i IAB
-- przedziałami adresów IP w stylu nmapa
-- przyjaznym dla użytkownika formacie IP w stylu globów
-
-Zawiera funkcje do:
-- generowania, sortowania i skracania adresów IP
-- konwersji adresów i przedziałów IP między różnymi formatami
-- operacji teoriomnogościowych na grupach adresów i podsieciach IP
-- dowolnych obliczeń i konwersji przedziałów adresów IP
-- zapytań o informacje organizacyjne dotyczące IEEE OUI i IAB
-- zapytań o dane związane ze standardami IP z kluczowych źródeł IANA
-
%package -n netaddr
Summary: An interactive shell for the Python netaddr library
Summary(pl.UTF-8): Interaktywna powłoka do biblioteki Pythona netaddr
Group: Development/Languages/Python
-%if %{with python3}
-Requires: python3-netaddr = %{version}-%{release}
-%else
Requires: %{name} = %{version}-%{release}
-%endif
%description -n netaddr
Interactive shell for the python-netaddr library.
@@ -148,28 +97,15 @@ Dokumentacja API modułu Pythona netaddr.
%prep
%setup -q -n %{module}-%{version}
-%patch -P 0 -p1
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(pwd) \
-%{__python} -m pytest netaddr/tests
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
+%py3_build_pyproject
%if %{with tests}
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
PYTHONPATH=$(pwd) \
%{__python3} -m pytest netaddr/tests
%endif
-%endif
%if %{with doc}
PYTHONPATH=$(pwd) \
@@ -179,38 +115,16 @@ sphinx-build-3 -b html docs/source docs/build/html
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-
-%if %{with python3}
-%{__rm} $RPM_BUILD_ROOT%{_bindir}/*
-%endif
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
+%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc AUTHORS CHANGELOG COPYRIGHT LICENSE README.rst
-%{py_sitescriptdir}/netaddr
-%{py_sitescriptdir}/netaddr-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-netaddr
-%defattr(644,root,root,755)
-%doc AUTHORS CHANGELOG COPYRIGHT LICENSE README.rst
+%doc AUTHORS.rst CHANGELOG.rst COPYRIGHT.rst LICENSE.rst README.rst THANKS.rst
%{py3_sitescriptdir}/netaddr
-%{py3_sitescriptdir}/netaddr-%{version}-py*.egg-info
-%endif
+%{py3_sitescriptdir}/netaddr-%{version}.dist-info
%files -n netaddr
%defattr(644,root,root,755)
diff --git a/netaddr-coding.patch b/netaddr-coding.patch
deleted file mode 100644
index 3eb4bbc..0000000
--- a/netaddr-coding.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- netaddr-0.10.1/netaddr/ip/__init__.py.orig 2024-01-02 17:33:29.000000000 +0100
-+++ netaddr-0.10.1/netaddr/ip/__init__.py 2024-01-18 21:52:12.230699432 +0100
-@@ -1,3 +1,4 @@
-+# coding=utf-8
- #-----------------------------------------------------------------------------
- # Copyright (c) 2008 by David P. D. Moss. All rights reserved.
- #
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-netaddr.git/commitdiff/26b171ae5ad97fb14ee597b2a7c192ab9ee78b49
More information about the pld-cvs-commit
mailing list