14
0

Accepting request 807472 from home:pgajdos:python

- urlgrabber-ext-down as an alternative

OBS-URL: https://build.opensuse.org/request/show/807472
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urlgrabber?expand=0&rev=41
This commit is contained in:
Tomáš Chvátal
2020-05-20 08:01:49 +00:00
committed by Git OBS Bridge
parent a6afe92912
commit 66c2379c3b
2 changed files with 11 additions and 11 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 20 07:47:54 UTC 2020 - pgajdos@suse.com
- urlgrabber-ext-down as an alternative
-------------------------------------------------------------------
Mon May 18 09:10:43 UTC 2020 - Petr Gajdos <pgajdos@suse.com>

View File

@@ -16,14 +16,16 @@
#
%define _libexecdir /usr/libexec
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define modname urlgrabber
# package expects urlgrabber-ext-down in /usr/libexec
%define _libexecdir /usr/libexec
Name: python-urlgrabber
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}
@@ -31,7 +33,6 @@ BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: %{modname}-ext-down
Requires: python-pycurl
Requires: python-six
Requires(post): update-alternatives
@@ -44,12 +45,6 @@ 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 -n %{modname}-ext-down
Summary: External Downloader
%description -n %{modname}-ext-down
A very simple external downloader.
%prep
%setup -q -n urlgrabber-%{version}
# Remove with next release
@@ -61,11 +56,13 @@ sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes bnc#781
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/urlgrabber
%python_clone -a %{buildroot}%{_libexecdir}/urlgrabber-ext-down
rm -rf %{buildroot}%{_datadir}/doc/urlgrabber-%{version} # Remove wrongly installed docs
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative urlgrabber
%{python_expand %{_sbindir}/update-alternatives --quiet --install %{_libexecdir}/urlgrabber-ext-down urlgrabber-ext-down %{_libexecdir}/urlgrabber-ext-down-%{$python_version} %{$python_version_nodots}}
%postun
%python_uninstall_alternative urlgrabber
@@ -74,9 +71,7 @@ rm -rf %{buildroot}%{_datadir}/doc/urlgrabber-%{version} # Remove wrongly instal
%license LICENSE
%doc ChangeLog README TODO
%python_alternative %{_bindir}/urlgrabber
%python_alternative %{_libexecdir}/urlgrabber-ext-down
%{python_sitelib}/*
%files -n %{modname}-ext-down
%{_libexecdir}/urlgrabber-ext-down
%changelog