From 97be689411c63f6b735d646099800d64635cf215 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 19 Aug 2013 14:16:47 -0400 Subject: [PATCH] zephyr_mirror: Auto-detect Python version for pyzephyr path. (imported from commit e2aca3a08f8aa12b43d71acffcc0e2249feb7ca7) --- bots/check-mirroring | 3 ++- bots/zephyr_mirror_backend.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bots/check-mirroring b/bots/check-mirroring index 50dca1b..4e755ac 100755 --- a/bots/check-mirroring +++ b/bots/check-mirroring @@ -28,9 +28,10 @@ parser.add_option('--root-path', # The 'api' directory needs to go first, so that 'import zulip' won't pick up # some other directory named 'humbug'. +pyzephyr_lib_path = "python-zephyr/build/lib.linux-%s-%s/" % (os.uname()[4], sys.version[0:3]) sys.path[:0] = [os.path.join(options.root_path, "api/"), os.path.join(options.root_path, "python-zephyr"), - os.path.join(options.root_path, "python-zephyr/build/lib.linux-x86_64-2.6/"), + os.path.join(options.root_path, pyzephyr_lib_path), options.root_path] mit_user = 'tabbott/extra@ATHENA.MIT.EDU' diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index f4085af..8168ae2 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -937,7 +937,7 @@ if __name__ == "__main__": # The 'api' directory needs to go first, so that 'import zulip' won't pick # up some other directory named 'humbug'. - pyzephyr_lib_path = "python-zephyr/build/lib.linux-" + os.uname()[4] + "-2.6/" + pyzephyr_lib_path = "python-zephyr/build/lib.linux-%s-%s/" % (os.uname()[4], sys.version[0:3]) sys.path[:0] = [os.path.join(options.root_path, 'api'), options.root_path, os.path.join(options.root_path, "python-zephyr"),