zephyr_mirror: Auto-detect Python version for pyzephyr path.

(imported from commit e2aca3a08f8aa12b43d71acffcc0e2249feb7ca7)
This commit is contained in:
Tim Abbott 2013-08-19 14:16:47 -04:00
parent f51b5a5b0d
commit 97be689411
2 changed files with 3 additions and 2 deletions

View file

@ -28,9 +28,10 @@ parser.add_option('--root-path',
# The 'api' directory needs to go first, so that 'import zulip' won't pick up # The 'api' directory needs to go first, so that 'import zulip' won't pick up
# some other directory named 'humbug'. # 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/"), 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"),
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] options.root_path]
mit_user = 'tabbott/extra@ATHENA.MIT.EDU' mit_user = 'tabbott/extra@ATHENA.MIT.EDU'

View file

@ -937,7 +937,7 @@ if __name__ == "__main__":
# The 'api' directory needs to go first, so that 'import zulip' won't pick # The 'api' directory needs to go first, so that 'import zulip' won't pick
# up some other directory named 'humbug'. # 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'), sys.path[:0] = [os.path.join(options.root_path, 'api'),
options.root_path, options.root_path,
os.path.join(options.root_path, "python-zephyr"), os.path.join(options.root_path, "python-zephyr"),