python-pyroute2/python-pyroute2.spec

85 lines
2.5 KiB
RPMSpec
Raw Normal View History

2022-12-06 15:37:05 +08:00
%global _empty_manifest_terminate_build 0
2020-11-02 10:19:49 +08:00
Name: python-pyroute2
2022-12-06 15:37:05 +08:00
Version: 0.7.3
2020-11-02 10:19:49 +08:00
Release: 1
Summary: Python Netlink library
2022-12-06 15:37:05 +08:00
License: GPLv2+ and Apache-2.0
2020-11-02 10:19:49 +08:00
URL: https://github.com/svinota/pyroute2
2022-12-06 15:37:05 +08:00
Source0: https://files.pythonhosted.org/packages/9c/e6/8d163b1aea84223696fef8f8c55566adf166b79d614d602469d64af00226/pyroute2-0.7.3.tar.gz
Source1: setup.py
2020-11-02 10:19:49 +08:00
BuildArch: noarch
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
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
2022-12-06 15:37:05 +08:00
%autosetup -n pyroute2-%{version}
cp %{SOURCE1} ./
2020-05-12 10:58:33 +08:00
%build
%py3_build
%install
%py3_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
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}/*
2022-12-06 15:37:05 +08:00
%files help -f doclist.lst
2020-11-02 10:19:49 +08:00
%{_docdir}/*
2020-05-12 10:58:33 +08:00
%changelog
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