diff --git a/python-urlgrabber.changes b/python-urlgrabber.changes index f23d055..b7a4260 100644 --- a/python-urlgrabber.changes +++ b/python-urlgrabber.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue May 29 14:23:52 UTC 2018 - mcepl@suse.com + +- Clean SPEC file + +------------------------------------------------------------------- +Thu Aug 24 13:56:44 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Thu Feb 12 13:42:05 CET 2015 - mc@suse.de @@ -142,3 +152,4 @@ Sun Aug 14 02:04:14 CEST 2005 - cthiel@suse.de - initial package (version 2.9.6) + diff --git a/python-urlgrabber.spec b/python-urlgrabber.spec index e15788c..714def0 100644 --- a/python-urlgrabber.spec +++ b/python-urlgrabber.spec @@ -1,7 +1,7 @@ # # spec file for package python-urlgrabber # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -16,30 +16,29 @@ # +%{!?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 Name: python-urlgrabber Version: 3.9.1 Release: 0 -Url: http://urlgrabber.baseurl.org Summary: A high-level cross-protocol url-grabber -License: LGPL-2.1 +License: LGPL-2.1-only Group: Development/Languages/Python -Source: http://pypi.python.org/packages/source/u/urlgrabber/urlgrabber-%{version}.tar.gz +URL: http://urlgrabber.baseurl.org +Source: https://files.pythonhosted.org/packages/source/u/urlgrabber/urlgrabber-%{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 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-pycurl +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pycurl} +BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-pycurl -%if 0%{?suse_version} -%py_requires -%if 0%{?suse_version} > 1110 BuildArch: noarch -%endif -%endif -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%python_subpackages %description A high-level cross-protocol url-grabber for python supporting HTTP, FTP @@ -55,15 +54,16 @@ sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes bnc#781 %patch3 -p1 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -rm -rf %{buildroot}/usr/share/doc/urlgrabber-%{version} # Remove wrongly installed docs +%python_install +rm -rf %{buildroot}%{_datadir}/doc/urlgrabber-%{version} # Remove wrongly installed docs +%python_expand %fdupes %{buildroot}%{$python_sitelib} -%files -%defattr(-,root,root,-) -%doc ChangeLog LICENSE README TODO +%files %{python_files} +%license LICENSE +%doc ChangeLog README TODO %{_bindir}/urlgrabber %{python_sitelib}/*