2015-12-11 09:52:14 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pyroute2
|
|
|
|
#
|
2021-04-30 09:06:28 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2015-12-11 09:52:14 +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.
|
|
|
|
|
2018-11-13 16:04:24 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-08-08 08:27:17 +00:00
|
|
|
#
|
2015-12-11 09:52:14 +00:00
|
|
|
|
|
|
|
|
2017-07-10 07:14:32 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2015-12-11 09:52:14 +00:00
|
|
|
Name: python-pyroute2
|
2021-04-30 09:06:28 +00:00
|
|
|
Version: 0.5.18
|
2015-12-11 09:52:14 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Python Netlink library
|
2021-04-30 09:06:28 +00:00
|
|
|
License: Apache-2.0 OR GPL-2.0-or-later
|
2019-03-04 11:52:27 +00:00
|
|
|
URL: https://github.com/svinota/pyroute2
|
2017-07-10 07:14:32 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pyroute2/pyroute2-%{version}.tar.gz
|
2020-07-02 14:30:36 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2018-12-06 23:37:15 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
2017-07-10 07:14:32 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-05-20 11:38:19 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-04-30 09:06:28 +00:00
|
|
|
Requires(postun):update-alternatives
|
2015-12-11 09:52:14 +00:00
|
|
|
BuildArch: noarch
|
2017-07-10 07:14:32 +00:00
|
|
|
%python_subpackages
|
2015-12-11 09:52:14 +00:00
|
|
|
|
|
|
|
%description
|
2018-11-13 16:04:24 +00:00
|
|
|
Pyroute2 is a pure Python netlink library. It requires only Python stdlib, no
|
|
|
|
3rd party libraries. The library was started as an RTNL protocol
|
|
|
|
implementation, so the name is pyroute2, but now it supports many netlink
|
|
|
|
protocols. Some supported netlink families and protocols:
|
2015-12-11 09:52:14 +00:00
|
|
|
|
2018-11-13 16:04:24 +00:00
|
|
|
* rtnl, network settings --- addresses, routes, traffic controls
|
|
|
|
* nfnetlink --- netfilter API: ipset, nftables, ...
|
|
|
|
* ipq --- simplest userspace packet filtering, iptables QUEUE target
|
|
|
|
* devlink --- manage and monitor devlink-enabled hardware
|
|
|
|
* generic --- generic netlink families
|
|
|
|
* nl80211 --- wireless functions API (basic support)
|
|
|
|
* taskstats --- extended process statistics
|
|
|
|
* acpi_events --- ACPI events monitoring
|
|
|
|
* thermal_events --- thermal events monitoring
|
|
|
|
* VFS_DQUOT --- disk quota events monitoring
|
2015-12-11 09:52:14 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pyroute2-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-07-10 07:14:32 +00:00
|
|
|
%python_build
|
2015-12-11 09:52:14 +00:00
|
|
|
|
|
|
|
%install
|
2017-07-10 07:14:32 +00:00
|
|
|
%python_install
|
2020-05-20 11:38:19 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyroute2-cli
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/ss2
|
2018-12-06 23:37:15 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2015-12-11 09:52:14 +00:00
|
|
|
|
2019-03-04 11:52:27 +00:00
|
|
|
%check
|
2020-07-02 14:30:36 +00:00
|
|
|
%pytest
|
2019-03-04 11:52:27 +00:00
|
|
|
|
2020-05-20 11:38:19 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative pyroute2-cli
|
|
|
|
%python_install_alternative ss2
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pyroute2-cli
|
|
|
|
%python_uninstall_alternative ss2
|
|
|
|
|
2017-07-10 07:14:32 +00:00
|
|
|
%files %{python_files}
|
2019-03-04 11:52:27 +00:00
|
|
|
%license README.license.md
|
|
|
|
%doc README.md CHANGELOG.md README.report.md
|
2018-11-13 16:04:24 +00:00
|
|
|
%license LICENSE.Apache.v2 LICENSE.GPL.v2
|
2015-12-11 09:52:14 +00:00
|
|
|
%{python_sitelib}/*
|
2020-05-20 11:38:19 +00:00
|
|
|
%python_alternative %{_bindir}/ss2
|
|
|
|
%python_alternative %{_bindir}/pyroute2-cli
|
2015-12-11 09:52:14 +00:00
|
|
|
|
|
|
|
%changelog
|