forked from pool/python-netaddr
Accepting request 818948 from home:mnhauke:network:automation
- Update to version 0.8.0 * Fixed weak reference support in classes with __slots__ * Added __bytes__ to IPAddress for intuitive usage * Added format() function to EUI * Added IPNetwork.netmask property setter * Added support for IABs in the 40:D8:55 OUI * Drastically optimized spanning_cidr() * Fixed "x.x.x.x/x" in IPNetwork tests * Added support for passing iterables of IPRange to IPSet and cidr_merge() Bugfixes: * N log N complexity instead of linear * Efficiently creating a large IPSet from a list of IPRanges? * Weak reference support - Run testsuite OBS-URL: https://build.opensuse.org/request/show/818948 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netaddr?expand=0&rev=25
This commit is contained in:
committed by
Git OBS Bridge
parent
ab487329ec
commit
97b1c875af
@@ -17,18 +17,22 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
#%%bcond_without test
|
||||
Name: python-netaddr
|
||||
Version: 0.7.19
|
||||
Version: 0.8.0
|
||||
Release: 0
|
||||
Summary: Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/drkjam/netaddr
|
||||
Source: https://files.pythonhosted.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
|
||||
BuildRequires: %{python_module importlib-metadata}
|
||||
BuildRequires: %{python_module importlib_resources}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-importlib-metadata
|
||||
Requires: python-importlib_resources
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
@@ -53,7 +57,7 @@ Included are routines for:
|
||||
|
||||
%prep
|
||||
%setup -q -n netaddr-%{version}
|
||||
sed -i "1d" netaddr/{ip/iana,eui/ieee,tests/__init__}.py # Fix non-executable scripts
|
||||
sed -i "1d" netaddr/{cli,ip/iana,eui/ieee,tests/__init__}.py # Fix non-executable scripts
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -63,10 +67,8 @@ sed -i "1d" netaddr/{ip/iana,eui/ieee,tests/__init__}.py # Fix non-executable sc
|
||||
%python_clone -a %{buildroot}%{_bindir}/netaddr
|
||||
%fdupes %{buildroot}
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%python_exec setup.py test
|
||||
%endif
|
||||
%pytest
|
||||
|
||||
%post
|
||||
%python_install_alternative netaddr
|
||||
@@ -75,10 +77,10 @@ sed -i "1d" netaddr/{ip/iana,eui/ieee,tests/__init__}.py # Fix non-executable sc
|
||||
%python_uninstall_alternative netaddr
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc AUTHORS CHANGELOG COPYRIGHT README.rst
|
||||
%{python_sitelib}/*
|
||||
%{_bindir}/netaddr-%{python_bin_suffix}
|
||||
%python_alternative %{_bindir}/netaddr
|
||||
%license LICENSE
|
||||
%doc AUTHORS CHANGELOG COPYRIGHT README.md
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user