diff --git a/.gitignore b/.gitignore index e69de29..148e8b0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Scrapy-0.22.0.tar.gz diff --git a/python-scrapy.spec b/python-scrapy.spec new file mode 100644 index 0000000..c737fa8 --- /dev/null +++ b/python-scrapy.spec @@ -0,0 +1,81 @@ +%global pypi_name Scrapy +Name: python-scrapy +Version: 0.22.0 +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 +* Sun Jan 19 2014 Eduardo Echeverria - 0.22.0-1 +- Update to the latest upstream version + +* Sun Jan 19 2014 Eduardo Echeverria - 0.20.2-1 +- Initial packaging diff --git a/sources b/sources index e69de29..1fc8400 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +45dbf2bd28cee792c050ea452a1721ea Scrapy-0.22.0.tar.gz