wingo - in flumotion/trunk: . common po

flumotion-commit at lists.fluendo.com flumotion-commit at lists.fluendo.com
Tue Feb 6 16:38:04 CET 2007


Author: wingo
Date: Tue Feb  6 16:38:01 2007
New Revision: 4464

Modified:
   flumotion/trunk/ChangeLog
   flumotion/trunk/common/as-python.m4
   flumotion/trunk/configure.ac
   flumotion/trunk/po/ca.po
   flumotion/trunk/po/es.po
   flumotion/trunk/po/fr.po
   flumotion/trunk/po/nl.po
   flumotion/trunk/po/no.po
   flumotion/trunk/po/pt_BR.po
Log:
2007-02-06  Andy Wingo  <wingo at pobox.com>

	* configure.ac: When running python code from the source tree, add
	srcdir to the pythonpath. Fixes builddir != srcdir.

	* common/as-python.m4: Make it so that a negative result of a
	check is reported by python itself; allows multiple failure modes
	to be reported properly.



Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog	(original)
+++ flumotion/trunk/ChangeLog	Tue Feb  6 16:38:01 2007
@@ -1,3 +1,12 @@
+2007-02-06  Andy Wingo  <wingo at pobox.com>
+
+	* configure.ac: When running python code from the source tree, add
+	srcdir to the pythonpath. Fixes builddir != srcdir.
+
+	* common/as-python.m4: Make it so that a negative result of a
+	check is reported by python itself; allows multiple failure modes
+	to be reported properly.
+	
 2007-02-06  Michael Smith  <msmith at fluendo.com>
 
 	* flumotion/common/boot.py:

Modified: flumotion/trunk/common/as-python.m4
==============================================================================
--- flumotion/trunk/common/as-python.m4	(original)
+++ flumotion/trunk/common/as-python.m4	Tue Feb  6 16:38:01 2007
@@ -148,10 +148,11 @@
   dnl Check if we can import a given module.
   dnl Requires AS_PATH_PYTHON to be called before.
   dnl PREAMBLE and POSTAMBLE, if given, is code executed right before and after
-  dnl the import
+  dnl the import; stdout is rerouted to config.log, and stderr to the console.
 
   AC_MSG_CHECKING([for python module $1])
 
+  changequote(<<, >>)dnl
   prog="
 import sys
 
@@ -160,21 +161,24 @@
     import $1
     $5
     sys.exit(0)
-except ImportError:
-    sys.exit(1)
-except SystemExit:
+except ImportError, e:
+    raise SystemExit(*e.args)
+except SystemExit, e:
+    if not e.args or (e.args[0] != 0 and not isinstance(e.args[0], str)):
+        raise SystemExit('Unknown error')
     raise
 except Exception, e:
-    sys.stderr.write('  Error while trying to import $1:\n')
-    sys.stderr.write('    %r: %s\n' % (e, e))
+    print '  Error while trying to import $1:'
+    print '    %r: %s' % (e, e)
     sys.exit(1)"
+  changequote([, ])dnl
 
-if $PYTHON -c "$prog" 2>&AC_FD_CC
+if $PYTHON -c "$prog" 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_FD
 then
     AC_MSG_RESULT(found)
     ifelse([$2], , :, [$2])
 else
-    AC_MSG_RESULT(not found)
+    dnl python has already printed a message on the message fd
     ifelse([$3], , :, [$3])
 fi
 ])

Modified: flumotion/trunk/configure.ac
==============================================================================
--- flumotion/trunk/configure.ac	(original)
+++ flumotion/trunk/configure.ac	Tue Feb  6 16:38:01 2007
@@ -51,6 +51,10 @@
   AC_MSG_ERROR([You need to install the Python development packages.])
 ])
 
+as_save_PYTHONPATH=$PYTHONPATH
+PYTHONPATH=$srcdir:$PYTHONPATH
+export PYTHONPATH
+
 dnl check for pygtk
 AS_PYTHON_IMPORT(pygtk,,AC_MSG_ERROR([pygtk not found or too old]),,
     [from flumotion.common import boot; boot.init_gobject()])
