diff --git a/python-urlgrabber.changes b/python-urlgrabber.changes index e594234..92a57b4 100644 --- a/python-urlgrabber.changes +++ b/python-urlgrabber.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 18 09:10:43 UTC 2020 - Petr Gajdos + +- %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 diff --git a/python-urlgrabber.spec b/python-urlgrabber.spec index 4a285c6..17cf3f3 100644 --- a/python-urlgrabber.spec +++ b/python-urlgrabber.spec @@ -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