14
0

Accepting request 806983 from home:pgajdos:python

- %python3_only -> %python_alternative
- urlgrabber-ext-down is expected to reside under /usr/libexec

OBS-URL: https://build.opensuse.org/request/show/806983
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urlgrabber?expand=0&rev=39
This commit is contained in:
Tomáš Chvátal
2020-05-19 08:50:50 +00:00
committed by Git OBS Bridge
parent dd145d2074
commit 237d268449
2 changed files with 31 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon May 18 09:10:43 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
- urlgrabber-ext-down is expected to reside under /usr/libexec
-------------------------------------------------------------------
Wed Oct 9 07:16:52 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-urlgrabber
#
# 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
@@ -16,6 +16,8 @@
#
%define _libexecdir /usr/libexec
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modname urlgrabber
Name: python-urlgrabber
@@ -23,6 +25,7 @@ Version: 4.1.0
Release: 0
Summary: A high-level cross-protocol url-grabber
License: LGPL-2.1-only
Group: Development/Libraries/Python
URL: https://github.com/rpm-software-management/urlgrabber
Source: https://github.com/rpm-software-management/%{modname}/releases/download/%{modname}-4-1-0/%{modname}-%{version}.tar.gz
BuildRequires: %{python_module pycurl}
@@ -30,8 +33,11 @@ BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: %{name}-ext-down
Requires: python-pycurl
Requires: python-six
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@@ -40,6 +46,13 @@ A high-level cross-protocol url-grabber for python supporting HTTP, FTP
and file locations. Features include keepalive, byte ranges,
throttling, authentication, proxies and more.
%package ext-down
Summary: External Downloader
Group: Development/Libraries/Python
%description ext-down
A very simple external downloader.
%prep
%setup -q -n urlgrabber-%{version}
# Remove with next release
@@ -50,15 +63,23 @@ sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes bnc#781
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/urlgrabber
rm -rf %{buildroot}%{_datadir}/doc/urlgrabber-%{version} # Remove wrongly installed docs
mv -v %{buildroot}%{_prefix}/libexec/urlgrabber-ext-down %{buildroot}%{_prefix}/lib/urlgrabber-ext-down
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative urlgrabber
%postun
%python_uninstall_alternative urlgrabber
%files %{python_files}
%license LICENSE
%doc ChangeLog README TODO
%python3_only %{_bindir}/urlgrabber
%python_alternative %{_bindir}/urlgrabber
%{python_sitelib}/*
%python3_only %{_prefix}/lib/urlgrabber*
%files ext-down
%{_libexecdir}/urlgrabber-ext-down
%changelog