@@ -59,6 +63,9 @@
 AS_PYTHON_IMPORT(pygst,,AC_MSG_ERROR([gst-python not found or too old]),,
     [from flumotion.common import boot; boot.init_gobject(); boot.init_gst()])
 
+PYTHONPATH=$as_save_PYTHONPATH
+export PYTHONPATH
+
 PKG_CHECK_MODULES(PYGTK, pygtk-2.0)
 dnl check stuff we can generate the tray icon with
 AC_MSG_CHECKING(for pygtk codegen)

Modified: flumotion/trunk/po/ca.po
==============================================================================
--- flumotion/trunk/po/ca.po	(original)
+++ flumotion/trunk/po/ca.po	Tue Feb  6 16:38:01 2007
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: flumotion 0.1.9\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-02 13:27+0100\n"
+"POT-Creation-Date: 2007-02-06 15:36+0100\n"
 "PO-Revision-Date: 2006-01-10 22:34+0100\n"
 "Last-Translator: Noelle Moutte <noelle at moutte.net>\n"
 "Language-Team: cat\n"

Modified: flumotion/trunk/po/es.po
==============================================================================
--- flumotion/trunk/po/es.po	(original)
+++ flumotion/trunk/po/es.po	Tue Feb  6 16:38:01 2007
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: flumotion 0.1.9\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-02 13:27+0100\n"
+"POT-Creation-Date: 2007-02-06 15:36+0100\n"
 "PO-Revision-Date: 2006-01-10 22:34+0100\n"
 "Last-Translator: Noelle Moutte <noelle at moutte.net>\n"
 "Language-Team: nl\n"

Modified: flumotion/trunk/po/fr.po
==============================================================================
--- flumotion/trunk/po/fr.po	(original)
+++ flumotion/trunk/po/fr.po	Tue Feb  6 16:38:01 2007
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: flumotion 0.2.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-02 13:27+0100\n"
+"POT-Creation-Date: 2007-02-06 15:36+0100\n"
 "PO-Revision-Date: 2006-03-03 18:02+0000\n"
 "Last-Translator: Edward Hervey <edward at fluendo.com>\n"
 "Language-Team: French <gnomefr at traduc.org>\n"

Modified: flumotion/trunk/po/nl.po
==============================================================================
--- flumotion/trunk/po/nl.po	(original)
+++ flumotion/trunk/po/nl.po	Tue Feb  6 16:38:01 2007
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: flumotion 0.3.2\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-02 13:27+0100\n"
+"POT-Creation-Date: 2007-02-06 15:36+0100\n"
 "PO-Revision-Date: 2007-01-18 06:17+0100\n"
 "Last-Translator: Thomas Vander Stichele <thomas at apestaart.org>\n"
 "Language-Team: nl\n"

Modified: flumotion/trunk/po/no.po
==============================================================================
--- flumotion/trunk/po/no.po	(original)
+++ flumotion/trunk/po/no.po	Tue Feb  6 16:38:01 2007
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: flumotion 0.1.9\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-02 13:27+0100\n"
+"POT-Creation-Date: 2007-02-06 15:36+0100\n"
 "PO-Revision-Date: 2005-07-29 01:22+0200\n"
 "Last-Translator: Christian Schaller <christian at fluendo dot com>\n"
 "Language-Team: nl\n"

Modified: flumotion/trunk/po/pt_BR.po
==============================================================================
--- flumotion/trunk/po/pt_BR.po	(original)
+++ flumotion/trunk/po/pt_BR.po	Tue Feb  6 16:38:01 2007
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: flumotion 0.2.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-02 13:27+0100\n"
+"POT-Creation-Date: 2007-02-06 15:36+0100\n"
 "PO-Revision-Date: 2006-04-21 11:36-0300\n"
 "Last-Translator: Pablo Lorenzzoni <spectra at debian.org>\n"
 "Language-Team: pt_BR <spectra at debian.org>\n"


More information about the flumotion-commit mailing list