Package init
This commit is contained in:
parent
a2c4aa573a
commit
b6ddb54f78
@ -1,6 +1,7 @@
|
||||
%bcond_with tests
|
||||
Name: python-ethtool
|
||||
Version: 0.14
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Python bindings for the ethtool kernel interface
|
||||
|
||||
License: GPLv2
|
||||
@ -39,30 +40,42 @@ 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/
|
||||
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
|
||||
@ -73,15 +86,21 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||
%files -n python3-ethtool
|
||||
%doc README.rst
|
||||
%license COPYING
|
||||
%{python3_sitearch}/ethtool.cpython-37m-aarch64-linux-gnu.so
|
||||
%{python3_sitearch}/ethtool.cpython-37m-*
|
||||
%{python3_sitearch}/ethtool-0.14-py?.?.egg-info
|
||||
%{_sbindir}/pethtool
|
||||
%{_sbindir}/pifconfig
|
||||
|
||||
%files help
|
||||
%doc CHANGES.rst
|
||||
%doc %{_mandir}/man8/*.8.*
|
||||
%doc %{_mandir}/man*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.14-1
|
||||
- Package Init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user