14
0

Accepting request 679030 from home:mcepl:branches:devel:languages:python

- Update to the upstream version 4.0.0:
  * Port to Python 3 rocket
  * Add curl_obj option to grabber
  * Throw an obvious error message when urlgrabber-ext-down is
    missing when attempting to use external downloader
  * Use setuptools for setup.py instead of distutils

OBS-URL: https://build.opensuse.org/request/show/679030
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urlgrabber?expand=0&rev=31
This commit is contained in:
2019-02-25 18:00:58 +00:00
committed by Git OBS Bridge
parent 526fbefc40
commit 4192a3124d
8 changed files with 87 additions and 282 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-urlgrabber
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,20 +19,20 @@
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python3 1
%define modname urlgrabber
Name: python-urlgrabber
Version: 3.9.1
Version: 4.0.0
Release: 0
Summary: A high-level cross-protocol url-grabber
License: LGPL-2.1-only
Group: Development/Languages/Python
URL: http://urlgrabber.baseurl.org
Source: https://files.pythonhosted.org/packages/source/u/urlgrabber/urlgrabber-%{version}.tar.gz
Source: https://github.com/rpm-software-management/%{modname}/releases/download/%{modname}-4-0-0/%{modname}-%{version}.tar.gz
Patch0: grabber_fix.diff
# PATCH-FIX-UPSTREAM bnc#896844
Patch1: python-urlgrabber-3.9.1-preserve-queryparams-in-urls.patch
Patch2: declare-dollar-sign-as-safe-in-urlquote.patch
Patch3: python-urlgrabber-3.9.1-set-SSL_VERIFYHOST-correct.dif
BuildRequires: %{python_module pycurl}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pycurl
@@ -47,10 +47,7 @@ throttling, authentication, proxies and more.
%prep
%setup -q -n urlgrabber-%{version}
sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes bnc#781323
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%autopatch -p1
%build
%python_build
@@ -58,6 +55,7 @@ sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes bnc#781
%install
%python_install
rm -rf %{buildroot}%{_datadir}/doc/urlgrabber-%{version} # Remove wrongly installed docs
mv -v %{buildroot}%{_usr}/libexec/urlgrabber-ext-down %{buildroot}%{_usr}/lib/urlgrabber-ext-down
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
@@ -65,5 +63,6 @@ rm -rf %{buildroot}%{_datadir}/doc/urlgrabber-%{version} # Remove wrongly instal
%doc ChangeLog README TODO
%{_bindir}/urlgrabber
%{python_sitelib}/*
%{_usr}/lib/urlgrabber*
%changelog