|
Lines 28-43
filedir = os.path.dirname(__file__)
Link Here
|
| 28 |
|
28 |
|
| 29 |
if srcdir is not None: |
29 |
if srcdir is not None: |
| 30 |
path = os.path.join(srcdir, 'gio', 'gdbus-2.0') |
30 |
path = os.path.join(srcdir, 'gio', 'gdbus-2.0') |
| 31 |
elif os.path.basename(filedir) == 'bin': |
|
|
| 32 |
# Make the prefix containing gdbus-codegen 'relocatable' at runtime by |
| 33 |
# adding /some/prefix/bin/../share/glib-2.0 to the python path |
| 34 |
path = os.path.join(filedir, '..', 'share', 'glib-2.0') |
| 35 |
else: |
31 |
else: |
| 36 |
# Assume that the modules we need are in the current directory and add the |
32 |
from gdbus_codegen import codegen_main |
| 37 |
# parent directory to the python path. |
|
|
| 38 |
path = os.path.join(filedir, '..') |
| 39 |
|
| 40 |
sys.path.insert(0, os.path.abspath(path)) |
| 41 |
from codegen import codegen_main |
| 42 |
|
33 |
|
| 43 |
sys.exit(codegen_main.codegen_main()) |
34 |
sys.exit(codegen_main.codegen_main()) |
| 44 |
- |
|
|