14
0

- Convert to libalternatives

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netaddr?expand=0&rev=39
This commit is contained in:
2025-07-16 10:07:31 +00:00
committed by Git OBS Bridge
parent b3651f2b14
commit 50b25ac9ae
2 changed files with 16 additions and 13 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jul 16 10:07:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Dec 5 09:53:32 UTC 2024 - Matej Cepl <mcepl@cepl.eu> Thu Dec 5 09:53:32 UTC 2024 - Matej Cepl <mcepl@cepl.eu>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-netaddr # spec file for package python-netaddr
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,7 @@
# #
%bcond_without libalternatives
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-netaddr Name: python-netaddr
Version: 1.3.0 Version: 1.3.0
@@ -28,17 +29,17 @@ Source: https://files.pythonhosted.org/packages/source/n/netaddr/netaddr
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
BuildArch: noarch
# SECTION test # SECTION test
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module iniconfig} BuildRequires: %{python_module iniconfig}
BuildRequires: %{python_module packaging} BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pluggy} BuildRequires: %{python_module pluggy}
BuildRequires: %{python_module pytest}
# /SECTION # /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages %python_subpackages
%description %description
@@ -60,7 +61,7 @@ Included are routines for:
%prep %prep
%autosetup -p1 -n netaddr-%{version} %autosetup -p1 -n netaddr-%{version}
sed -i "1{\@/usr/bin/env python@d}" netaddr/{cli,ip/iana,eui/ieee}.py # Fix non-executable scripts sed -i "1{\@%{_bindir}/env python@d}" netaddr/{cli,ip/iana,eui/ieee}.py # Fix non-executable scripts
%build %build
%pyproject_wheel %pyproject_wheel
@@ -73,11 +74,8 @@ sed -i "1{\@/usr/bin/env python@d}" netaddr/{cli,ip/iana,eui/ieee}.py # Fix non-
%check %check
%pytest %pytest
%post %pre
%python_install_alternative netaddr %python_libalternatives_reset_alternative netaddr
%postun
%python_uninstall_alternative netaddr
%files %{python_files} %files %{python_files}
%license LICENSE.rst %license LICENSE.rst