commit a2c4aa573aa24e56659c4b5ca957cd0f1f1c7183 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:14:56 2019 -0400 Package init diff --git a/ethtool-0.14.tar.gz b/ethtool-0.14.tar.gz new file mode 100644 index 0000000..9e5257f Binary files /dev/null and b/ethtool-0.14.tar.gz differ diff --git a/python-ethtool.spec b/python-ethtool.spec new file mode 100644 index 0000000..bce8b92 --- /dev/null +++ b/python-ethtool.spec @@ -0,0 +1,87 @@ +Name: python-ethtool +Version: 0.14 +Release: 1 +Summary: Python bindings for the ethtool kernel interface + +License: GPLv2 +URL: https://pypi.org/project/ethtool/ +Source0: https://files.pythonhosted.org/packages/81/41/e6cb9026374771e3bdb4c0fe8ac0c51c693a14b4f72f26275da15f7a4d8b/ethtool-%{version}.tar.gz + +BuildRequires: python2-devel python3-devel python2-setuptools +BuildRequires: gcc libnl3-devel python3-setuptools + +%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 python2-ethtool +Summary: Python 2 bindings for the ethtool kernel interface +%{?python_provide:%python_provide python2-ethtool} + +%description -n python2-ethtool +Python 2 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 +%py2_build +%py3_build + +%install +%py2_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 + +%check +export PYTHONPATH=%{buildroot}%{python2_sitearch} +%{__python2} tests/parse_ifconfig.py -v +%{__python2} -m unittest discover -v + +export PYTHONPATH=%{buildroot}%{python3_sitearch} +%{__python3} tests/parse_ifconfig.py -v +%{__python3} -m unittest discover -v + +%files -n python2-ethtool +%doc README.rst +%license COPYING +%{python2_sitearch}/ethtool.so +%{python2_sitearch}/ethtool-0.14-py?.?.egg-info + +%files -n python3-ethtool +%doc README.rst +%license COPYING +%{python3_sitearch}/ethtool.cpython-37m-aarch64-linux-gnu.so +%{python3_sitearch}/ethtool-0.14-py?.?.egg-info +%{_sbindir}/pethtool +%{_sbindir}/pifconfig + +%files help +%doc CHANGES.rst +%doc %{_mandir}/man8/*.8.* + +%changelog +* Wed Sep 18 2019 openEuler Buildteam - 0.14-1 +- Package Init