[Python-modules-commits] [sparqlwrapper] 09/11: Fix 2to3 corner case for tests

chrysn chrysn-guest at moszumanska.debian.org
Wed Nov 16 11:11:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

chrysn-guest pushed a commit to branch master
in repository sparqlwrapper.

commit 5b09646abaf9811ea4b0fa88f76a1d685303591a
Author: chrysn <chrysn at fsfe.org>
Date:   Tue Nov 8 15:52:49 2016 +0100

    Fix 2to3 corner case for tests
---
 debian/rules | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index efc3c52..247f240 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,7 +20,8 @@ override_dh_auto_test:
 	PYBUILD_TEST_ARGS="cd {build_dir} && nosetests" \
 	dh_auto_test --buildsystem=pybuild
 
-	PYBUILD_BEFORE_TEST_python3='cp -r {dir}/test {build_dir}; 2to3 -w {build_dir}/test' \
+	# sed command is a custom hack that's also present in upstream's run_tests_py3.sh script
+	PYBUILD_BEFORE_TEST_python3='cp -r {dir}/test {build_dir}; 2to3 -w {build_dir}/test; sed -i.sedbak -e "s/urllib2._opener/urllib.request._opener/g" {build_dir}/test/wrapper_test.py' \
 	PYBUILD_AFTER_TEST='rm -rf {build_dir}/test' \
 	PYBUILD_DISABLE_python2=test \
 	PYBUILD_SYSTEM=custom \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sparqlwrapper.git



More information about the Python-modules-commits mailing list