Drop python2-ethtool

This commit is contained in:
Miro Hrončok 2019-09-17 21:56:00 +02:00
parent 0b11758131
commit 16a0be9d18

View File

@ -6,19 +6,15 @@
Name: python-%{pypi_name}
Version: 0.14
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Python module to interface with %{pypi_name}
License: GPLv2
URL: https://github.com/fedora-python/%{name}
Source0: https://files.pythonhosted.org/packages/source/e/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Source0: %{pypi_source}
# See https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
BuildRequires: gcc
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -30,15 +26,6 @@ Python bindings for the ethtool kernel interface, that allows querying and
changing of Ethernet card settings, such as speed, port, auto-negotiation, and
PCI locations.
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
Python 2 bindings for the ethtool kernel interface, that allows querying and
changing of Ethernet card settings, such as speed, port, auto-negotiation, and
PCI locations.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
@ -56,17 +43,12 @@ rm -rf %{pypi_name}.egg-info
%build
%py2_build
%py3_build
a2x -d manpage -f manpage man/pethtool.8.asciidoc
a2x -d manpage -f manpage man/pifconfig.8.asciidoc
%install
%py2_install
rm %{buildroot}%{_bindir}/pifconfig
rm %{buildroot}%{_bindir}/pethtool
%py3_install
mkdir -p %{buildroot}%{_sbindir}
mv %{buildroot}{%{_bindir},%{_sbindir}}/pifconfig
@ -78,22 +60,12 @@ cp -p man/*.8 %{buildroot}%{_mandir}/man8/
%if %{with tests}
%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
%endif
%files -n python2-%{pypi_name}
%doc README.rst CHANGES.rst
%license COPYING
%{python2_sitearch}/%{pypi_name}.so
%{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
%files -n python3-%{pypi_name}
%doc README.rst CHANGES.rst
%license COPYING
@ -101,9 +73,12 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
%{_sbindir}/pethtool
%doc %{_mandir}/man8/*
%{python3_sitearch}/%{pypi_name}.cpython-%{python3_version_nodots}*.so
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
%changelog
* Tue Sep 17 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14-5
- Drop python2-ethtool
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14-4
- Rebuilt for Python 3.8