diff --git a/ethtool-0.13.tar.gz b/ethtool-0.13.tar.gz new file mode 100644 index 0000000..c688b0d --- /dev/null +++ b/ethtool-0.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31234eed156f1fcbb311f56e32c9abe42de62d3766411046d362bf45eae017fe +size 44282 diff --git a/python-ethtool-0.11.tar.bz2 b/python-ethtool-0.11.tar.bz2 deleted file mode 100644 index 3bdc6cf..0000000 --- a/python-ethtool-0.11.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:686756e4b2b239319e8513025debcc0d97103815b0879f94d8234cbbca6ada24 -size 34487 diff --git a/python-ethtool.changes b/python-ethtool.changes index 92b626f..48d4452 100644 --- a/python-ethtool.changes +++ b/python-ethtool.changes @@ -1,8 +1,25 @@ +------------------------------------------------------------------- +Wed Nov 1 15:20:02 UTC 2017 - mc@suse.com + +- provide tools for python3 only again + +------------------------------------------------------------------- +Tue Oct 17 16:20:23 CEST 2017 - mantel@suse.de + +- use update_alternatives for different python versions + ------------------------------------------------------------------- Tue Oct 17 11:22:43 UTC 2017 - jengelh@inai.de - Update descriptions. +------------------------------------------------------------------- +Tue Oct 17 10:46:28 CEST 2017 - mantel@suse.de + +- update to version 0.13 for python3 support +- fix build for python2 and python3 +- drop obsolete patch python-ethtool.patch + ------------------------------------------------------------------- Tue Mar 1 17:01:13 UTC 2016 - olaf@aepfle.de diff --git a/python-ethtool.patch b/python-ethtool.patch deleted file mode 100644 index cdbdcae..0000000 --- a/python-ethtool.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - python-ethtool/ethtool.c | 2 ++ - 1 file changed, 2 insertions(+) - -Index: python-ethtool-0.11/python-ethtool/ethtool.c -=================================================================== ---- python-ethtool-0.11.orig/python-ethtool/ethtool.c -+++ python-ethtool-0.11/python-ethtool/ethtool.c -@@ -26,6 +26,8 @@ - #include - #include - #include -+/* This should have been net/if.h, but libnl3 got it wrong */ -+#include - #include - - #include "etherinfo_struct.h" diff --git a/python-ethtool.spec b/python-ethtool.spec index b99dee2..fb8f18e 100644 --- a/python-ethtool.spec +++ b/python-ethtool.spec @@ -1,5 +1,5 @@ # -# spec file for package python-ethtool +# spec file for package python # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # @@ -16,19 +16,24 @@ # -Name: python-ethtool -Version: 0.11 +%global pypi_name ethtool + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-%{pypi_name} +Version: 0.13 Release: 0 Summary: Ethernet settings Python bindings License: GPL-2.0 Group: Development/Languages/Python -Url: https://fedorahosted.org/python-ethtool/ -Source: https://fedorahosted.org/releases/p/y/python-ethtool/%{name}-%{version}.tar.bz2 -Patch0: python-ethtool.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Url: https://github.com/fedora-python/%{name} +Source: https://files.pythonhosted.org/packages/source/e/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: libnl3-devel -BuildRequires: pkg-config -BuildRequires: python-devel +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%python_subpackages %description Python bindings for the ethtool kernel interface that allows querying and @@ -36,26 +41,26 @@ changing of Ethernet interface settings, such as speed, port, autonegotiation, a PCI locations. %prep -%setup -q -%patch0 -p1 +%setup -q -n %{pypi_name}-%{version} %build +export LANG=C.UTF-8 export CFLAGS="%{optflags}" -python setup.py build +%python_build %install -python setup.py install --root=%{buildroot} --prefix=%{_prefix} +export LANG=C.UTF-8 +%python_install mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_mandir}/man8 -cp -p pethtool.py %{buildroot}%{_sbindir}/pethtool -cp -p pifconfig.py %{buildroot}%{_sbindir}/pifconfig +mv %{buildroot}{%{_bindir},%{_sbindir}}/pifconfig +mv %{buildroot}{%{_bindir},%{_sbindir}}/pethtool -%files +%files %{python_files} %defattr(-,root,root) -%doc COPYING -%{_sbindir}/pethtool -%{_sbindir}/pifconfig -%{python_sitearch}/ethtool.so -%{python_sitearch}/*.egg-info +%doc README.rst CHANGES.rst COPYING +%{python_sitearch}/ +%python3_only %{_sbindir}/pethtool +%python3_only %{_sbindir}/pifconfig %changelog