15
0

Accepting request 1287773 from devel:languages:python

- Switch to pyproject macros.
- List files and directories explicitly in %files.

OBS-URL: https://build.opensuse.org/request/show/1287773
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-ethtool?expand=0&rev=9
This commit is contained in:
2025-06-23 13:05:03 +00:00
committed by Git OBS Bridge
2 changed files with 13 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jun 23 01:31:14 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
- List files and directories explicitly in %files.
-------------------------------------------------------------------
Tue Feb 13 13:02:43 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-ethtool
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,17 +17,17 @@
%global pypi_name ethtool
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-%{pypi_name}
Version: 0.15
Release: 0
Summary: Ethernet settings Python bindings
License: GPL-2.0-only
Group: Development/Languages/Python
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 pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: libnl3-devel
# needs ifconfig for tests (to check feature parity)
@@ -50,10 +50,10 @@ rm tests/test_scripts.py
%build
export CFLAGS="%{optflags}"
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
mkdir -p %{buildroot}%{_sbindir}
mv %{buildroot}{%{_bindir},%{_sbindir}}/pifconfig
@@ -80,7 +80,8 @@ mv %{buildroot}{%{_bindir},%{_sbindir}}/pethtool
%files %{python_files}
%license COPYING
%doc README.rst CHANGES.rst
%{python_sitearch}/
%{python_sitearch}/ethtool.cpython-*-linux-gnu.so
%{python_sitearch}/ethtool-%{version}.dist-info
%python_alternative %{_sbindir}/pethtool
%python_alternative %{_sbindir}/pifconfig