14
0

Accepting request 808040 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/808040
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netaddr?expand=0&rev=23
This commit is contained in:
2020-05-28 07:11:25 +00:00
committed by Git OBS Bridge
2 changed files with 19 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu May 21 10:56:34 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 4 12:50:45 UTC 2018 - Matej Cepl <mcepl@suse.com> Tue Dec 4 12:50:45 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-netaddr # spec file for package python-netaddr
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 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
@@ -24,11 +24,13 @@ Release: 0
Summary: Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses Summary: Pythonic manipulation of IPv4, IPv6, CIDR, EUI and MAC network addresses
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Languages/Python Group: Development/Languages/Python
Url: http://github.com/drkjam/netaddr URL: https://github.com/drkjam/netaddr
Source: https://files.pythonhosted.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/n/netaddr/netaddr-%{version}.tar.gz
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -58,7 +60,7 @@ sed -i "1d" netaddr/{ip/iana,eui/ieee,tests/__init__}.py # Fix non-executable sc
%install %install
%python_install %python_install
%python_clone %{buildroot}%{_bindir}/netaddr %python_clone -a %{buildroot}%{_bindir}/netaddr
%fdupes %{buildroot} %fdupes %{buildroot}
%if %{with test} %if %{with test}
@@ -66,10 +68,17 @@ sed -i "1d" netaddr/{ip/iana,eui/ieee,tests/__init__}.py # Fix non-executable sc
%python_exec setup.py test %python_exec setup.py test
%endif %endif
%post
%python_install_alternative netaddr
%postun
%python_uninstall_alternative netaddr
%files %{python_files} %files %{python_files}
%{python_sitelib}/* %{python_sitelib}/*
%{_bindir}/netaddr-%{python_bin_suffix} %{_bindir}/netaddr-%{python_bin_suffix}
%python3_only %{_bindir}/netaddr %python_alternative %{_bindir}/netaddr
%doc AUTHORS CHANGELOG COPYRIGHT README.md LICENSE %license LICENSE
%doc AUTHORS CHANGELOG COPYRIGHT README.md
%changelog %changelog