Mercurial > gub
changeset 3498:4176ddec02c9
argv0 relocation for test-lily/upload.py
author | Han-Wen Nienhuys <hanwen@lilypond.org> |
---|---|
date | Sat, 19 May 2007 01:24:16 -0300 |
parents | b8a30307b108 |
children | 381fda527ccd |
files | test-lily/upload.py |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/test-lily/upload.py Sat May 19 01:24:04 2007 -0300 +++ b/test-lily/upload.py Sat May 19 01:24:16 2007 -0300 @@ -10,10 +10,17 @@ import optparse import pickle -sys.path.insert (0, 'lib') -import versiondb -import misc +def argv0_relocation (): + import os, sys + bindir = os.path.abspath (os.path.dirname (sys.argv[0])) + prefix = os.path.dirname (bindir) + sys.path.insert (0, prefix) + +argv0_relocation () + +from gub import versiondb +from gub import misc platforms = ['linux-x86', 'linux-64', @@ -229,7 +236,7 @@ def get_repository (options): ## do here, because also used in website generation. - import repository + from gub import repository dir = options.repo_dir.replace ('.git','') repo = repository.Git (dir, branch=options.branch)