Blob Blame History Raw
%global pypi_name Scrapy
Name:		python-scrapy
Version:	0.24.4
Release:	1%{?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

# empty files
echo "# Just a comment" > scrapy/tests/test_utils_misc/test_walk_modules/mod/mod0.py
echo "# Just a comment" > scrapy/tests/test_utils_misc/test_walk_modules/mod1.py 

%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
* 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