forked from pool/python-netaddr
- Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-netaddr?expand=0&rev=41
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 21 10:00:05 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 16 10:07:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
Wed Jul 16 10:07:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -16,7 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
%bcond_without libalternatives
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-netaddr
|
Name: python-netaddr
|
||||||
Version: 1.3.0
|
Version: 1.3.0
|
||||||
@@ -29,11 +33,16 @@ 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: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: alts
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
# SECTION test
|
# SECTION test
|
||||||
BuildRequires: %{python_module iniconfig}
|
BuildRequires: %{python_module iniconfig}
|
||||||
BuildRequires: %{python_module packaging}
|
BuildRequires: %{python_module packaging}
|
||||||
@@ -74,6 +83,12 @@ sed -i "1{\@%{_bindir}/env python@d}" netaddr/{cli,ip/iana,eui/ieee}.py # Fix no
|
|||||||
%check
|
%check
|
||||||
%pytest
|
%pytest
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative netaddr
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative netaddr
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%python_libalternatives_reset_alternative netaddr
|
%python_libalternatives_reset_alternative netaddr
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user