From ecdac123787b96ce6649f0f91da12ea6458cc2b1 Mon Sep 17 00:00:00 2001 From: Palica Date: Tue, 23 Jun 2020 22:35:08 +0200 Subject: Updating liguros repo --- dev-python/pyquery/Manifest | 1 + .../files/pyquery-1.4.1-network-tests.patch | 20 ++++++++++ .../pyquery/files/pyquery-1.4.1-tests-pypy.patch | 20 ++++++++++ dev-python/pyquery/metadata.xml | 13 +++++++ dev-python/pyquery/pyquery-1.4.1-r1.ebuild | 45 ++++++++++++++++++++++ 5 files changed, 99 insertions(+) create mode 100644 dev-python/pyquery/Manifest create mode 100644 dev-python/pyquery/files/pyquery-1.4.1-network-tests.patch create mode 100644 dev-python/pyquery/files/pyquery-1.4.1-tests-pypy.patch create mode 100644 dev-python/pyquery/metadata.xml create mode 100644 dev-python/pyquery/pyquery-1.4.1-r1.ebuild (limited to 'dev-python/pyquery') diff --git a/dev-python/pyquery/Manifest b/dev-python/pyquery/Manifest new file mode 100644 index 000000000000..b4cd5f54f220 --- /dev/null +++ b/dev-python/pyquery/Manifest @@ -0,0 +1 @@ +DIST pyquery-1.4.1.tar.gz 47983 BLAKE2B eb8d0ca59122734a4c715c33f40fd0b5fcc8edcabe9e41649ddf332feb1df603f8527a668aa7b9d78974b3d049e774355296644abd9b4d426d96e6e3c7a74065 SHA512 e2bfbbf51f99a408e9696a2b9c15f8875813847a10b5bd93c4c7a6886ac1b3ae6c7883ec4fb64e9bccab2127617843961e181044fe927f3c80c8ac363ed86141 diff --git a/dev-python/pyquery/files/pyquery-1.4.1-network-tests.patch b/dev-python/pyquery/files/pyquery-1.4.1-network-tests.patch new file mode 100644 index 000000000000..37664689c0fd --- /dev/null +++ b/dev-python/pyquery/files/pyquery-1.4.1-network-tests.patch @@ -0,0 +1,20 @@ +diff --git a/tests/test_pyquery.py b/tests/test_pyquery.py +index ca38a83..d29b27b 100644 +--- a/tests/test_pyquery.py ++++ b/tests/test_pyquery.py +@@ -6,6 +6,7 @@ + import os + import sys + import time ++import unittest + from lxml import etree + from pyquery.pyquery import PyQuery as pq, no_default + from pyquery.openers import HAS_REQUEST +@@ -889,6 +890,7 @@ class TestWebScrapping(TestCase): + + class TestWebScrappingEncoding(TestCase): + ++ @unittest.skip("needs internet") + def test_get(self): + d = pq(u'http://ru.wikipedia.org/wiki/Заглавная_страница', + method='get') diff --git a/dev-python/pyquery/files/pyquery-1.4.1-tests-pypy.patch b/dev-python/pyquery/files/pyquery-1.4.1-tests-pypy.patch new file mode 100644 index 000000000000..f5f160a138de --- /dev/null +++ b/dev-python/pyquery/files/pyquery-1.4.1-tests-pypy.patch @@ -0,0 +1,20 @@ +diff --git a/tests/test_pyquery.py b/tests/test_pyquery.py +index d29b27b..e6a9230 100644 +--- a/tests/test_pyquery.py ++++ b/tests/test_pyquery.py +@@ -7,6 +7,7 @@ import os + import sys + import time + import unittest ++import platform + from lxml import etree + from pyquery.pyquery import PyQuery as pq, no_default + from pyquery.openers import HAS_REQUEST +@@ -33,6 +34,7 @@ path_to_invalid_file = os.path.join(dirname, 'invalid.xml') + + class TestUnicode(TestCase): + ++ @unittest.skipIf(sys.hexversion > 0x3000000 and 'pypy' in platform.python_implementation().lower(), "broken on pypy3") + def test_unicode(self): + xml = pq(u"

é

") + self.assertEqual(type(xml.html()), text_type) diff --git a/dev-python/pyquery/metadata.xml b/dev-python/pyquery/metadata.xml new file mode 100644 index 000000000000..1430f3101657 --- /dev/null +++ b/dev-python/pyquery/metadata.xml @@ -0,0 +1,13 @@ + + + + + python@gentoo.org + Python + + + pyquery + gawel/pyquery + + gentoo-staging + diff --git a/dev-python/pyquery/pyquery-1.4.1-r1.ebuild b/dev-python/pyquery/pyquery-1.4.1-r1.ebuild new file mode 100644 index 000000000000..adc9c3894e40 --- /dev/null +++ b/dev-python/pyquery/pyquery-1.4.1-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 ) + +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 ~ppc ppc64 s390 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=" + test? ( ${RDEPEND} + dev-python/beautifulsoup[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/nose[${PYTHON_USEDEP}] + dev-python/webtest[${PYTHON_USEDEP}] + )" + +RESTRICT+=" !test? ( test )" + +PATCHES=( + "${FILESDIR}/pyquery-1.4.1-network-tests.patch" + "${FILESDIR}/pyquery-1.4.1-tests-pypy.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 +} -- cgit v1.3.1