summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2015-08-31 23:40:19 +0800
committerIan Delaney <idella4@gentoo.org>2015-08-31 23:40:19 +0800
commita34b4f77e0567f61197feba15f52a132a1064cf0 (patch)
tree8f955ad6eb28a69db919e97d7cf2a0ad3becca2d /dev-python/scrapy/scrapy-1.0.3.ebuild
parentkde-misc/kde-gtk-config: improve kde-base/kdelibs-4.14.11 compatibility patch (diff)
downloadgentoo-a34b4f77e0567f61197feba15f52a132a1064cf0.tar.gz
gentoo-a34b4f77e0567f61197feba15f52a132a1064cf0.tar.bz2
gentoo-a34b4f77e0567f61197feba15f52a132a1064cf0.zip
dev-python/scrapy: bump; update and tidy deps
update test phase to run full testsuite, disable failing tests while upstream makes a fix, remove old Package-Manager: portage-2.2.20
Diffstat (limited to 'dev-python/scrapy/scrapy-1.0.3.ebuild')
-rw-r--r--dev-python/scrapy/scrapy-1.0.3.ebuild79
1 files changed, 79 insertions, 0 deletions
diff --git a/dev-python/scrapy/scrapy-1.0.3.ebuild b/dev-python/scrapy/scrapy-1.0.3.ebuild
new file mode 100644
index 000000000000..21f1be088b97
--- /dev/null
+++ b/dev-python/scrapy/scrapy-1.0.3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite(+)"
+
+inherit vcs-snapshot distutils-r1
+
+DESCRIPTION="A high-level Python Screen Scraping framework"
+HOMEPAGE="https://github.com/scrapy/scrapy/ http://pypi.python.org/pypi/Scrapy/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="boto doc ibl test ssl"
+
+RDEPEND="
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
+ dev-libs/libxml2[python,${PYTHON_USEDEP}]
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ ibl? ( dev-python/numpy[${PYTHON_USEDEP}] )
+ ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )
+ boto? ( dev-python/boto[${PYTHON_USEDEP}] )
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ dev-python/twisted-conch[${PYTHON_USEDEP}]
+ dev-python/twisted-mail[${PYTHON_USEDEP}]
+ dev-python/twisted-web[${PYTHON_USEDEP}]
+ >=dev-python/w3lib-1.8.0[${PYTHON_USEDEP}]
+ dev-python/queuelib[${PYTHON_USEDEP}]
+ >=dev-python/cssselect-0.9[${PYTHON_USEDEP}]
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
+ dev-python/service_identity[${PYTHON_USEDEP}]
+ "
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( ${RDEPEND}
+ dev-python/mock[${PYTHON_USEDEP}]
+ =net-proxy/mitmproxy-0.10.1[${PYTHON_USEDEP}]
+ =dev-python/netlib-0.10.1[${PYTHON_USEDEP}]
+ dev-python/jmespath[${PYTHON_USEDEP}]
+ dev-python/testfixtures[${PYTHON_USEDEP}]
+ net-ftp/vsftpd )"
+# pytest-twisted listed as a test dep but not in portage.
+# Testsuite currently survives without it, so appears optional
+
+REQUIRED_USE="test? ( ssl boto )"
+
+python_prepare_all() {
+ # https://github.com/scrapy/scrapy/issues/1464
+ # Disable failing tests known to pass according to upstream
+ # Awaiting a fix planned by package owner.
+ sed -e 's:test_https_connect_tunnel:_&:' \
+ -e 's:test_https_connect_tunnel_error:_&:' \
+ -e 's:test_https_tunnel_auth_error:_&:' \
+ -e 's:test_https_tunnel_without_leak_proxy_authorization_header:_&:' \
+ -i tests/test_proxy_connect.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ if use doc; then
+ PYTHONPATH="${S}" emake -C docs html || die "emake html failed"
+ fi
+}
+
+python_test() {
+ py.test ${PN} tests || die "tests failed"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/build/html/. )
+ distutils-r1_python_install_all
+}