Package init
This commit is contained in:
parent
a2c4aa573a
commit
b6ddb54f78
@ -1,6 +1,7 @@
|
|||||||
|
%bcond_with tests
|
||||||
Name: python-ethtool
|
Name: python-ethtool
|
||||||
Version: 0.14
|
Version: 0.14
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Python bindings for the ethtool kernel interface
|
Summary: Python bindings for the ethtool kernel interface
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -39,30 +40,42 @@ driver, and hardware settings.
|
|||||||
%autosetup -n ethtool-%{version} -p1
|
%autosetup -n ethtool-%{version} -p1
|
||||||
rm -rf ethtool.egg-info
|
rm -rf ethtool.egg-info
|
||||||
|
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
|
|
||||||
|
pushd %{py3dir}
|
||||||
%py3_build
|
%py3_build
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
%py2_install
|
||||||
|
|
||||||
|
pushd %{py3dir}
|
||||||
%py3_install
|
%py3_install
|
||||||
install -d %{buildroot}%{_sbindir}
|
install -d %{buildroot}%{_sbindir}
|
||||||
mv %{buildroot}%{_bindir}/pethtool %{buildroot}%{_sbindir}
|
mv %{buildroot}%{_bindir}/pethtool %{buildroot}%{_sbindir}
|
||||||
mv %{buildroot}%{_bindir}/pifconfig %{buildroot}%{_sbindir}
|
mv %{buildroot}%{_bindir}/pifconfig %{buildroot}%{_sbindir}
|
||||||
|
popd
|
||||||
|
|
||||||
install -d %{buildroot}%{_mandir}/man8/
|
install -d %{buildroot}%{_mandir}/man8/
|
||||||
install -p man/*.8.* %{buildroot}%{_mandir}/man8/
|
install -p man/*.8.* %{buildroot}%{_mandir}/man8/
|
||||||
rm -rf tests/test_scripts.py
|
rm -rf tests/test_scripts.py
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
export PYTHONPATH=%{buildroot}%{python2_sitearch}
|
export PYTHONPATH=%{buildroot}%{python2_sitearch}
|
||||||
%{__python2} tests/parse_ifconfig.py -v
|
%{__python2} tests/parse_ifconfig.py -v
|
||||||
%{__python2} -m unittest discover -v
|
%{__python2} -m unittest discover -v
|
||||||
|
|
||||||
|
pushd %{py3dir}
|
||||||
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||||
%{__python3} tests/parse_ifconfig.py -v
|
%{__python3} tests/parse_ifconfig.py -v
|
||||||
%{__python3} -m unittest discover -v
|
%{__python3} -m unittest discover -v
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n python2-ethtool
|
%files -n python2-ethtool
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
@ -73,15 +86,21 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
|||||||
%files -n python3-ethtool
|
%files -n python3-ethtool
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{python3_sitearch}/ethtool.cpython-37m-aarch64-linux-gnu.so
|
%{python3_sitearch}/ethtool.cpython-37m-*
|
||||||
%{python3_sitearch}/ethtool-0.14-py?.?.egg-info
|
%{python3_sitearch}/ethtool-0.14-py?.?.egg-info
|
||||||
%{_sbindir}/pethtool
|
%{_sbindir}/pethtool
|
||||||
%{_sbindir}/pifconfig
|
%{_sbindir}/pifconfig
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc CHANGES.rst
|
%doc CHANGES.rst
|
||||||
%doc %{_mandir}/man8/*.8.*
|
%doc %{_mandir}/man*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.14-1
|
||||||
- Package Init
|
- Package Init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user