2010-05-12 11:42:20 +00:00
|
|
|
#
|
2011-02-11 00:54:27 +00:00
|
|
|
# spec file for package python-netaddr
|
2010-05-12 11:42:20 +00:00
|
|
|
#
|
2024-01-07 20:55:44 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2010-05-12 11:42:20 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2013-10-24 11:09:07 +00:00
|
|
|
|
2018-12-04 13:42:24 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-05-12 11:42:20 +00:00
|
|
|
#
|
|
|
|
|
2013-10-24 11:09:07 +00:00
|
|
|
|
2023-06-11 20:25:24 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2010-05-12 11:42:20 +00:00
|
|
|
Name: python-netaddr
|
2024-12-05 09:43:29 +00:00
|
|
|
Version: 1.3.0
|
2011-09-14 00:38:31 +00:00
|
|
|
Release: 0
|
2010-05-12 11:42:20 +00:00
|
|
|
Summary: Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses
|
2011-09-20 13:44:24 +00:00
|
|
|
License: BSD-3-Clause
|
2011-09-14 00:38:31 +00:00
|
|
|
Group: Development/Languages/Python
|
2024-12-05 09:43:29 +00:00
|
|
|
URL: https://github.com/netaddr/netaddr
|
2017-08-14 08:05:12 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
|
2024-03-21 09:25:55 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2017-08-14 08:05:12 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2024-03-21 09:25:55 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2024-12-05 09:43:29 +00:00
|
|
|
# SECTION test
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module iniconfig}
|
|
|
|
BuildRequires: %{python_module packaging}
|
|
|
|
BuildRequires: %{python_module pluggy}
|
|
|
|
# /SECTION
|
2017-08-14 08:05:12 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-05-21 18:33:18 +00:00
|
|
|
Requires(post): update-alternatives
|
2024-03-21 09:25:55 +00:00
|
|
|
Requires(postun): update-alternatives
|
2010-05-12 11:42:20 +00:00
|
|
|
BuildArch: noarch
|
2017-08-14 08:05:12 +00:00
|
|
|
%python_subpackages
|
2010-05-12 11:42:20 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A pure Python network address representation and manipulation library.
|
|
|
|
|
|
|
|
netaddr provides a Pythonic way of working with:
|
|
|
|
- IPv4 and IPv6 addresses and subnets (including CIDR notation);
|
|
|
|
- MAC (Media Access Control) addresses in multiple formats;
|
|
|
|
- IEEE EUI-64, OUI and IAB identifiers;
|
|
|
|
- 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.
|
|
|
|
|
|
|
|
%prep
|
2024-03-21 09:25:55 +00:00
|
|
|
%autosetup -p1 -n netaddr-%{version}
|
2024-12-05 09:53:40 +00:00
|
|
|
sed -i "1{\@/usr/bin/env python@d}" netaddr/{cli,ip/iana,eui/ieee}.py # Fix non-executable scripts
|
2010-05-12 11:42:20 +00:00
|
|
|
|
|
|
|
%build
|
2024-03-21 09:25:55 +00:00
|
|
|
%pyproject_wheel
|
2010-05-12 11:42:20 +00:00
|
|
|
|
|
|
|
%install
|
2024-03-21 09:25:55 +00:00
|
|
|
%pyproject_install
|
2020-05-21 18:33:18 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/netaddr
|
2024-03-21 09:25:55 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-08-14 08:05:12 +00:00
|
|
|
|
|
|
|
%check
|
2020-07-06 15:10:29 +00:00
|
|
|
%pytest
|
2010-05-12 11:42:20 +00:00
|
|
|
|
2020-05-21 18:33:18 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative netaddr
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative netaddr
|
|
|
|
|
2017-08-14 08:05:12 +00:00
|
|
|
%files %{python_files}
|
2024-03-21 09:25:55 +00:00
|
|
|
%license LICENSE.rst
|
|
|
|
%doc AUTHORS.rst CHANGELOG.rst COPYRIGHT.rst README.rst
|
2023-09-25 11:09:51 +00:00
|
|
|
%{python_sitelib}/netaddr*
|
2017-08-14 08:05:12 +00:00
|
|
|
%{_bindir}/netaddr-%{python_bin_suffix}
|
2020-05-21 18:33:18 +00:00
|
|
|
%python_alternative %{_bindir}/netaddr
|
2011-03-03 09:55:40 +00:00
|
|
|
|
2011-02-11 00:54:27 +00:00
|
|
|
%changelog
|