14
0

Accepting request 807678 from home:pgajdos:python

- %python3_only -> %python_alternative

OBS-URL: https://build.opensuse.org/request/show/807678
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pythonwhois?expand=0&rev=8
This commit is contained in:
Tomáš Chvátal
2020-05-20 11:41:16 +00:00
committed by Git OBS Bridge
parent bdc5d0c278
commit ea0245f697
2 changed files with 18 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 20 07:26:55 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
-------------------------------------------------------------------
Sat Mar 16 11:38:52 UTC 2019 - Sebastian Wagner <sebix+novell.com@sebix.at>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pythonwhois
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@ Release: 0
Summary: Python whois library
License: WTFPL
Group: Development/Languages/Python
Url: http://cryto.net/pythonwhois
URL: http://cryto.net/pythonwhois
#Source: https://files.pythonhosted.org/packages/source/p/pythonwhois/pythonwhois-%%{version}.tar.gz
# github tarball includes docs and tests (which require network)
Source: https://github.com/joepie91/python-whois/archive/%{commit}.zip#/%{name}-%{version}.zip
@@ -34,11 +34,12 @@ BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%ifpython3
Conflicts: perl-Net-Whois-Raw
%endif
BuildArch: noarch
%python_subpackages
%description
@@ -56,14 +57,19 @@ sed -i 's/\(\s*regex = re.sub(r"\\\\s.*\)r"\\s\(.*\)>\\S\(.*\)/\1r"\\\\s\2>\\\\S
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pwhois
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone %{buildroot}%{_bindir}/pwhois
%post
%python_install_alternative pwhois
%postun
%python_uninstall_alternative pwhois
%files %{python_files}
%doc README.md doc/*.html
%license LICENSE.txt
%{_bindir}/pwhois-%{python_bin_suffix}
%python3_only %{_bindir}/pwhois
%python_alternative %{_bindir}/pwhois
%{python_sitelib}/*
%changelog