summaryrefslogtreecommitdiff
path: root/giscanner/transformer.py
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-06-01 09:18:43 +0200
committerColin Walters <walters@verbum.org>2009-06-11 13:53:01 -0400
commitdb214ed923cfe9fc75432d5338e8a3b0d9c83d25 (patch)
treebc4afafbeacf2d7584bcf7bd326ad88d58991cfd /giscanner/transformer.py
parent31317a9ffa31af959dd51eedfa2f31f586687475 (diff)
downloadgobject-introspection-db214ed923cfe9fc75432d5338e8a3b0d9c83d25.tar.gz
Make g-ir-compiler find files installed by make install
When ./configure --prefix $HOME/some/where is used gobject-introspection will happily install the files into $HOME/some/where/data/gir-1.0 but it will refuse to find them. Apply the same trick as in girepository/girepository.c:init_globals to find the gir files. Unifiy the name gir-1.0 in GIR_SUFFIX and use it throughout the project, introduce GIR_DIR which holds the path to the gir files and update girparser and transformer.py to look into this path.
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r--giscanner/transformer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 88cbc150..cc9e0b54 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -25,7 +25,7 @@ from .ast import (Bitfield, Callback, Enum, Function, Namespace, Member,
Type, Array, Alias, Interface, Class, Node, Union,
Varargs, Constant, type_name_from_ctype,
type_names, TYPE_STRING, BASIC_GIR_TYPES)
-from .config import DATADIR
+from .config import DATADIR, GIR_DIR, GIR_SUFFIX
from .glibast import GLibBoxed
from .girparser import GIRParser
from .odict import odict
@@ -117,7 +117,8 @@ class Transformer(object):
def _find_include(self, include):
searchdirs = self._includepaths[:]
for path in _xdg_data_dirs:
- searchdirs.append(os.path.join(path, 'gir-1.0'))
+ searchdirs.append(os.path.join(path, GIR_SUFFIX))
+ searchdirs.append(GIR_DIR)
girname = '%s-%s.gir' % (include.name, include.version)
for d in searchdirs: