80 lines
2.3 KiB
RPMSpec
80 lines
2.3 KiB
RPMSpec
Name: python-pyroute2
|
|
Version: 0.5.14
|
|
Release: 1
|
|
Summary: Python Netlink library
|
|
License: dual license GPLv2+ and Apache v2
|
|
URL: https://github.com/svinota/pyroute2
|
|
Source0: https://files.pythonhosted.org/packages/0b/71/2920f854ef3cbb8472aa70539cf63fcc214e5c1b40f21c7cdb4910a6f5e9/pyroute2-0.5.14.tar.gz
|
|
BuildArch: noarch
|
|
|
|
|
|
%description
|
|
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.
|
|
|
|
%package -n python3-pyroute2
|
|
Summary: Python Netlink library
|
|
Provides: python-pyroute2
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
%description -n python3-pyroute2
|
|
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.
|
|
|
|
%package help
|
|
Summary: Development documents and examples for pyroute2
|
|
Provides: python3-pyroute2-doc
|
|
%description help
|
|
Development documents and examples for pyroute2.
|
|
|
|
%prep
|
|
%autosetup -n pyroute2-0.5.14
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
%install
|
|
%py3_install
|
|
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
|
|
pushd %{buildroot}
|
|
if [ -d usr/lib ]; then
|
|
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/lib64 ]; then
|
|
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/bin ]; then
|
|
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/sbin ]; then
|
|
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
touch doclist.lst
|
|
if [ -d usr/share/man ]; then
|
|
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
|
|
fi
|
|
popd
|
|
mv %{buildroot}/filelist.lst .
|
|
mv %{buildroot}/doclist.lst .
|
|
|
|
%files -n python3-pyroute2 -f filelist.lst
|
|
%dir %{python3_sitelib}/*
|
|
|
|
%files help
|
|
%{_docdir}/*
|
|
|
|
%changelog
|
|
* Fri Oct 23 2020 wutao <wutao61@huawei.com> - 0.5.14-1
|
|
- upgrade and disable python2 build
|
|
|
|
* Tue May 12 2020 hexiaowen <hexiaowen@huawei.com> - 0.5.3-6
|
|
- init packaging
|