2007-01-15 23:34:25 +00:00
|
|
|
#
|
2011-09-20 12:24:46 +00:00
|
|
|
# spec file for package python-urlgrabber
|
2007-01-15 23:34:25 +00:00
|
|
|
#
|
2020-05-19 08:50:50 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2007-01-15 23:34:25 +00:00
|
|
|
#
|
2008-09-26 13:10:02 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-04 14:12:08 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-15 23:34:25 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-05-29 14:24:34 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2019-02-25 18:00:58 +00:00
|
|
|
%define modname urlgrabber
|
2020-05-20 08:01:49 +00:00
|
|
|
# package expects urlgrabber-ext-down in /usr/libexec
|
|
|
|
%define _libexecdir /usr/libexec
|
2007-01-15 23:34:25 +00:00
|
|
|
Name: python-urlgrabber
|
2019-10-09 07:20:32 +00:00
|
|
|
Version: 4.1.0
|
2011-09-20 12:24:46 +00:00
|
|
|
Release: 0
|
2007-01-15 23:34:25 +00:00
|
|
|
Summary: A high-level cross-protocol url-grabber
|
2018-05-29 14:24:34 +00:00
|
|
|
License: LGPL-2.1-only
|
2020-05-20 08:01:49 +00:00
|
|
|
Group: Development/Libraries/Python
|
2019-02-27 09:52:20 +00:00
|
|
|
URL: https://github.com/rpm-software-management/urlgrabber
|
2019-10-09 07:20:32 +00:00
|
|
|
Source: https://github.com/rpm-software-management/%{modname}/releases/download/%{modname}-4-1-0/%{modname}-%{version}.tar.gz
|
2018-05-29 14:24:34 +00:00
|
|
|
BuildRequires: %{python_module pycurl}
|
2019-02-25 18:00:58 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: %{python_module six}
|
2018-05-29 14:24:34 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2011-09-20 12:24:46 +00:00
|
|
|
Requires: python-pycurl
|
2019-02-27 10:36:53 +00:00
|
|
|
Requires: python-six
|
2020-05-19 08:50:50 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2009-08-13 00:46:44 +00:00
|
|
|
BuildArch: noarch
|
2018-05-29 14:24:34 +00:00
|
|
|
%python_subpackages
|
2007-01-15 23:34:25 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n urlgrabber-%{version}
|
2019-02-27 09:45:46 +00:00
|
|
|
# Remove with next release
|
2012-10-01 09:55:49 +00:00
|
|
|
sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes bnc#781323
|
2007-01-15 23:34:25 +00:00
|
|
|
|
|
|
|
%build
|
2018-05-29 14:24:34 +00:00
|
|
|
%python_build
|
2007-01-15 23:34:25 +00:00
|
|
|
|
|
|
|
%install
|
2018-05-29 14:24:34 +00:00
|
|
|
%python_install
|
2020-05-19 08:50:50 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/urlgrabber
|
2020-05-20 08:01:49 +00:00
|
|
|
%python_clone -a %{buildroot}%{_libexecdir}/urlgrabber-ext-down
|
2018-05-29 14:24:34 +00:00
|
|
|
rm -rf %{buildroot}%{_datadir}/doc/urlgrabber-%{version} # Remove wrongly installed docs
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2007-01-15 23:34:25 +00:00
|
|
|
|
2020-05-19 08:50:50 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative urlgrabber
|
2020-05-20 08:01:49 +00:00
|
|
|
%{python_expand %{_sbindir}/update-alternatives --quiet --install %{_libexecdir}/urlgrabber-ext-down urlgrabber-ext-down %{_libexecdir}/urlgrabber-ext-down-%{$python_version} %{$python_version_nodots}}
|
2020-05-19 08:50:50 +00:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative urlgrabber
|
|
|
|
|
2018-05-29 14:24:34 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc ChangeLog README TODO
|
2020-05-19 08:50:50 +00:00
|
|
|
%python_alternative %{_bindir}/urlgrabber
|
2020-05-20 08:01:49 +00:00
|
|
|
%python_alternative %{_libexecdir}/urlgrabber-ext-down
|
2011-09-20 12:24:46 +00:00
|
|
|
%{python_sitelib}/*
|
2020-05-19 08:50:50 +00:00
|
|
|
|
2008-02-21 00:59:28 +00:00
|
|
|
%changelog
|