r2936 - in zope.i18n/trunk/debian (5 files)
barry at users.alioth.debian.org
barry at users.alioth.debian.org
Mon Jun 22 15:33:15 UTC 2015
Date: Monday, June 22, 2015 @ 15:33:14
Author: barry
Revision: 2936
* d/patches:
- Added use-system-msgfmt.patch to work around the lack of
python-gettext in the archive.
Added:
zope.i18n/trunk/debian/patches/
zope.i18n/trunk/debian/patches/series
zope.i18n/trunk/debian/patches/use-system-msgfmt.patch
Modified:
zope.i18n/trunk/debian/changelog
zope.i18n/trunk/debian/control
Modified: zope.i18n/trunk/debian/changelog
===================================================================
--- zope.i18n/trunk/debian/changelog 2015-06-22 15:01:54 UTC (rev 2935)
+++ zope.i18n/trunk/debian/changelog 2015-06-22 15:33:14 UTC (rev 2936)
@@ -20,6 +20,9 @@
- Added X-Python3-Version header.
- Remove build dependency on pydeb.
- wrap-and-sort
+ * d/patches:
+ - Added use-system-msgfmt.patch to work around the lack of
+ python-gettext in the archive.
* d/rules:
- Switch to --buildsystem=pybuild
- Remove get-orig-source rule.
Modified: zope.i18n/trunk/debian/control
===================================================================
--- zope.i18n/trunk/debian/control 2015-06-22 15:01:54 UTC (rev 2935)
+++ zope.i18n/trunk/debian/control 2015-06-22 15:33:14 UTC (rev 2936)
@@ -7,12 +7,15 @@
Barry Warsaw <barry at debian.org>,
Build-Depends: debhelper (>= 9),
dh-python,
+ gettext,
python-all (>= 2.6.6-3~),
python-setuptools,
python-tz,
python-zope.component,
python-zope.configuration,
python-zope.i18nmessageid,
+ python-zope.location,
+ python-zope.proxy,
python-zope.schema,
python-zope.security,
python-zope.testing,
@@ -23,6 +26,8 @@
python3-zope.component,
python3-zope.configuration,
python3-zope.i18nmessageid,
+ python3-zope.location,
+ python3-zope.proxy,
python3-zope.schema,
python3-zope.security,
python3-zope.testing,
@@ -37,7 +42,7 @@
Package: python-zope.i18n
Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}
+Depends: ${misc:Depends}, ${python:Depends}, gettext
Description: Zope Internationalization Support
This package implements several APIs related to internationalization and
localization:
@@ -50,7 +55,7 @@
Package: python3-zope.i18n
Architecture: all
-Depends: ${misc:Depends}, ${python3:Depends}
+Depends: ${misc:Depends}, ${python3:Depends}, gettext
Description: Zope Internationalization Support
This package implements several APIs related to internationalization and
localization:
Added: zope.i18n/trunk/debian/patches/series
===================================================================
--- zope.i18n/trunk/debian/patches/series (rev 0)
+++ zope.i18n/trunk/debian/patches/series 2015-06-22 15:33:14 UTC (rev 2936)
@@ -0,0 +1 @@
+use-system-msgfmt.patch
Added: zope.i18n/trunk/debian/patches/use-system-msgfmt.patch
===================================================================
--- zope.i18n/trunk/debian/patches/use-system-msgfmt.patch (rev 0)
+++ zope.i18n/trunk/debian/patches/use-system-msgfmt.patch 2015-06-22 15:33:14 UTC (rev 2936)
@@ -0,0 +1,31 @@
+Description: Fall back to msgfmt(1) when python-gettext is unavailable.
+ Upstream python-gettext seems unsupported. It's not available in the Debian
+ archive, nor is it likely too be. Implement a simple fallback for equivalent
+ functionality.
+Author: Barry Warsaw <barry at debian.org>
+Bug: https://github.com/zopefoundation/zope.i18n/issues/16
+
+--- a/src/zope/i18n/compile.py
++++ b/src/zope/i18n/compile.py
+@@ -15,14 +15,17 @@
+
+ def compile_mo_file(domain, lc_messages_path):
+ """Creates or updates a mo file in the locales folder."""
+- if not HAS_PYTHON_GETTEXT:
+- logger.critical("Unable to compile messages: Python `gettext` library missing.")
+- return
+-
+ base = join(lc_messages_path, domain)
+ pofile = str(base + '.po')
+ mofile = str(base + '.mo')
+
++ if not HAS_PYTHON_GETTEXT:
++ #logger.critical("Unable to compile messages: Python `gettext` library missing.")
++ # 2015-06-22 barry at debian.org: Fall back to msgfmt(1).
++ from subprocess import check_call
++ check_call(['msgfmt', '-o', mofile, pofile])
++ return
++
+ po_mtime = 0
+ try:
+ po_mtime = os.stat(pofile)[ST_MTIME]
More information about the pkg-zope-developers
mailing list