%global pypi_name Scrapy
Name: python-scrapy
Version: 1.0.3
Release: 3%{?dist}
Summary: A high-level Python Screen Scraping framework
License: BSD
URL: http://scrapy.org
Source0: https://pypi.python.org/packages/source/S/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-sphinx
BuildRequires: python-cssselect
BuildRequires: python-lxml
BuildRequires: python-twisted
BuildRequires: python-w3lib
BuildRequires: python-queuelib
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
Requires: pyOpenSSL
Requires: python-twisted
Requires: python-lxml
Requires: python-w3lib
Requires: python-queuelib
Requires: python-zope-interface
Requires: python-cssselect
%description
Scrapy is a fast high-level screen scraping and web crawling
framework, used to crawl websites and extract structured data
from their pages. It can be used for a wide range of purposes,
from data mining to monitoring and automated testing
%package doc
Summary: Documentation for %{name}
Group: Documentation
%description doc
This package contains the documentation for %{name}
%prep
%setup -qn %{pypi_name}-%{version}
# Remove bundled egg
rm -rf Scrapy.egg-info
rm -rf scrapy/tests/test_utils_misc/test.egg
%build
%{__python2} setup.py build
PYTHONPATH=$(pwd) make -C docs html
rm -f docs/build/html/.buildinfo
%install
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
%check
#Tests disabled (needs network connection)
# PYTHONPATH=$(pwd)
# pushd bin
# ./runtests.sh
# popd
%files
%doc LICENSE AUTHORS PKG-INFO
%{python_sitelib}/scrapy
%{python_sitelib}/Scrapy-*.egg-info
%{_bindir}/scrapy
%files doc
%doc docs/build/html
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Nov 1 2015 Eduardo Echeverria <echevemaster@gmail.com> - 1.0.3-1
- Update to the latest upstream version
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.24.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Dec 5 2014 Eduardo Echeverria <echevemaster@gmail.com> - 0.24.4-1
- Update to the latest upstream version
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Jan 19 2014 Eduardo Echeverria <echevemaster@gmail.com> - 0.22.0-1
- Update to the latest upstream version
* Sun Jan 19 2014 Eduardo Echeverria <echevemaster@gmail.com> - 0.20.2-1
- Initial packaging