From 442ea207e9f1077da4d2bdbb80f93fab5d75eea9 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Mon, 23 Dec 2019 14:23:43 -0600 Subject: [PATCH] Given bup-python, rm vestigial PYTHONPATH settings Signed-off-by: Rob Browning --- t/ns-timestamp-resolutions | 12 +----------- t/subtree-hash | 12 +----------- t/test-meta.sh | 7 +++---- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/t/ns-timestamp-resolutions b/t/ns-timestamp-resolutions index 9927bd5..f8ac60d 100755 --- a/t/ns-timestamp-resolutions +++ b/t/ns-timestamp-resolutions @@ -6,23 +6,13 @@ exec "$bup_python" "$0" ${1+"$@"} # end of bup preamble from __future__ import absolute_import - import os, sys -argv = sys.argv -exe = os.path.realpath(argv[0]) -exepath = os.path.split(exe)[0] or '.' -exeprefix = os.path.split(os.path.abspath(exepath))[0] - -# fix the PYTHONPATH to include our lib dir -libpath = os.path.join(exepath, '..', 'lib') -sys.path[:0] = [libpath] -os.environ['PYTHONPATH'] = libpath + ':' + os.environ.get('PYTHONPATH', '') - import bup.xstat as xstat from bup.helpers import handle_ctrl_c, saved_errors from bup import metadata, options + optspec = """ ns-timestamp-resolutions TEST_FILE_NAME -- diff --git a/t/subtree-hash b/t/subtree-hash index 9d0fca6..062f485 100755 --- a/t/subtree-hash +++ b/t/subtree-hash @@ -6,22 +6,12 @@ exec "$bup_python" "$0" ${1+"$@"} # end of bup preamble from __future__ import absolute_import - import os, sys -argv = sys.argv -exe = os.path.realpath(argv[0]) -exepath = os.path.split(exe)[0] or '.' -exeprefix = os.path.split(os.path.abspath(exepath))[0] - -# fix the PYTHONPATH to include our lib dir -libpath = os.path.join(exepath, '..', 'lib') -sys.path[:0] = [libpath] -os.environ['PYTHONPATH'] = libpath + ':' + os.environ.get('PYTHONPATH', '') - from bup.helpers import handle_ctrl_c, readpipe from bup import options + optspec = """ subtree-hash ROOT_HASH [PATH_ITEM...] -- diff --git a/t/test-meta.sh b/t/test-meta.sh index f51b3c8..e3b79e3 100755 --- a/t/test-meta.sh +++ b/t/test-meta.sh @@ -677,11 +677,10 @@ if [ "$root_status" = root ]; then ( WVPASS mkdir "$testfs"/src/foo WVPASS touch "$testfs"/src/bar - PYTHONPATH="$TOP/lib" \ - WVPASS bup-python -c "from bup import xstat; \ + WVPASS bup-python -c "from bup import xstat; \ x = xstat.timespec_to_nsecs((42, 0));\ - xstat.utime('$testfs/src/foo', (x, x));\ - xstat.utime('$testfs/src/bar', (x, x));" + xstat.utime('$testfs/src/foo', (x, x));\ + xstat.utime('$testfs/src/bar', (x, x));" WVPASS cd "$testfs" WVPASS bup meta -v --create --recurse --file src.meta src WVPASS bup meta -tvf src.meta -- 2.39.2