[glib] win32/gen_util_scripts.py: Make it path agnostic
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] win32/gen_util_scripts.py: Make it path agnostic
- Date: Wed, 24 May 2017 05:19:49 +0000 (UTC)
commit 79e73da2e52e860015860e68d13e5f4840238cfc
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed May 24 13:16:55 2017 +0800
win32/gen_util_scripts.py: Make it path agnostic
win32/gen_util_scripts.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/win32/gen_util_scripts.py b/win32/gen_util_scripts.py
index ad0e11e..5052505 100644
--- a/win32/gen_util_scripts.py
+++ b/win32/gen_util_scripts.py
@@ -7,6 +7,7 @@ import argparse
from replace import replace_multi
def main(argv):
+ srcroot = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
parser = argparse.ArgumentParser(description='Generate Utility Scripts')
parser.add_argument('-t', '--type', help='Script Type (glib-mkenums or gdbus-codegen)', required=True)
parser.add_argument('--version', help='Package Version', required=True)
@@ -17,12 +18,12 @@ def main(argv):
'@GLIB_VERSION@': args.version}
if args.type == 'glib-mkenums':
- replace_multi('../gobject/glib-mkenums.in',
- '../gobject/glib-mkenums',
+ replace_multi(srcroot + '/gobject/glib-mkenums.in',
+ srcroot + '/gobject/glib-mkenums',
replace_items)
elif args.type == 'gdbus-codegen':
- replace_multi('../gio/gdbus-2.0/codegen/gdbus-codegen.in',
- '../gio/gdbus-2.0/codegen/gdbus-codegen',
+ replace_multi(srcroot + '/gio/gdbus-2.0/codegen/gdbus-codegen.in',
+ srcroot + '/gio/gdbus-2.0/codegen/gdbus-codegen',
replace_items)
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]