[python-zope-i18n] Add a patch file

cheeselee cheeselee at fedoraproject.org
Mon Sep 20 09:17:26 UTC 2010


commit 715e5332b8987a941115bff579c23192385f6c85
Author: Robin Lee <robinlee.sysu at gmail.com>
Date:   Mon Sep 20 17:17:03 2010 +0800

    Add a patch file

 zope.i18n-fhs-datadir.patch |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/zope.i18n-fhs-datadir.patch b/zope.i18n-fhs-datadir.patch
new file mode 100644
index 0000000..bb06982
--- /dev/null
+++ b/zope.i18n-fhs-datadir.patch
@@ -0,0 +1,15 @@
+--- zope.i18n-3.7.4/src/zope/i18n/locales/__init__.py	2010-09-16 19:09:59.852605696 -0400
++++ zope.i18n-3.7.4/src/zope/i18n/locales/__init__.py	2010-09-16 19:21:47.697605782 -0400
+@@ -35,7 +35,12 @@ from zope.i18n.locales.provider import L
+ 
+ # Setup the locale directory
+ from zope import i18n
++# Default is next to the module.  If that doesn't exist because a system
++# packager put them in other places to conform with the FHS, use the FHS
++# directory
+ LOCALEDIR = os.path.join(os.path.dirname(i18n.__file__), "locales", "data")
++if not os.access(LOCALEDIR, os.R_OK | os.X_OK):
++    LOCALEDIR = os.path.join(os.path.sep, "usr", "share", "python-zope-i18n", "locales", "data")
+ 
+ # Global LocaleProvider. We really just need this single one.
+ locales = LocaleProvider(LOCALEDIR)


More information about the scm-commits mailing list