python-pyroute2/python-pyroute2.spec

88 lines
2.7 KiB
RPMSpec
Raw Normal View History

2022-12-06 15:37:05 +08:00
%global _empty_manifest_terminate_build 0
2023-05-05 16:20:03 +08:00
%global srcname pyroute2
2020-11-02 10:19:49 +08:00
Name: python-pyroute2
2023-07-17 11:39:53 +08:00
Version: 0.7.9
Release: 2
2020-11-02 10:19:49 +08:00
Summary: Python Netlink library
2022-12-09 10:55:32 +08:00
License: GPL-2.0-or-later and Apache-2.0
2020-11-02 10:19:49 +08:00
URL: https://github.com/svinota/pyroute2
2023-07-17 11:39:53 +08:00
Source0: https://files.pythonhosted.org/packages/f9/f4/5aa161de059353367a3505a8647f475d11f5ce2af4d2375651a2166a1ef3/pyroute2-0.7.9.tar.gz
2020-11-02 10:19:49 +08:00
BuildArch: noarch
Patch1: 0001-add-system-call-of-setns-at-sw_64.patch
2020-05-12 10:58:33 +08:00
%description
2020-11-02 10:19:49 +08:00
Pyroute2 is a pure Python **netlink** library. The core 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.
2020-05-12 10:58:33 +08:00
%package -n python3-pyroute2
2020-11-02 10:19:49 +08:00
Summary: Python Netlink library
2022-12-06 15:37:05 +08:00
Provides: python-pyroute2 = %{version}-%{release}
2020-11-02 10:19:49 +08:00
BuildRequires: python3-devel
BuildRequires: python3-setuptools
2023-05-05 16:20:03 +08:00
BuildRequires: python3-pip
BuildRequires: python3-wheel
Requires: python3-psutil
2020-05-12 10:58:33 +08:00
%description -n python3-pyroute2
2020-11-02 10:19:49 +08:00
Pyroute2 for python3 is a pure Python **netlink** library. The core 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.
2020-05-12 10:58:33 +08:00
2020-11-02 10:19:49 +08:00
%package help
Summary: Development documents and examples for pyroute2
Provides: python3-pyroute2-doc
%description help
Development documents and examples for pyroute2.
2020-05-12 10:58:33 +08:00
%prep
%autosetup -n pyroute2-%{version} -p1
2020-05-12 10:58:33 +08:00
%build
2023-05-05 16:20:03 +08:00
%pyproject_build
2020-05-12 10:58:33 +08:00
%install
2023-07-17 11:39:53 +08:00
%pyproject_install
2020-11-02 10:19:49 +08:00
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
2023-05-05 16:20:03 +08:00
%files -n python3-pyroute2
2023-07-17 11:39:53 +08:00
%license LICENSE*
%doc README*
2023-05-05 16:20:03 +08:00
%{_bindir}/ss2
%{_bindir}/%{srcname}-cli
%{_bindir}/%{srcname}-dhcp-client
%{_bindir}/%{srcname}-test-platform
2023-07-17 11:39:53 +08:00
%{python3_sitelib}/pr2modules
%{python3_sitelib}/pyroute2
%{python3_sitelib}/pyroute2*.dist-info/
2020-11-02 10:19:49 +08:00
2023-05-05 16:20:03 +08:00
%files help
2020-11-02 10:19:49 +08:00
%{_docdir}/*
2020-05-12 10:58:33 +08:00
%changelog
* Thu Oct 19 2023 zhangxianting <zhangxianting@uniontech.com> - 0.7.9-2
- Add system call of setns at sw_64
2023-07-17 11:39:53 +08:00
* Mon Jul 17 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.7.9-1
- Update package to version 0.7.9
2023-05-05 16:20:03 +08:00
* Fri May 05 2023 wangkai <13474090681@163.com> - 0.7.3-3
- Compling package with pyproject
2022-12-09 10:55:32 +08:00
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 0.7.3-2
- License compliance rectification
2022-12-06 15:37:05 +08:00
* Mon Dec 05 2022 liqiuyu <liqiuyu@kylinos.cn> - 0.7.3-1
- Update package to version 0.7.3
2020-11-02 10:19:49 +08:00
* Fri Oct 23 2020 wutao <wutao61@huawei.com> - 0.5.14-1
- upgrade and disable python2 build
2022-06-17 07:53:55 +00:00
* Tue May 12 2020 hexiaowen <hexiaowen@huawei.com> - 0.5.3-6
2020-05-12 10:58:33 +08:00
- init packaging