gobject-introspection r479 - in trunk: . giscanner



Author: walters
Date: Sat Aug 23 21:58:09 2008
New Revision: 479
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=479&view=rev

Log:
2008-08-23  Colin Walters  <walters verbum org>

	* giscanner/config.py: Define DATADIR.
	* giscanner/transformer.py: Look in DATADIR.


Modified:
   trunk/ChangeLog
   trunk/giscanner/config.py.in
   trunk/giscanner/transformer.py

Modified: trunk/giscanner/config.py.in
==============================================================================
--- trunk/giscanner/config.py.in	(original)
+++ trunk/giscanner/config.py.in	Sat Aug 23 21:58:09 2008
@@ -18,6 +18,10 @@
 # 02110-1301, USA.
 #
 
+DATADIR = "@datadir@"
+DATADIR = DATADIR.replace(
+    "${prefix}", "@prefix@")
+
 INCLUDEDIR = "@includedir@/gobject-introspection-1.0"
 INCLUDEDIR = INCLUDEDIR.replace(
     "${prefix}", "@prefix@")

Modified: trunk/giscanner/transformer.py
==============================================================================
--- trunk/giscanner/transformer.py	(original)
+++ trunk/giscanner/transformer.py	Sat Aug 23 21:58:09 2008
@@ -24,6 +24,7 @@
                            Parameter, Return, Sequence, Struct, Field,
                            Type, Alias, Interface, Class, Node, Union,
                            type_name_from_ctype, type_names)
+from giscanner.config import DATADIR
 from .glibast import GLibBoxed
 from giscanner.sourcescanner import (
     SourceSymbol, ctype_name, CTYPE_POINTER,
@@ -36,7 +37,7 @@
 from .utils import strip_common_prefix
 
 _xdg_data_dirs = [x for x in os.environ.get('XDG_DATA_DIRS', '').split(':') \
-                      + ['/usr/share'] if x]
+                      + [DATADIR, '/usr/share'] if x]
 
 
 class SkipError(Exception):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]