%global srcname w3lib Name: python-%{srcname} Version: 1.17.0 Release: 1%{?dist} Summary: Library of web-related functions Group: Development/Languages License: BSD URL: https://github.com/scrapy/w3lib Source0: https://files.pythonhosted.org/packages/source/w/%{srcname}/%{srcname}-%{version}.tar.gz # Usually pypi packages does not include license boilerplate. # so, I've downloaded it from the project github repository # wget -N https://raw.githubusercontent.com/scrapy/w3lib/master/LICENSE -O LICENSE-w3lib Source1: LICENSE-w3lib BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python3-devel BuildRequires: python3-setuptools %description This is a Python library of web-related functions, such as: - Remove comments, or tags from HTML snippets - Extract base url from HTML snippets - Translate entites on HTML strings - Encoding mulitpart/form-data - Convert raw HTTP headers to dicts and vice-versa - Construct HTTP auth header - Converting HTML pages to unicode - RFC-compliant url joining - Sanitize urls (like browsers do) - Extract arguments from urls %package -n python2-%{srcname} Summary: %{summary} Requires: python-six %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} This is a Python2 library of web-related functions, such as: - Remove comments, or tags from HTML snippets - Extract base url from HTML snippets - Translate entites on HTML strings - Encoding mulitpart/form-data - Convert raw HTTP headers to dicts and vice-versa - Construct HTTP auth header - Converting HTML pages to unicode - RFC-compliant url joining - Sanitize urls (like browsers do) - Extract arguments from urls %package -n python3-%{srcname} Summary: %{summary} Requires: python3-six %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} This is a Python3 library of web-related functions, such as: - Remove comments, or tags from HTML snippets - Extract base url from HTML snippets - Translate entites on HTML strings - Encoding mulitpart/form-data - Convert raw HTTP headers to dicts and vice-versa - Construct HTTP auth header - Converting HTML pages to unicode - RFC-compliant url joining - Sanitize urls (like browsers do) - Extract arguments from urls %prep %setup -qn %{srcname}-%{version} # Remove bundled egg rm -rf w3lib.egg-info # copy LICENSE-w3lib file to sources as well. cp -a %{SOURCE1} . %build %py2_build %py3_build %install rm -rf %{buildroot} %py2_install %py3_install %files -n python2-%{srcname} %doc README.rst %license LICENSE-w3lib %{python2_sitelib}/w3lib/ %{python2_sitelib}/w3lib-*.egg-info %files -n python3-%{srcname} %doc README.rst %license LICENSE-w3lib %{python3_sitelib}/w3lib/ %{python3_sitelib}/w3lib-*.egg-info %changelog * Wed Feb 22 2017 Eduardo Echeverria - 1.17.0-1 - Update tp the latest upstream version * Sat Feb 11 2017 Fedora Release Engineering - 1.14.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro HronĨok - 1.14.3-2 - Rebuild for Python 3.6 * Wed Jul 27 2016 Dominika Krejci - 1.14.3-1 - Update to 1.14.3 - Add Python3 * Tue Jul 19 2016 Fedora Release Engineering - 1.11.0-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.11.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 1.11.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Feb 15 2015 Eduardo Echeverria - 1.11.0-1 - Updated to new upstream version * Sun Jun 08 2014 Fedora Release Engineering - 1.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Sep 09 2013 Daniel Bruno - 1.3-2 - Adjusting the spec for Fedora patterns * Mon Sep 02 2013 Daniel Bruno - 1.3-1 - First version of RPM Package of w3lib