[caribou] Support out-of-tree build
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] Support out-of-tree build
- Date: Tue, 23 Oct 2012 00:28:54 +0000 (UTC)
commit e45d12e3d626ad63ab9da74ccfc39e94545e7578
Author: Daiki Ueno <ueno unixuser org>
Date: Mon Oct 22 15:19:20 2012 +0900
Support out-of-tree build
https://bugzilla.gnome.org/show_bug.cgi?id=667455
caribou/__init__.py | 8 +++++++-
caribou/antler/antler_settings.py | 2 +-
caribou/settings/caribou_settings.py | 2 +-
configure.ac | 3 ---
4 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/caribou/__init__.py b/caribou/__init__.py
index cf8fdc7..e1ed1d0 100644
--- a/caribou/__init__.py
+++ b/caribou/__init__.py
@@ -1,2 +1,8 @@
-from i18n import _
+try:
+ from i18n import _
+except ImportError:
+ # i18n.py is not available when "caribou" module is imported by
+ # tools/make_schema.py and srcdir != builddir.
+ _ = lambda a: a
+
APP_NAME=_("Caribou")
diff --git a/caribou/antler/antler_settings.py b/caribou/antler/antler_settings.py
index 6ee7473..c9d1149 100644
--- a/caribou/antler/antler_settings.py
+++ b/caribou/antler/antler_settings.py
@@ -1,5 +1,5 @@
from caribou.settings.setting_types import *
-from caribou.i18n import _
+from caribou import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
diff --git a/caribou/settings/caribou_settings.py b/caribou/settings/caribou_settings.py
index f3f9b00..e89ba3d 100644
--- a/caribou/settings/caribou_settings.py
+++ b/caribou/settings/caribou_settings.py
@@ -1,5 +1,5 @@
from caribou.settings.setting_types import *
-from caribou.i18n import _
+from caribou import _
CaribouSettings = SettingsTopGroup(
_("Caribou Preferences"), "/org/gnome/caribou/", "org.gnome.caribou",
diff --git a/configure.ac b/configure.ac
index 7635e0a..9509c85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,9 +4,6 @@ AC_INIT([caribou],
[https://bugzilla.gnome.org/enter_bug.cgi?product=caribou],
[caribou])
-# tools/make_schema.py looks for i18n.py in the srcdir
-echo \#buildapi-variable-no-builddir >/dev/null
-
AC_CONFIG_MACRO_DIR([m4])
AM_PROG_LIBTOOL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]