summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2015-08-19 18:01:31 +0800
committerIan Delaney <idella4@gentoo.org>2015-08-19 18:05:32 +0800
commite6bd20e91370b305de7765965d657742785855fc (patch)
tree14326f78eeacac23209c44865185fe8e0c3102c2 /dev-python/rdflib
parentdev-python/rdflib: take out doctests from test phase, fixes Bug #358189 (diff)
downloadgentoo-e6bd20e91370b305de7765965d657742785855fc.tar.gz
gentoo-e6bd20e91370b305de7765965d657742785855fc.tar.bz2
gentoo-e6bd20e91370b305de7765965d657742785855fc.zip
dev-python/rdflib: add -test.patch
fixes upstream https://github.com/RDFLib/rdflib/issues/396 Package-Manager: portage-2.2.20
Diffstat (limited to 'dev-python/rdflib')
-rw-r--r--dev-python/rdflib/files/rdflib-4-test.patch41
-rw-r--r--dev-python/rdflib/rdflib-4.1.2.ebuild11
-rw-r--r--dev-python/rdflib/rdflib-4.2.0.ebuild10
3 files changed, 47 insertions, 15 deletions
diff --git a/dev-python/rdflib/files/rdflib-4-test.patch b/dev-python/rdflib/files/rdflib-4-test.patch
new file mode 100644
index 000000000000..e79e3ff2a6eb
--- /dev/null
+++ b/dev-python/rdflib/files/rdflib-4-test.patch
@@ -0,0 +1,41 @@
+https://github.com/joernhees/rdflib/commit/36335d5d178ffbcc0422b8b8ee7444893a30ed84
+diff --git a/test/test_issue375.py b/test/test_issue375.py
+index 29726b9..17f168b 100644
+--- a/test/test_issue375.py
++++ b/test/test_issue375.py
+@@ -1,4 +1,6 @@
++import os
+ import subprocess
++import sys
+ import re
+
+ rdfa_expected = u'''@prefix dc: <http://purl.org/dc/terms/> .
+@@ -146,6 +148,9 @@
+ rdfa:usesVocabulary schema: .
+ '''.strip()
+
++env = os.environ.copy()
++env['PYTHONPATH'] = '.:' + env.get('PYTHONPATH', '')
++
+ def test_rdfpipe_bytes_vs_str():
+ """
+ Issue 375: rdfpipe command generates bytes vs. str TypeError
+@@ -155,7 +160,7 @@ def test_rdfpipe_bytes_vs_str():
+ rdfpipe to ensure that we get the expected results.
+ """
+ args = ['python', 'rdflib/tools/rdfpipe.py', '-i', 'rdfa1.1', 'test/rdfa/oreilly.html']
+- proc = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True)
++ proc = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True, env=env)
+ res = ''
+ while proc.poll() is None:
+ res += proc.stdout.read()
+@@ -170,7 +175,7 @@ def test_rdfpipe_mdata_open():
+ the open() builtin instead.
+ """
+ args = ['python', 'rdflib/tools/rdfpipe.py', '-i', 'mdata', 'test/mdata/codelab.html']
+- proc = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True)
++ proc = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines=True, env=env)
+ res = ''
+ while proc.poll() is None:
+ res += proc.stdout.read()
+
diff --git a/dev-python/rdflib/rdflib-4.1.2.ebuild b/dev-python/rdflib/rdflib-4.1.2.ebuild
index ea599e27a076..72974e69a1fd 100644
--- a/dev-python/rdflib/rdflib-4.1.2.ebuild
+++ b/dev-python/rdflib/rdflib-4.1.2.ebuild
@@ -1,4 +1,3 @@
-
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -34,6 +33,8 @@ DEPEND="${RDEPEND}
test? ( dev-python/sparql-wrapper[${PYTHON_USEDEP}]
>=dev-python/nose-1.3.1-r1[${PYTHON_USEDEP}] )"
+PATCHES=( "${FILESDIR}"/${PN}-4-test.patch )
+
python_prepare_all() {
# Upstream manufactured .pyc files which promptly break distutils' src_test
find -name "*.py[oc~]" -delete || die
@@ -46,15 +47,9 @@ python_prepare_all() {
}
python_test() {
+ # the default; nose with: --where=./ does not work for python3
if python_is_python3; then
pushd "${BUILD_DIR}/src/" > /dev/null
- if [[ "${EPYTHON}" == 'python3.4' ]]; then
- sed -e 's:test_rdfpipe_bytes_vs_str:_&:' \
- -e 's:test_rdfpipe_mdata_open:_&:' \
- -i test/test_issue375.py || die
- sed -e 's:testHTML:_&:' \
- -i test/test_xmlliterals.py || die
- fi
"${PYTHON}" ./run_tests.py || die "Tests failed under ${EPYTHON}"
popd > /dev/null
else
diff --git a/dev-python/rdflib/rdflib-4.2.0.ebuild b/dev-python/rdflib/rdflib-4.2.0.ebuild
index 294c0a58657f..88878bec6ec2 100644
--- a/dev-python/rdflib/rdflib-4.2.0.ebuild
+++ b/dev-python/rdflib/rdflib-4.2.0.ebuild
@@ -33,6 +33,8 @@ DEPEND="${RDEPEND}
test? ( dev-python/sparql-wrapper[${PYTHON_USEDEP}]
>=dev-python/nose-1.3.1-r1[${PYTHON_USEDEP}] )"
+PATCHES=( "${FILESDIR}"/${PN}-4-test.patch )
+
python_prepare_all() {
# Upstream manufactured .pyc files which promptly break distutils' src_test
find -name "*.py[oc~]" -delete || die
@@ -45,15 +47,9 @@ python_prepare_all() {
}
python_test() {
+ # the default; nose with: --where=./ does not work for python3
if python_is_python3; then
pushd "${BUILD_DIR}/src/" > /dev/null
- if [[ "${EPYTHON}" == 'python3.4' ]]; then
- sed -e 's:test_rdfpipe_bytes_vs_str:_&:' \
- -e 's:test_rdfpipe_mdata_open:_&:' \
- -i test/test_issue375.py || die
- sed -e 's:testHTML:_&:' \
- -i test/test_xmlliterals.py || die
- fi
"${PYTHON}" ./run_tests.py || die "Tests failed under ${EPYTHON}"
popd > /dev/null
else