summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-07-27 09:11:02 -0400
committerColin Walters <walters@verbum.org>2011-07-27 09:15:02 -0400
commit9fcd8fa140030a270507fba0915aafa4df0933e0 (patch)
tree8274af8d78332ca7a52aa2749b2d951638c2426e /giscanner
parentf5f33223d876cefd56412df9d918ea7442f8322f (diff)
downloadgobject-introspection-9fcd8fa140030a270507fba0915aafa4df0933e0.tar.gz
Kill off config.py
Generating Python source code is problematic for srcdir != builddir; steal a the trick of putting global data in __builtins__ from jhbuild.
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/config.py.in25
-rw-r--r--giscanner/dumper.py1
-rw-r--r--giscanner/transformer.py5
3 files changed, 2 insertions, 29 deletions
diff --git a/giscanner/config.py.in b/giscanner/config.py.in
deleted file mode 100644
index 9de1f48c..00000000
--- a/giscanner/config.py.in
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- Mode: Python -*-
-# GObject-Introspection - a framework for introspecting GObject libraries
-# Copyright (C) 2008 Johan Dahlin
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-
-DATADIR = "@datarootdir@"
-DATADIR = DATADIR.replace(
- "${prefix}", "@prefix@")
-GIR_DIR = "@GIR_DIR@"
-GIR_SUFFIX = "@GIR_SUFFIX@"
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index b8449384..615b3fc5 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -27,7 +27,6 @@ import tempfile
from .gdumpparser import IntrospectionBinary
from . import utils
-from .config import DATADIR
# bugzilla.gnome.org/558436
# Compile a binary program which is then linked to a library
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index a651649a..7db79828 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -24,7 +24,6 @@ import sys
from . import ast
from . import message
from .cachestore import CacheStore
-from .config import DATADIR, GIR_DIR, GIR_SUFFIX
from .girparser import GIRParser
from .sourcescanner import (
SourceSymbol, ctype_name, CTYPE_POINTER,
@@ -163,8 +162,8 @@ None."""
def _find_include(self, include):
searchdirs = self._includepaths[:]
for path in _xdg_data_dirs:
- searchdirs.append(os.path.join(path, GIR_SUFFIX))
- searchdirs.append(GIR_DIR)
+ searchdirs.append(os.path.join(path, 'gir-1.0'))
+ searchdirs.append(os.path.join(DATADIR, 'gir-1.0'))
girname = '%s-%s.gir' % (include.name, include.version)
for d in searchdirs: