Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
a1508590e7
!15 [sync] PR-13: enable tests
From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-04-07 02:52:29 +00:00
zhanzhimin
d1043cb53d enable tests
(cherry picked from commit 38771d3398def142fc67f91f01183f58dd976a8e)
2022-04-07 09:11:09 +08:00
openeuler-ci-bot
0a3f96941a !10 update to 0.15
Merge pull request !10 from zhanzhimin/master
2021-12-25 08:20:44 +00:00
zhanzhimin
ec652c570e update to 0.15 2021-12-25 10:05:19 +08:00
openeuler-ci-bot
57a1a2400a !5 delete about python2 package and use python3 replace python2 for build
From: @yeah_wang
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
2020-10-29 20:36:24 +08:00
jinzhimin369
23625cb88e use python3 replace python2 2020-10-29 15:11:12 +08:00
openeuler-ci-bot
15b50549fa !2 add yaml file in package
Merge pull request !2 from gaoch_100/master
2020-07-21 10:09:56 +08:00
openeuler-ci-bot
faecc83851 !3 python-ethtool
Merge pull request !3 from 靳智敏/master
2020-06-19 09:31:58 +08:00
jinzhimin369
f0bd04b628 fix the issue for python version 2020-06-18 17:28:39 +08:00
gaochao_100
46f2ae3dfa add yaml file in package 2020-06-17 14:25:54 +08:00
4 changed files with 27 additions and 39 deletions

Binary file not shown.

BIN
ethtool-0.15.tar.gz Normal file

Binary file not shown.

View File

@ -1,30 +1,22 @@
%bcond_with tests
%bcond_without tests
Name: python-ethtool
Version: 0.14
Version: 0.15
Release: 2
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
Source0: https://files.pythonhosted.org/packages/d2/59/2137996ee2da077e9369ac323830938bfc14083049081d89fdd7f3cf20a5/ethtool-0.15.tar.gz
BuildRequires: python2-devel python3-devel python2-setuptools
BuildRequires: gcc libnl3-devel python3-setuptools
BuildRequires: gcc libnl3-devel python3-setuptools python3-devel
# dependency for tests
BuildRequires: net-tools
%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}
@ -40,25 +32,14 @@ driver, and hardware settings.
%autosetup -n ethtool-%{version} -p1
rm -rf ethtool.egg-info
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
%build
%py2_build
pushd %{py3dir}
%py3_build
popd
%install
%py2_install
pushd %{py3dir}
%py3_install
install -d %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/pethtool %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/pifconfig %{buildroot}%{_sbindir}
popd
install -d %{buildroot}%{_mandir}/man8/
install -p man/*.8.* %{buildroot}%{_mandir}/man8/
@ -66,28 +47,16 @@ rm -rf tests/test_scripts.py
%if %{with tests}
%check
export PYTHONPATH=%{buildroot}%{python2_sitearch}
%{__python2} tests/parse_ifconfig.py -v
%{__python2} -m unittest discover -v
pushd %{py3dir}
export PYTHONPATH=%{buildroot}%{python3_sitearch}
%{__python3} tests/parse_ifconfig.py -v
%{__python3} -m unittest discover -v
popd
%endif
%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-*
%{python3_sitearch}/ethtool-0.14-py?.?.egg-info
%{python3_sitearch}/ethtool.cpython-3*
%{python3_sitearch}/ethtool-0.15-py*
%{_sbindir}/pethtool
%{_sbindir}/pifconfig
@ -96,6 +65,21 @@ popd
%doc %{_mandir}/man*
%changelog
* Wed Apr 06 2022 zhanzhimin <zhanzhimin@h-partners.com> - 0.15-2
- enable tests
* Sat Nov 27 2021 zhanzhimin <zhanzhimin@huawei.com> - 0.15-1
- update to 0.15
* Thu Oct 29 2020 wangye <wangye70@huawei.com> - 0.14-4
- remove python2-ethtool subpackage and delete python2 for build
* Thu Jun 18 2020 jinzhimin <jinzhimin2@huawei.com> - 0.14-3
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:fix the issue for python version
* Thu Nov 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.14-2
- Type:bugfix
- Id:NA

4
python-ethtool.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: ethtool
tag_prefix: "^v"
seperator: "."