python-ethtool/python-ethtool.spec

91 lines
2.4 KiB
RPMSpec
Raw Normal View History

%bcond_without tests
2019-09-30 11:14:56 -04:00
Name: python-ethtool
2021-11-27 18:23:21 +08:00
Version: 0.15
Release: 2
2019-09-30 11:14:56 -04:00
Summary: Python bindings for the ethtool kernel interface
License: GPLv2
URL: https://pypi.org/project/ethtool/
2021-11-27 18:23:21 +08:00
Source0: https://files.pythonhosted.org/packages/d2/59/2137996ee2da077e9369ac323830938bfc14083049081d89fdd7f3cf20a5/ethtool-0.15.tar.gz
2019-09-30 11:14:56 -04:00
2020-10-29 15:11:12 +08:00
BuildRequires: gcc libnl3-devel python3-setuptools python3-devel
# dependency for tests
BuildRequires: net-tools
2019-09-30 11:14:56 -04:00
%description
Python bindings for the ethtool kernel interface. The Python ethtool
module allows querying and partially controlling network interfaces,
driver, and hardware settings.
%package -n python3-ethtool
Summary: Python 3 bindings for the ethtool kernel interface
%{?python_provide:%python_provide python3-ethtool}
%description -n python3-ethtool
Python 3 bindings for the ethtool kernel interface. The Python ethtool
module allows querying and partially controlling network interfaces,
driver, and hardware settings.
%package_help
%prep
%autosetup -n ethtool-%{version} -p1
rm -rf ethtool.egg-info
%build
%py3_build
%install
%py3_install
install -d %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/pethtool %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/pifconfig %{buildroot}%{_sbindir}
install -d %{buildroot}%{_mandir}/man8/
install -p man/*.8.* %{buildroot}%{_mandir}/man8/
rm -rf tests/test_scripts.py
2019-12-13 16:02:50 +08:00
%if %{with tests}
2019-09-30 11:14:56 -04:00
%check
export PYTHONPATH=%{buildroot}%{python3_sitearch}
%{__python3} tests/parse_ifconfig.py -v
%{__python3} -m unittest discover -v
2019-12-13 16:02:50 +08:00
%endif
2019-09-30 11:14:56 -04:00
%files -n python3-ethtool
%doc README.rst
%license COPYING
2020-06-18 17:28:39 +08:00
%{python3_sitearch}/ethtool.cpython-3*
2021-11-27 18:23:21 +08:00
%{python3_sitearch}/ethtool-0.15-py*
2019-09-30 11:14:56 -04:00
%{_sbindir}/pethtool
%{_sbindir}/pifconfig
%files help
%doc CHANGES.rst
2019-12-13 16:02:50 +08:00
%doc %{_mandir}/man*
2019-09-30 11:14:56 -04:00
%changelog
* Wed Apr 06 2022 zhanzhimin <zhanzhimin@h-partners.com> - 0.15-2
- enable tests
2021-11-27 18:23:21 +08:00
* Sat Nov 27 2021 zhanzhimin <zhanzhimin@huawei.com> - 0.15-1
- update to 0.15
2020-10-29 15:11:12 +08:00
* Thu Oct 29 2020 wangye <wangye70@huawei.com> - 0.14-4
- remove python2-ethtool subpackage and delete python2 for build
2020-06-18 17:28:39 +08:00
* Thu Jun 18 2020 jinzhimin <jinzhimin2@huawei.com> - 0.14-3
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:fix the issue for python version
2019-12-13 16:02:50 +08:00
* Thu Nov 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.14-2
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:Modify the file name for x86
2019-09-30 11:14:56 -04:00
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.14-1
- Package Init