summaryrefslogtreecommitdiff
path: root/dev-python/pyquery
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pyquery')
-rw-r--r--dev-python/pyquery/Manifest4
-rw-r--r--dev-python/pyquery/files/pyquery-1.4.0-network-tests.patch22
-rw-r--r--dev-python/pyquery/pyquery-1.2.13-r1.ebuild45
-rw-r--r--dev-python/pyquery/pyquery-1.4.0.ebuild41
4 files changed, 112 insertions, 0 deletions
diff --git a/dev-python/pyquery/Manifest b/dev-python/pyquery/Manifest
index bdc83509cee5..ac0124a87cfd 100644
--- a/dev-python/pyquery/Manifest
+++ b/dev-python/pyquery/Manifest
@@ -1,3 +1,7 @@
+AUX pyquery-1.4.0-network-tests.patch 700 BLAKE2B 6ae1cf19f7ae717df3ce5ea509938d37024b4e06ecb422c91e3ff41992fcd2d2bdcd79f47ebb591fe803dbf6bf5085f2422b575ead44f00b04f3b5abe1237dfd SHA512 b491c1cfc8c917eefed0c261dbc25a91e65db4007ee393b39b666a9043d00d26affd38897f277436ebe18ae2eaf6e817b6001b14f12b43f335b82b22961b28fb
DIST pyquery-1.2.13.tar.gz 44032 BLAKE2B df257c6116b3f8804627a0b4a6556445c644410acdf008fe9afd08136a0a7f47d66b99071cce61a1569853ec9c3c38d20ca66aec0950532e94949b36d4814c3e SHA512 39a2bfe6f1eaefb6d1a78f73e5bdb4d12a9e223b26f6aff0f979ceaa68005ab08e41bdf11fe808489d22e0506e558621982dc59fa2164cd1e3d8168b0ef8ceb6
+DIST pyquery-1.4.0.tar.gz 45215 BLAKE2B cb748c09524f6cc6b22c9712370da754495c31b159a44f02e9b5f00e4e94295d7259d224e63066297e6efd74f0b43a508a56d1df4f4150727cd261b959402e9a SHA512 523bc058fc93332b13840a7249bce5a449b0029f6434043a739a2f24abdd89efb314da8795f1b2be2d7e4464a8e4bdf6b061d768b895d0dd1630f44ee341f37f
+EBUILD pyquery-1.2.13-r1.ebuild 1339 BLAKE2B c5492d641308e94af0b5dbfb6035341981f3cbdfa12e960557f9cc12acc6719b970fed6761ad06f328720fea3312c7f9c8b8d617997116d0953e86e4fa465db7 SHA512 e2725456271a1fb5d86d936042f0b154d1bafa2af8d73bc7969ce968530aa368091e9045ef45e61b3dd2be843389b89bf978e411c246bd03a7f20088a45de613
EBUILD pyquery-1.2.13.ebuild 1333 BLAKE2B dbfb9b5a739efc0495da6770e7dc38ce4aace1f8d796b3bd151ce04f1cf579f66bc4eac720955be5fed6ed983b3c789cbb340e65f1dc53736bb2763896e98794 SHA512 5c105c9db4cef39eb5ea4021bc2aded6f37660986a45625336797c91d676ced037971175b7d836453538b1d4ca61d39e8d6847cbe227ab399aef5db200020575
+EBUILD pyquery-1.4.0.ebuild 1202 BLAKE2B ce2506c468af93ac02073c85c893315026e95dd23a18722ee4e544963f599d7b36ef09776f799635d3c60fdbe6e7b589436ec3d1b8a696bf073b14861f37f9f4 SHA512 e0b797a1ce0aadfdef7573e05aba95a81a32d23a3bd34c8a1408c89d567ebbd373406fd328a644cfabab5827108114c1c325f6c4a01df0bbaecc7dfa81753600
MISC metadata.xml 375 BLAKE2B 6b09c68dc28585cedb0d7109e174b26cdd2ca11c3e8413550f3032a7b2cd11c7745cafc530d7e18692fab76c6c6717e6ba2d92111e2e1df0cae8be73a3e833bd SHA512 ebed84e50582171d8a99f7ee1031553a6afc558f5aa6914f2aa5eacccc7efd6c87b284eec803dd81fef3dd91426fd28f93ae21f6cab1e74c9e4541df3904956f
diff --git a/dev-python/pyquery/files/pyquery-1.4.0-network-tests.patch b/dev-python/pyquery/files/pyquery-1.4.0-network-tests.patch
new file mode 100644
index 000000000000..337728794bb9
--- /dev/null
+++ b/dev-python/pyquery/files/pyquery-1.4.0-network-tests.patch
@@ -0,0 +1,22 @@
+Disable test that requires a network connection.
+
+--- a/tests/test_pyquery.py
++++ b/tests/test_pyquery.py
+@@ -613,10 +613,10 @@
+ self.s.shutdown()
+
+
+-class TestWebScrappingEncoding(TestCase):
+-
+- def test_get(self):
+- d = pq(u'http://ru.wikipedia.org/wiki/Заглавная_страница',
+- method='get')
+- print(d)
+- self.assertEqual(d('#pt-login').text(), u'Войти')
++#class TestWebScrappingEncoding(TestCase):
++#
++# def test_get(self):
++# d = pq(u'http://ru.wikipedia.org/wiki/Заглавная_страница',
++# method='get')
++# print(d)
++# self.assertEqual(d('#pt-login').text(), u'Войти')
diff --git a/dev-python/pyquery/pyquery-1.2.13-r1.ebuild b/dev-python/pyquery/pyquery-1.2.13-r1.ebuild
new file mode 100644
index 000000000000..f3d235eb3121
--- /dev/null
+++ b/dev-python/pyquery/pyquery-1.2.13-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="A jQuery-like library for python"
+HOMEPAGE="https://github.com/gawel/pyquery"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="test"
+
+RDEPEND="
+ >=dev-python/lxml-2.1[${PYTHON_USEDEP}]
+ >dev-python/cssselect-0.7.9[${PYTHON_USEDEP}]
+ >=dev-python/webob-1.1.9[${PYTHON_USEDEP}]"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( ${RDEPEND}
+ dev-python/beautifulsoup[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/webtest[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/restkit[${PYTHON_USEDEP}]' 'python2_7') )"
+
+python_prepare_all() {
+ # Disable tests needing a network connection
+ sed -i -e "s/HAS_REQUEST = True/HAS_REQUEST = False/" tests/test_pyquery.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ # The suite, it appears, requires this hard setting of PYTHONPATH!
+ PYTHONPATH=. nosetests || die "Tests fail with ${EPYTHON}"
+}
+
+pkg_postinst() {
+ optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup
+}
diff --git a/dev-python/pyquery/pyquery-1.4.0.ebuild b/dev-python/pyquery/pyquery-1.4.0.ebuild
new file mode 100644
index 000000000000..9bf1439e941c
--- /dev/null
+++ b/dev-python/pyquery/pyquery-1.4.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="A jQuery-like library for python"
+HOMEPAGE="https://github.com/gawel/pyquery"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="test"
+
+RDEPEND="
+ >=dev-python/lxml-2.1[${PYTHON_USEDEP}]
+ >dev-python/cssselect-0.7.9[${PYTHON_USEDEP}]
+ >=dev-python/webob-1.1.9[${PYTHON_USEDEP}]"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( ${RDEPEND}
+ dev-python/beautifulsoup[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/webtest[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/restkit[${PYTHON_USEDEP}]' 'python2_7') )"
+
+PATCHES=( "${FILESDIR}/${P}-network-tests.patch" )
+
+python_test() {
+ # The suite, it appears, requires this hard setting of PYTHONPATH!
+ PYTHONPATH=. nosetests || die "Tests fail with ${EPYTHON}"
+}
+
+pkg_postinst() {
+ optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup
+}