summaryrefslogtreecommitdiff
path: root/dev-python/rdflib
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-04-28 09:54:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-04-28 09:54:45 +0100
commitb7ebc951da8800f711142f69d9d958bde67a112d (patch)
treee318514216845acb8f2e49fff7a5cba4027e9d91 /dev-python/rdflib
parentdc7cbdfa65fd814b3b9aa3c56257da201109e807 (diff)
gentoo resync : 28.04.2019
Diffstat (limited to 'dev-python/rdflib')
-rw-r--r--dev-python/rdflib/Manifest6
-rw-r--r--dev-python/rdflib/files/rdflib-4.2.2-python3.7-StopIteration.patch72
-rw-r--r--dev-python/rdflib/rdflib-4.2.1.ebuild4
-rw-r--r--dev-python/rdflib/rdflib-4.2.2-r1.ebuild99
-rw-r--r--dev-python/rdflib/rdflib-4.2.2.ebuild2
5 files changed, 178 insertions, 5 deletions
diff --git a/dev-python/rdflib/Manifest b/dev-python/rdflib/Manifest
index 8b4d7bd37b10..4762b119391c 100644
--- a/dev-python/rdflib/Manifest
+++ b/dev-python/rdflib/Manifest
@@ -1,5 +1,7 @@
+AUX rdflib-4.2.2-python3.7-StopIteration.patch 2064 BLAKE2B f9a646703c9f3a0e0767739d171c0649c855354484699f46d4f5a3d9a73979b54d2953ccff3a9d5f85ce1a26f5af2cab87fc24fb25af10a952eccba0d076a0db SHA512 99d28c46f8b857074d111ba09db3f5afe1f7ef1e5970d7c539e9c0f309ab6781ab432a3315a3a2cfe473e0eb38a4df9e81b8185bde1541de74dcc0a739871364
DIST rdflib-4.2.1.tar.gz 889467 BLAKE2B cc5f675646ca7a55ff40d4d98eb138953d8763d8b44b5b495cdc9bb83df16d425214bb681f8f841e053a3cb4d52edd30988afcf2c301a96f699a70d9c129cca5 SHA512 49145f80a9e027847523faed059c16ec1de358bb9d8fc3ab4fd3bf95a88dd181986b1785deedf6e837cf0b064bd74ab8e27fbb5581e33310353da3546ae7b016
DIST rdflib-4.2.2.tar.gz 905094 BLAKE2B fe17b5752f67c745bfdf4a160c2f5d49da19f0d85b6eddc4a65fa0ddb660de8bcc19c3ccecf893fb67f725b973cb94481374d9ee0c82072416a93e44952dba9b SHA512 efc24d8ce1080e59950cecc9c779ae0d63673c8690f74db1772f6c2dbf24d6f4de5214d5870a074bffe549b42d8d5f5d131df29bbfd174b763ae1f843aec7d5c
-EBUILD rdflib-4.2.1.ebuild 2684 BLAKE2B 7683c11fcc2cc52eab51ff618131bd334b969e93fec1a5267376a04928187a5348b1c8287939d385d7e74372dbe101d8c1fff0a7ab7d7bcddfbd79c4691aa13d SHA512 8f52696ab3e53ae1367ee75141c0866fac7fab5d9ac4aa87a02c796c206f3d9f3cea2818298a4a3ca4dc2524175bdb3ba34f40726be4d1a51f4d4cac138f0f38
-EBUILD rdflib-4.2.2.ebuild 2718 BLAKE2B 30a05912878d79190396d1156a65987bef8c8be73ce3f291453052948fba149f8608c9a0395bfb953643013a4fc59aa1d050c56cbf34f0e1c2f2453596e2ed83 SHA512 982c6d29bc73ac58f7566f2227c2c75d120da86cd342bd5137109c32c7dbd73967f61294b5a95ae4179504cd1107c660e7ddce6354a3c93350149cde8db5aa19
+EBUILD rdflib-4.2.1.ebuild 2677 BLAKE2B 709ecd89e9e7a13a40e52aa34dd69f432b5137d885356b01a559126ff58fcbdcf91c47cc311569322e94e16c71986dcaabb55f5ec2ec92df8b5e8de95191101b SHA512 fbf1d0409c293a053e9d7e89c9ceca81daae3f5018a6b36b91a39c0e64637a4958d464cc38cf50a09378337e694e09c5378fdcc7e5d17911fbee7e47517bd99a
+EBUILD rdflib-4.2.2-r1.ebuild 2929 BLAKE2B c83f419cc4bd6ae6234196ed4e9bc8c66544dd5b53774f0e1789aebeda2309a4b9d08869e1633624f81c76a083f058e03c160bdc605cd00e90a8ff444897521e SHA512 b406b89fe031309f0591192c625d18a812f7556b783b8dfdd7188d60425d26af3c24948a32ad8b989ca34bfe2dbeb3e0683baebb5c355a4241d39af7dc20b7d9
+EBUILD rdflib-4.2.2.ebuild 2716 BLAKE2B b694b69fa2e394b14cfe54c50ee2303c8d0fcc8d6ff4d942a8089600f3a9fda25aad6eb7cbba30a17e6a920fb5b68ada72797d86fcd2a341d0aeafd4ef866aa8 SHA512 7a11fc1d1e5b60c3513c5d6cb4fb6cd44a6c876bb47a98ae5b8116788454ca96c57063c4740b28e40730560b4c6dde31e288000896d72c341a518dcff2ab39d9
MISC metadata.xml 462 BLAKE2B a2b02fb03f0966423a2354b593cee26c55aca5d28df913d6bbe9ba0731b093c5499568829736b86d8440c173f40059041905fe49e0a7de3cc5df32ae186241ff SHA512 d9b717e12472862a9071d3d2ad3efffcc053f6890a9a307f882040f77e7304addf30fdceaf94b9a752de5daaf7eae21a68d39311f9997bc1e99c598b5093fd78
diff --git a/dev-python/rdflib/files/rdflib-4.2.2-python3.7-StopIteration.patch b/dev-python/rdflib/files/rdflib-4.2.2-python3.7-StopIteration.patch
new file mode 100644
index 000000000000..389d220dc1b7
--- /dev/null
+++ b/dev-python/rdflib/files/rdflib-4.2.2-python3.7-StopIteration.patch
@@ -0,0 +1,72 @@
+Traceback (most recent call last):
+ File "/var/tmp/portage/dev-python/rdflib-4.2.2/work/rdflib-4.2.2-python3_7/build/src/rdflib/plugins/sparql/evaluate.py", line 330, in evalSlice
+ next(res)
+StopIteration
+
+The above exception was the direct cause of the following exception:
+
+Traceback (most recent call last):
+ File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
+ self.test(*self.arg)
+ File "/var/tmp/portage/dev-python/rdflib-4.2.2/work/rdflib-4.2.2-python3_7/build/src/test/test_dawg.py", line 434, in query_test
+ set(res2)
+ File "/var/tmp/portage/dev-python/rdflib-4.2.2/work/rdflib-4.2.2-python3_7/build/src/rdflib/query.py", line 258, in __iter__
+ for b in self._genbindings:
+RuntimeError: generator raised StopIteration
+
+Patch backported from
+https://github.com/RDFLib/rdflib/commit/58c45d6f30af88a22f60edcb9a459648a885e226
+
+--- a/rdflib/plugins/sparql/evaluate.py
++++ b/rdflib/plugins/sparql/evaluate.py
+@@ -15,6 +15,7 @@
+ """
+
+ import collections
++import itertools
+
+ from rdflib import Variable, Graph, BNode, URIRef, Literal
+
+@@ -323,22 +324,9 @@
+
+
+ def evalSlice(ctx, slice):
+- # import pdb; pdb.set_trace()
+ res = evalPart(ctx, slice.p)
+- i = 0
+- while i < slice.start:
+- res.next()
+- i += 1
+- i = 0
+- for x in res:
+- i += 1
+- if slice.length is None:
+- yield x
+- else:
+- if i <= slice.length:
+- yield x
+- else:
+- break
++
++ return itertools.islice(res, slice.start, slice.start+slice.length if slice.length is not None else None)
+
+
+ def evalReduced(ctx, part):
+--- a/rdflib/query.py
++++ b/rdflib/query.py
+@@ -1,5 +1,6 @@
+
+ import os
++import itertools
+ import shutil
+ import tempfile
+ import warnings
+@@ -181,7 +182,7 @@
+ return self._bindings
+
+ def _set_bindings(self, b):
+- if isinstance(b, types.GeneratorType):
++ if isinstance(b, (types.GeneratorType, itertools.islice)):
+ self._genbindings = b
+ self._bindings = []
+ else:
diff --git a/dev-python/rdflib/rdflib-4.2.1.ebuild b/dev-python/rdflib/rdflib-4.2.1.ebuild
index 58fbcff35e9c..a0d27c6232ad 100644
--- a/dev-python/rdflib/rdflib-4.2.1.ebuild
+++ b/dev-python/rdflib/rdflib-4.2.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_COMPAT=( python{2_7,3_5} )
PYTHON_REQ_USE="sqlite?,threads(+)"
# The usual required for tests
diff --git a/dev-python/rdflib/rdflib-4.2.2-r1.ebuild b/dev-python/rdflib/rdflib-4.2.2-r1.ebuild
new file mode 100644
index 000000000000..2181a2dec6c6
--- /dev/null
+++ b/dev-python/rdflib/rdflib-4.2.2-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
+PYTHON_REQ_USE="sqlite?,threads(+)"
+
+# The usual required for tests
+DISTUTILS_IN_SOURCE_BUILD=1
+
+inherit distutils-r1
+
+DESCRIPTION="RDF library containing a triple store and parser/serializer"
+HOMEPAGE="https://github.com/RDFLib/rdflib https://pypi.org/project/rdflib/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc berkdb examples mysql redland sqlite test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-python/isodate[${PYTHON_USEDEP}]
+ dev-python/html5lib[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ berkdb? ( dev-python/bsddb3[${PYTHON_USEDEP}] )
+ mysql? ( dev-python/mysql-python[$(python_gen_usedep 'python2*')] )
+ redland? ( dev-libs/redland-bindings[python,$(python_gen_usedep 'python2*')] )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? (
+ dev-python/sparql-wrapper[${PYTHON_USEDEP}]
+ >=dev-python/nose-1.3.1-r1[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ # Python 3.7 StopIteration bug
+ "${FILESDIR}"/${PN}-4.2.2-python3.7-StopIteration.patch
+)
+
+python_prepare_all() {
+ # Upstream manufactured .pyc files which promptly break distutils' src_test
+ find -name "*.py[oc~]" -delete || die
+
+ # Bug 358189; take out tests that attempt to connect to the network
+ sed -e "/'--with-doctest',/d" -e "/'--doctest-extension=.doctest',/d" \
+ -e "/'--doctest-tests',/d" -i run_tests.py || die
+
+ sed -e "s: 'sphinx.ext.intersphinx',::" -i docs/conf.py || die
+
+ # doc build requires examples folder at the upper level of docs
+ if use doc; then
+ cd docs || die
+ ln -sf ../examples . || die
+ cd ../ || die
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ # https://github.com/RDFLib/rdflib/issues/510
+ if use doc; then
+ einfo ""
+ einfo "Several warnings and Errors present in the build"
+ einfo "For a complete build, it is required to install"
+ einfo "github.com/gjhiggins/n3_pygments_lexer and"
+ einfo "github.com/gjhiggins/sparql_pygments_lexer"
+ einfo "outside portage via pip or by cloning. These have not been"
+ einfo "given a tagged release by the author and are not in portage"
+ einfo ""
+
+ emake -C docs html
+ HTML_DOCS=( docs/_build/html/. )
+ fi
+}
+
+python_test() {
+ # the default; nose with: --where=./ does not work for python3
+ if python_is_python3; then
+ pushd "${BUILD_DIR}/src/" >/dev/null || die
+ "${EPYTHON}" ./run_tests.py || die "Tests failed under ${EPYTHON}"
+ popd >/dev/null || die
+ else
+ "${EPYTHON}" ./run_tests.py || die "Tests failed under ${EPYTHON}"
+ fi
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-python/rdflib/rdflib-4.2.2.ebuild b/dev-python/rdflib/rdflib-4.2.2.ebuild
index b7f33c5e3d4e..f7f636a1a267 100644
--- a/dev-python/rdflib/rdflib-4.2.2.ebuild
+++ b/dev-python/rdflib/rdflib-4.2.2.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+PYTHON_COMPAT=( python{2_7,3_{5,6}} )
PYTHON_REQ_USE="sqlite?,threads(+)"
# The usual required for tests