[Checkins] SVN: cc.gettext/tags/cc.gettext-0.5.1/ Tagging 0.5.1
before I remove the forking silliness.
Nathan Yergler
nathan at yergler.net
Wed Aug 1 18:25:11 EDT 2007
Log message for revision 78534:
Tagging 0.5.1 before I remove the forking silliness.
Changed:
A cc.gettext/tags/cc.gettext-0.5.1/
D cc.gettext/tags/cc.gettext-0.5.1/CHANGES.txt
A cc.gettext/tags/cc.gettext-0.5.1/CHANGES.txt
D cc.gettext/tags/cc.gettext-0.5.1/README.txt
A cc.gettext/tags/cc.gettext-0.5.1/README.txt
D cc.gettext/tags/cc.gettext-0.5.1/cc/gettext/__init__.py
A cc.gettext/tags/cc.gettext-0.5.1/cc/gettext/__init__.py
D cc.gettext/tags/cc.gettext-0.5.1/setup.py
A cc.gettext/tags/cc.gettext-0.5.1/setup.py
-=-
Copied: cc.gettext/tags/cc.gettext-0.5.1 (from rev 78531, cc.gettext/trunk)
Deleted: cc.gettext/tags/cc.gettext-0.5.1/CHANGES.txt
===================================================================
--- cc.gettext/trunk/CHANGES.txt 2007-08-01 21:09:48 UTC (rev 78531)
+++ cc.gettext/tags/cc.gettext-0.5.1/CHANGES.txt 2007-08-01 22:25:10 UTC (rev 78534)
@@ -1,6 +0,0 @@
-
-
-0.0.1
-=====
-
-Initial public release.
Copied: cc.gettext/tags/cc.gettext-0.5.1/CHANGES.txt (from rev 78533, cc.gettext/trunk/CHANGES.txt)
===================================================================
--- cc.gettext/tags/cc.gettext-0.5.1/CHANGES.txt (rev 0)
+++ cc.gettext/tags/cc.gettext-0.5.1/CHANGES.txt 2007-08-01 22:25:10 UTC (rev 78534)
@@ -0,0 +1,11 @@
+
+
+0.5.1
+=====
+
+Attempt to create the mo_path if it does not exist.
+
+0.5
+===
+
+Initial public release.
Deleted: cc.gettext/tags/cc.gettext-0.5.1/README.txt
===================================================================
--- cc.gettext/trunk/README.txt 2007-08-01 21:09:48 UTC (rev 78531)
+++ cc.gettext/tags/cc.gettext-0.5.1/README.txt 2007-08-01 22:25:10 UTC (rev 78534)
@@ -1,24 +0,0 @@
-***********************
-Buildout GetText Recipe
-***********************
-
-.. contents::
-
-cc.gettext provides recipe[s] for manipulating gettext message catalogs.
-
-Compiling gettext catalogs
-==========================
-
-The cc.gettext:msgfmt recipe can be used to compile gettext catalogs from
-the .po source format to the binary .mo representation needed by Zope 3.
-It supports two options:
-
-po_path
- A file path (relative to the buildout base or absolute) which is scanned
- recursively for .po files. All .po files found are processed by the
- recipe.
-
-mo_path
- The base file path (relative to the buildout base or absolute) where
- compiled .mo files are written. Compiled files are named using the
- pattern <mo_path>/<locale>/LC_MESSAGES/<domain>.mo
Copied: cc.gettext/tags/cc.gettext-0.5.1/README.txt (from rev 78533, cc.gettext/trunk/README.txt)
===================================================================
--- cc.gettext/tags/cc.gettext-0.5.1/README.txt (rev 0)
+++ cc.gettext/tags/cc.gettext-0.5.1/README.txt 2007-08-01 22:25:10 UTC (rev 78534)
@@ -0,0 +1,27 @@
+***********************
+Buildout GetText Recipe
+***********************
+
+.. contents::
+
+cc.gettext provides recipe[s] for manipulating gettext message catalogs.
+
+Compiling gettext catalogs
+==========================
+
+The cc.gettext:msgfmt recipe can be used to compile gettext catalogs from
+the .po source format to the binary .mo representation needed by Zope 3.
+It supports two options:
+
+po_path
+ A file path (relative to the buildout base or absolute) which is scanned
+ recursively for .po files. All .po files found are processed by the
+ recipe.
+
+mo_path
+ The base file path (relative to the buildout base or absolute) where
+ compiled .mo files are written. Compiled files are named using the
+ pattern <mo_path>/<locale>/LC_MESSAGES/<domain>.mo
+
+ If the specified path does not exist, the recipe will attempt to create
+ it.
Deleted: cc.gettext/tags/cc.gettext-0.5.1/cc/gettext/__init__.py
===================================================================
--- cc.gettext/trunk/cc/gettext/__init__.py 2007-08-01 21:09:48 UTC (rev 78531)
+++ cc.gettext/tags/cc.gettext-0.5.1/cc/gettext/__init__.py 2007-08-01 22:25:10 UTC (rev 78534)
@@ -1,126 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Compile gettext catalogs from .po files.
-"""
-
-import os
-import subprocess
-import logging
-import zc.buildout
-
-class PoFile(object):
- """Helper class to extract metadata from a PO File."""
-
- def __init__(self, filename):
-
- self.filename = filename
- self.header = {}
-
- # read the header lines
- for line in file(self.filename,'r'):
- line = line.strip()
-
- if not(line.strip()):
- # bail when we hit the first blank
- break
-
- if line[0] == line[-1] == '"':
- # this is a metadata line
- key, value = line[1:-1].split(':', 1)
-
- self.header[key.strip().replace(r'\n', '')] = \
- value.strip().replace(r'\n','')
-
- @property
- def domain(self):
- return self.header['Domain']
-
- @property
- def language(self):
- return self.header['Language-code']
-
-class MsgFmt:
-
- def __init__(self, buildout, name, options):
-
- self.name, self.buildout, self.options = buildout, name, options
-
- # XXX make sure msgfmt is available
-
- # perform sanity checking on parameters
- if 'po_path' not in options:
- # no po_path provided; use our default
- options['po_path'] = os.path.join(
- buildout['buildout']['directory'], 'i18n')
- logging.getLogger(name).info(
- "No source path for .po files specified; using %s",
- options['po_path'])
- else:
- # make sure the path is absolute
- options['po_path'] = os.path.abspath(options['po_path'])
-
- if 'mo_path' not in options:
- # no mo_path provided; use our default
- options['mo_path'] = os.path.join(
- buildout['buildout']['directory'], 'locales')
- logging.getLogger(name).info(
- "No target path for .mo files specified; using %s",
- options['mo_path'])
- else:
- # make sure the path is absolute
- options['mo_path'] = os.path.abspath(options['mo_path'])
-
-
- # make sure mo_path and po_path exist
- if not(os.path.exists(options['po_path'])):
- logging.getLogger(name).error(
- "Specified po_path %s does not exist.",
- options['po_path'])
-
- raise zc.buildout.UserError("Invalid path.")
-
- if not(os.path.exists(options['mo_path'])):
- logging.getLogger(name).error(
- "Specified mo_path %s does not exist.",
- options['mo_path'])
-
- raise zc.buildout.UserError("Invalid path.")
-
- def install(self):
- """Scan the po_path for .po files and compile them using msgfmt."""
-
- paths = []
-
- for dirpath, dirname, filenames in os.walk(self.options['po_path']):
-
- for po_fn in filenames:
- if po_fn[-3:] != '.po': continue
-
- po_file = PoFile(os.path.join(dirpath, po_fn))
-
- mo_fn = os.path.join(self.options['mo_path'], po_file.language,
- 'LC_MESSAGES', '%s.mo' % po_file.domain)
- if not(os.path.exists(os.path.dirname(mo_fn))):
- os.makedirs(os.path.dirname(mo_fn))
-
- # run msgfmt for each .po file
- subprocess.call(['msgfmt', '-o', mo_fn, po_file.filename])
- paths.append(mo_fn)
-
- return paths
-
- # XXX: Update should really check timestamps or something smart like that
- update = install
-
-
Copied: cc.gettext/tags/cc.gettext-0.5.1/cc/gettext/__init__.py (from rev 78533, cc.gettext/trunk/cc/gettext/__init__.py)
===================================================================
--- cc.gettext/tags/cc.gettext-0.5.1/cc/gettext/__init__.py (rev 0)
+++ cc.gettext/tags/cc.gettext-0.5.1/cc/gettext/__init__.py 2007-08-01 22:25:10 UTC (rev 78534)
@@ -0,0 +1,125 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Compile gettext catalogs from .po files.
+"""
+
+import os
+import subprocess
+import logging
+import zc.buildout
+
+class PoFile(object):
+ """Helper class to extract metadata from a PO File."""
+
+ def __init__(self, filename):
+
+ self.filename = filename
+ self.header = {}
+
+ # read the header lines
+ for line in file(self.filename,'r'):
+ line = line.strip()
+
+ if not(line.strip()):
+ # bail when we hit the first blank
+ break
+
+ if line[0] == line[-1] == '"':
+ # this is a metadata line
+ key, value = line[1:-1].split(':', 1)
+
+ self.header[key.strip().replace(r'\n', '')] = \
+ value.strip().replace(r'\n','')
+
+ @property
+ def domain(self):
+ return self.header['Domain']
+
+ @property
+ def language(self):
+ return self.header['Language-code']
+
+class MsgFmt:
+
+ def __init__(self, buildout, name, options):
+
+ self.name, self.buildout, self.options = buildout, name, options
+
+ # XXX make sure msgfmt is available
+
+ # perform sanity checking on parameters
+ if 'po_path' not in options:
+ # no po_path provided; use our default
+ options['po_path'] = os.path.join(
+ buildout['buildout']['directory'], 'i18n')
+ logging.getLogger(name).info(
+ "No source path for .po files specified; using %s",
+ options['po_path'])
+ else:
+ # make sure the path is absolute
+ options['po_path'] = os.path.abspath(options['po_path'])
+
+ if 'mo_path' not in options:
+ # no mo_path provided; use our default
+ options['mo_path'] = os.path.join(
+ buildout['buildout']['directory'], 'locales')
+ logging.getLogger(name).info(
+ "No target path for .mo files specified; using %s",
+ options['mo_path'])
+ else:
+ # make sure the path is absolute
+ options['mo_path'] = os.path.abspath(options['mo_path'])
+
+
+ # make sure mo_path and po_path exist
+ if not(os.path.exists(options['po_path'])):
+ logging.getLogger(name).error(
+ "Specified po_path %s does not exist.",
+ options['po_path'])
+
+ raise zc.buildout.UserError("Invalid path.")
+
+ if not(os.path.exists(options['mo_path'])):
+ logging.getLogger(name).warn(
+ "Specified mo_path %s does not exist; attempting to create.",
+ options['mo_path'])
+ os.makedirs(options['mo_path'])
+
+ def install(self):
+ """Scan the po_path for .po files and compile them using msgfmt."""
+
+ paths = []
+
+ for dirpath, dirname, filenames in os.walk(self.options['po_path']):
+
+ for po_fn in filenames:
+ if po_fn[-3:] != '.po': continue
+
+ po_file = PoFile(os.path.join(dirpath, po_fn))
+
+ mo_fn = os.path.join(self.options['mo_path'], po_file.language,
+ 'LC_MESSAGES', '%s.mo' % po_file.domain)
+ if not(os.path.exists(os.path.dirname(mo_fn))):
+ os.makedirs(os.path.dirname(mo_fn))
+
+ # run msgfmt for each .po file
+ subprocess.call(['msgfmt', '-o', mo_fn, po_file.filename])
+ paths.append(mo_fn)
+
+ return paths
+
+ # XXX: Update should really check timestamps or something smart like that
+ update = install
+
+
Deleted: cc.gettext/tags/cc.gettext-0.5.1/setup.py
===================================================================
--- cc.gettext/trunk/setup.py 2007-08-01 21:09:48 UTC (rev 78531)
+++ cc.gettext/tags/cc.gettext-0.5.1/setup.py 2007-08-01 22:25:10 UTC (rev 78534)
@@ -1,61 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Compile gettext catalogs from .po files.
-"""
-
-import os
-from setuptools import setup, find_packages
-
-def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-setup(
- name = "cc.gettext",
- version = "0.5",
- packages = find_packages('.'),
-
- # scripts and dependencies
- install_requires = ['setuptools',
- 'zc.buildout',
- ],
-
- entry_points = {'zc.buildout':['msgfmt = cc.gettext:MsgFmt'],
- },
-
- # author metadata
- author = 'Nathan R. Yergler',
- author_email = 'nathan at creativecommons.org',
- description = "Recipe for manipulating gettext message catalogs.",
- long_description = (
- read('README.txt')
- + '\n' +
- read('CHANGES.txt')
- + '\n' +
- 'Download\n'
- '**********************\n'
- ),
- license = 'ZPL 2.1',
- keywords = 'development build gettext',
- url = 'http://creativecommons.org',
-
- classifiers = [
- 'Framework :: Buildout',
- 'Development Status :: 4 - Beta',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Zope Public License',
- 'Topic :: Software Development :: Build Tools',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- ],
-
- )
Copied: cc.gettext/tags/cc.gettext-0.5.1/setup.py (from rev 78533, cc.gettext/trunk/setup.py)
===================================================================
--- cc.gettext/tags/cc.gettext-0.5.1/setup.py (rev 0)
+++ cc.gettext/tags/cc.gettext-0.5.1/setup.py 2007-08-01 22:25:10 UTC (rev 78534)
@@ -0,0 +1,61 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Compile gettext catalogs from .po files.
+"""
+
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup(
+ name = "cc.gettext",
+ version = "0.5.1",
+ packages = find_packages('.'),
+
+ # scripts and dependencies
+ install_requires = ['setuptools',
+ 'zc.buildout',
+ ],
+
+ entry_points = {'zc.buildout':['msgfmt = cc.gettext:MsgFmt'],
+ },
+
+ # author metadata
+ author = 'Nathan R. Yergler',
+ author_email = 'nathan at creativecommons.org',
+ description = "Recipe for manipulating gettext message catalogs.",
+ long_description = (
+ read('README.txt')
+ + '\n' +
+ read('CHANGES.txt')
+ + '\n' +
+ 'Download\n'
+ '**********************\n'
+ ),
+ license = 'ZPL 2.1',
+ keywords = 'development build gettext',
+ url = 'http://python.org/pypi/cc.gettext/',
+
+ classifiers = [
+ 'Framework :: Buildout',
+ 'Development Status :: 4 - Beta',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Topic :: Software Development :: Build Tools',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ ],
+
+ )
More information about the Checkins
mailing list