Permalink
Browse files

CBD-465: Set script path to environment path

On 64bit windows, py2exe doesn't support to bundle everything
as oen executable. As result, .exe file may sit in different
directory from support dlls and other pyd files.

Change-Id: Idc09e8016b43725823f99e1113dffb72a1598b77
Reviewed-on: http://review.couchbase.org/18981
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>
  • Loading branch information...
bcui6611 committed Jul 28, 2012
1 parent 779bda9 commit d6606d22d7984dc0b3738f2f1602711c244592bc
Showing with 6 additions and 0 deletions.
  1. +6 −0 cbdocloader
View
@@ -124,6 +124,12 @@ class DocLoader:
self.bucket.view(view, stale="update_after")
def main():
+ if os.name == 'nt':
+ mydir = os.path.dirname(sys.argv[0])
+ bin_dir = os.path.join(mydir, '..')
+ path = [mydir, bin_dir, os.environ['PATH']]
+ os.environ['PATH'] = ';'.join(path)
+
docloader = DocLoader()
# parse options and arguments

0 comments on commit d6606d2

Please sign in to comment.