[Commits] sugar-update-control branch master updated.

C. Scott Ananian cscott at laptop.org
Wed Dec 17 18:54:36 EST 2008


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "/home/cscott/public_git/sugar-update-control".

The branch, master has been updated
  discards  0af964c6a7f227c4c172065f1b397f01dda3b706 (commit)
  discards  86536999cb30c5c03c08c66e9a0341a61a7e3c84 (commit)
  discards  5cc68cf91f436a1c17a7cd24b644e55cb7d79db1 (commit)
       via  12d7fbf757eeaf390b3b8b3e649eb3dde1e4c99e (commit)
       via  ecb4afb2ab09e729cbdb1eb06289ad6031707ae7 (commit)
       via  c49d2e6406653702c599a66aadd69101ed8696bf (commit)
       via  ce6c2a29ca006a3f50702e0ca5c153667ee3e316 (commit)
       via  6643092c5396dc019e7686052db69fd2afc42473 (commit)
       via  042167f52fa00a687a88d39ec5c8cca80efe8a90 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (0af964c6a7f227c4c172065f1b397f01dda3b706)
            \
             N -- N -- N (12d7fbf757eeaf390b3b8b3e649eb3dde1e4c99e)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

 Makefile                     |    2 +-
 debian/changelog             |    6 ++
 dist_extra/README            |   42 +++++++++++++
 dist_extra/__init__.py       |    5 ++
 dist_extra/build_extra.py    |   57 ++++++++++++++++++
 dist_extra/build_help.py     |   44 ++++++++++++++
 dist_extra/build_i18n.py     |  135 ++++++++++++++++++++++++++++++++++++++++++
 dist_extra/build_icons.py    |   43 +++++++++++++
 dist_extra/clean_i18n.py     |   36 +++++++++++
 dist_extra/copyright         |   26 ++++++++
 dist_extra/setup.cfg.example |    8 +++
 dist_extra/setup.py.example  |   31 ++++++++++
 po/POTFILES.in               |    3 +
 setup.cfg                    |    3 +
 setup.py                     |    5 +-
 src/model.py                 |    4 +-
 sugar-update-control.changes |    7 ++
 sugar-update-control.spec    |    9 ++-
 18 files changed, 461 insertions(+), 5 deletions(-)
 create mode 100644 dist_extra/README
 create mode 100644 dist_extra/__init__.py
 create mode 100644 dist_extra/build_extra.py
 create mode 100644 dist_extra/build_help.py
 create mode 100644 dist_extra/build_i18n.py
 create mode 100644 dist_extra/build_icons.py
 create mode 100644 dist_extra/clean_i18n.py
 create mode 100644 dist_extra/copyright
 create mode 100644 dist_extra/setup.cfg.example
 create mode 100644 dist_extra/setup.py.example
 create mode 100644 po/POTFILES.in
 create mode 100644 setup.cfg

- Log -----------------------------------------------------------------
commit 12d7fbf757eeaf390b3b8b3e649eb3dde1e4c99e
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Wed Dec 17 17:23:00 2008 -0500

    Release 0.19.

diff --git a/Makefile b/Makefile
index 96665d3..f666322 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # CANONICAL SOURCE OF VERSION STRING:
 VERSION_MAJOR=0
-VERSION_MINOR=18
+VERSION_MINOR=19
 PACKAGE=sugar-update-control
 MOCK=./mock-wrapper -r olpc-3-i386 --resultdir=$(MOCKDIR) $(MOCK_OPTS)
 MOCKDIR=./rpms
diff --git a/debian/changelog b/debian/changelog
index 601e0e5..96b6b65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+sugar-update-control (0.19) unstable; urgency=low
+
+  * Fix packaging problems; actually distribute translation files.
+
+ -- C. Scott Ananian <cscott at laptop.org>  Wed, 17 Dec 2008 17:20:58 -0500
+
 sugar-update-control (0.18) unstable; urgency=low
 
   * Trac #9044: Pick up Spanish translations for release.
diff --git a/setup.py b/setup.py
index 19a12be..86a8b53 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@
 from dist_extra import * # gettext support
 from distutils.core import setup
 setup(name='sugar-update-control',
-      version="0.18",
+      version="0.19",
       description='Sugar update control panel',
       author='C. Scott Ananian',
       author_email='cscott at laptop.org',
diff --git a/sugar-update-control.changes b/sugar-update-control.changes
index 162361b..ec27b26 100644
--- a/sugar-update-control.changes
+++ b/sugar-update-control.changes
@@ -142,3 +142,10 @@ sugar-update-control-0.18-1.src.rpm
   * Trac #9044: Pick up Spanish translations for release.
 
  -- Chris Ball <cjb at laptop.org>  Fri, 12 Dec 2008 16:43:17 -0400
+
+sugar-update-control-0.19-1.noarch.rpm
+sugar-update-control-0.19-1.src.rpm
+
+  * Fix packaging problems; actually distribute translation files.
+
+ -- C. Scott Ananian <cscott at laptop.org>  Wed, 17 Dec 2008 17:20:58 -0500
diff --git a/sugar-update-control.spec b/sugar-update-control.spec
index 522544c..c9ba787 100644
--- a/sugar-update-control.spec
+++ b/sugar-update-control.spec
@@ -5,7 +5,7 @@
 
 Summary: Activity update control panel for Sugar.
 Name: sugar-update-control
-Version: 0.18
+Version: 0.19
 Release: 1
 License: GPL
 Group: System Environment/Base
@@ -46,6 +46,9 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/sugar
 
 %changelog
+* Wed Dec 17 2008 C. Scott Ananian <cscott at laptop.org>
+- Fix packaging problems; actually distribute translation files.
+
 * Fri Dec 12 2008 Chris Ball <cjb at laptop.org>
 - Trac #9044: Pick up Spanish translations for release.
 

commit ecb4afb2ab09e729cbdb1eb06289ad6031707ae7
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Wed Dec 17 16:59:37 2008 -0500

    Build and distribute i18n files.

diff --git a/dist_extra/README b/dist_extra/README
new file mode 100644
index 0000000..88d6d01
--- /dev/null
+++ b/dist_extra/README
@@ -0,0 +1,42 @@
+python-distutils-extra can be used with python's distutils or the enhanced
+setuptools.
+
+1. DISTUTILS
+
+To make use of the distutils extenstions, you have to import the corresponding methods at the beginning of your setup.py:
+
+from DistUtilsExtra.command import *
+
+Furthermore you have to map the methods to the extended ones:
+
+cmdclass = { "build" : build_extra.build_extra,
+             "build_i18n" :  build_i18n.build_i18n }
+
+If you have replaced the default build command by build_extra and defined the other commands e.g. build_i18n, the sub commands e.g. will be called automatically. There is no need to enable them in the setup.cfg anymore (This was require in a previous version). Disabling imported commands in the setup.cfg is still possible:
+
+[build]
+i18n=False
+
+See the setup.cfg.example for a more complex layout.
+
+Currently there are the following extensions available:
+
+build_extra: initiates the extensions
+build_i18n: provides gettext integration
+build_icons: installs icons
+build_help: installs a docbook based documentation
+
+2. SETUPTOOLS
+
+Just enable the corresponding build target in the setup.cfg:
+
+[build]
+i18n=True
+help=True
+icons=True
+
+No further imports or modifications are required.
+
+I hope that this code could help you to make your live easier,
+
+Sebastian
diff --git a/dist_extra/__init__.py b/dist_extra/__init__.py
new file mode 100644
index 0000000..a479a70
--- /dev/null
+++ b/dist_extra/__init__.py
@@ -0,0 +1,5 @@
+__all__ = ["build_extra",
+           "build_i18n",
+           "build_icons",
+           "build_help",
+           "clean_i18n"]
diff --git a/dist_extra/build_extra.py b/dist_extra/build_extra.py
new file mode 100644
index 0000000..765db10
--- /dev/null
+++ b/dist_extra/build_extra.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+import distutils
+import glob
+import os
+import os.path
+import re
+import sys
+import distutils.command.build
+
+class build_extra(distutils.command.build.build):
+    """Adds the extra commands to the build target. This class should be used
+       with the core distutils"""
+    def __init__(self, dist):
+        distutils.command.build.build.__init__(self, dist)
+
+        self.user_options.extend([("i18n", None, "use the localsation"),
+                                  ("icons", None, "use icons"),
+                                  ("help", None, "use help system")])
+    def initialize_options(self):
+        distutils.command.build.build.initialize_options(self)
+        self.i18n = False
+        self.icons = False
+        self.help = False
+
+    def finalize_options(self):
+        def has_help(command):
+            return self.help == "True" or \
+                   (self.distribution.cmdclass.has_key("build_help") and not \
+                    self.help == "False")
+        def has_icons(command):
+            return self.icons == "True" or \
+                   (self.distribution.cmdclass.has_key("build_icons") and not \
+                    self.help == "False")
+        def has_i18n(command):
+            return self.i18n == "True" or \
+                   (self.distribution.cmdclass.has_key("build_i18n") and not \
+                    self.i18n == "False")
+        distutils.command.build.build.finalize_options(self)
+        self.sub_commands.append(("build_i18n", has_i18n))
+        self.sub_commands.append(("build_icons", has_icons))
+        self.sub_commands.append(("build_help", has_help))
+
+class build(build_extra):
+    """Adds the extra commands to the build target. This class should be
+       used with setuptools."""
+    def finalize_options(self):
+        def has_help(command):
+            return self.help == "True"
+        def has_icons(command):
+            return self.icons == "True"
+        def has_i18n(command):
+            return self.i18n == "True"
+        distutils.command.build.build.finalize_options(self)
+        self.sub_commands.append(("build_i18n", has_i18n))
+        self.sub_commands.append(("build_icons", has_icons))
+        self.sub_commands.append(("build_help", has_help))
diff --git a/dist_extra/build_help.py b/dist_extra/build_help.py
new file mode 100644
index 0000000..0e78947
--- /dev/null
+++ b/dist_extra/build_help.py
@@ -0,0 +1,44 @@
+"""distutils_extra.command.build_help
+
+Implements the Distutils 'build_help' command."""
+
+import distutils
+import glob
+import os
+import os.path
+import re
+import sys
+import distutils.command.build
+
+class build_help(distutils.cmd.Command):
+
+    description = "install a docbook based documentation"
+
+    user_options= [('help_dir', None, 'help directory of the source tree')]
+
+    def initialize_options(self):
+        self.help_dir = None
+
+    def finalize_options(self):
+        if self.help_dir is None:
+            self.help_dir = os.path.join("help")
+
+    def run(self):
+        data_files = self.distribution.data_files
+
+        self.announce("Setting up help files...")
+        for filepath in glob.glob("help/*"):
+            lang = filepath[len("help/"):]
+            self.announce(" Language: %s" % lang)
+            path_xml = os.path.join("share/gnome/help",
+                                    self.distribution.metadata.name,
+                                    lang)
+            path_figures = os.path.join("share/gnome/help",
+                                        self.distribution.metadata.name,
+                                        lang, "figures")
+            data_files.append((path_xml, (glob.glob("%s/*.xml" % filepath))))
+            data_files.append((path_figures,
+                               (glob.glob("%s/figures/*.png" % filepath))))
+        data_files.append((os.path.join('share/omf',
+                                         self.distribution.metadata.name),
+                           glob.glob("help/*/*.omf")))
diff --git a/dist_extra/build_i18n.py b/dist_extra/build_i18n.py
new file mode 100644
index 0000000..8906063
--- /dev/null
+++ b/dist_extra/build_i18n.py
@@ -0,0 +1,135 @@
+"""distutils_extra.command.build_i18n
+
+Implements the Distutils 'build_i18n' command."""
+
+import distutils
+import glob
+import os
+import os.path
+import re
+import sys
+import distutils.command.build
+
+class build_i18n(distutils.cmd.Command):
+
+    description = "integrate the gettext framework"
+
+    user_options = [('desktop-files=', None, '.desktop.in files that '
+                                             'should be merged'),
+                    ('xml-files=', None, '.xml.in files that should be '
+                                         'merged'),
+                    ('schemas-files=', None, '.schemas.in files that '
+                                             'should be merged'),
+                    ('ba-files=', None, 'bonobo-activation files that '
+                                        'should be merged'),
+                    ('rfc822deb-files=', None, 'RFC822 files that should '
+                                               'be merged'),
+                    ('key-files=', None, '.key.in files that should be '
+                                         'merged'),
+                    ('domain=', 'd', 'gettext domain'),
+                    ('merge-po', 'm', 'merge po files against template'),
+                    ('po-dir=', 'p', 'directory that holds the i18n files'),
+                    ('copyright=', None, 'copyright holder for the package'),
+                    ('bug-contact=', None, 'contact address for msgid bugs')]
+
+    boolean_options = ['merge-po']
+
+    def initialize_options(self):
+        self.desktop_files = []
+        self.xml_files = []
+        self.key_files = []
+        self.schemas_files = []
+        self.ba_files = []
+        self.rfc822deb_files = []
+        self.domain = None
+        self.merge_po = False
+        self.bug_contact = None
+        self.copyright = None
+        self.po_dir = None
+
+    def finalize_options(self):
+        if self.domain is None:
+            self.domain = self.distribution.metadata.name
+        if self.po_dir is None:
+            self.po_dir = "po"
+
+    def run(self):
+        """
+        Update the language files, generate mo files and add them
+        to the to be installed files
+        """
+        data_files = self.distribution.data_files
+
+        xgettextargs='--add-comments=TRANSLATORS '
+        xgettextargs+='--package-name="%s" ' % \
+                       self.distribution.metadata.name
+        xgettextargs+='--package-version="%s" ' % \
+                       self.distribution.metadata.version
+        if self.bug_contact is not None:
+            xgettextargs += '--msgid-bugs-address="%s" ' % \
+                            self.bug_contact
+        if self.copyright is not None:
+            xgettextargs += '--copyright-holder="%s" ' % \
+                            self.copyright
+        if xgettextargs:
+            os.environ["XGETTEXT_ARGS"] = xgettextargs
+            print xgettextargs
+
+        # Print a warning if there is a Makefile that would overwrite our
+        # values
+        if os.path.exists("%s/Makefile" % self.po_dir):
+            self.announce("""
+WARNING: Intltool will use the values specified from the
+         existing po/Makefile in favor of the vaules
+         from setup.cfg.
+         Remove the Makefile to avoid problems.""")
+
+        # Update po(t) files and print a report
+        # We have to change the working dir to the po dir for intltool
+        cmd = ["intltool-update", (self.merge_po and "-r" or "-p"), "-g", self.domain]
+        wd = os.getcwd()
+        os.chdir(self.po_dir)
+        self.spawn(cmd)
+        os.chdir(wd)
+
+        for po_file in glob.glob("%s/*.po" % self.po_dir):
+            lang = os.path.basename(po_file[:-3])
+            mo_dir =  os.path.join("build", "mo", lang, "LC_MESSAGES")
+            mo_file = os.path.join(mo_dir, "%s.mo" % self.domain)
+            if not os.path.exists(mo_dir):
+                os.makedirs(mo_dir)
+            cmd = ["msgfmt", po_file, "-o", mo_file]
+            self.spawn(cmd)
+
+            targetpath = os.path.join("share/locale", lang, "LC_MESSAGES")
+            data_files.append((targetpath, (mo_file,)))
+
+        # merge .in with translation
+        for (option, switch) in ((self.xml_files, "-x"),
+                                 (self.desktop_files, "-d"),
+                                 (self.schemas_files, "-s"),
+                                 (self.rfc822deb_files, "-r"),
+                                 (self.ba_files, "-b"),
+                                 (self.key_files, "-k"),):
+            try:
+                file_set = eval(option)
+            except:
+                continue
+            for (target, files) in file_set:
+                build_target = os.path.join("build", target)
+                if not os.path.exists(build_target): 
+                    os.makedirs(build_target)
+                files_merged = []
+                for file in files:
+                    if file.endswith(".in"):
+                        file_merged = os.path.basename(file[:-3])
+                    else:
+                        file_merged = os.path.basename(file)
+                    file_merged = os.path.join(build_target, file_merged)
+                    cmd = ["intltool-merge", switch, self.po_dir, file, 
+                           file_merged]
+                    self.spawn(cmd)
+                    files_merged.append(file_merged)
+                data_files.append((target, files_merged))
+
+# class build
diff --git a/dist_extra/build_icons.py b/dist_extra/build_icons.py
new file mode 100644
index 0000000..80333ec
--- /dev/null
+++ b/dist_extra/build_icons.py
@@ -0,0 +1,43 @@
+"""distutils_extra.command.build_icons
+
+Implement DistutilsExtra's 'build_icons' command.
+"""
+
+# Created by Sebastian Heinlein 
+
+__revision__ = "$Id$"
+
+import distutils
+import glob
+import os
+import os.path
+import re
+import sys
+import distutils.command.build
+
+class build_icons(distutils.cmd.Command):
+
+    description = "select all icons for installation"
+
+    user_options= [('icon-dir=', 'i', 'icon directory of the source tree')]
+
+    def initialize_options(self):
+        self.icon_dir = None
+
+    def finalize_options(self):
+        if self.icon_dir is None:
+            self.icon_dir = os.path.join("data","icons")
+
+    def run(self):
+        data_files = self.distribution.data_files
+
+        for size in glob.glob(os.path.join(self.icon_dir, "*")):
+            for category in glob.glob(os.path.join(size, "*")):
+                icons = []
+                for icon in glob.glob(os.path.join(category,"*")):
+                    icons.append(icon)
+                    data_files.append(("share/icons/hicolor/%s/%s" % \
+                                       (os.path.basename(size), \
+                                        os.path.basename(category)), \
+                                        icons))
+# class build
diff --git a/dist_extra/clean_i18n.py b/dist_extra/clean_i18n.py
new file mode 100644
index 0000000..a6173ba
--- /dev/null
+++ b/dist_extra/clean_i18n.py
@@ -0,0 +1,36 @@
+"""distutils_extra.command.clean_i18n
+
+Implements the Distutils 'clean_i18n' command."""
+
+import os.path, os
+from distutils.dir_util import remove_tree
+import distutils.command.clean
+
+class clean_i18n(distutils.command.clean.clean):
+
+    description = "clean up files generated by build_i18n"
+
+    def run(self):
+        # clean build/mo
+        mo_dir =  os.path.join("build", "mo")
+        if os.path.isdir(mo_dir):
+            remove_tree('build/mo')
+
+        # clean built i18n files
+        for setname in ('xml_files', 'desktop_files', 'schemas_files',
+            'rfc822deb_files', 'ba_files', 'key_files'):
+            file_set = eval(self.distribution.get_option_dict('build_i18n').get(setname, (None, '[]'))[1])
+            for (target, files) in file_set:
+                build_target = os.path.join("build", target)
+                for file in files:
+                    if file.endswith(".in"):
+                        file_merged = os.path.basename(file[:-3])
+                    else:
+                        file_merged = os.path.basename(file)
+                    file_merged = os.path.join(build_target, file_merged)
+                    if os.path.exists(file_merged):
+                        os.unlink(file_merged)
+                if os.path.exists(build_target):
+                    os.removedirs(build_target)
+
+        distutils.command.clean.clean.run(self)
diff --git a/dist_extra/copyright b/dist_extra/copyright
new file mode 100644
index 0000000..6ea2e21
--- /dev/null
+++ b/dist_extra/copyright
@@ -0,0 +1,26 @@
+This is python-distutils-extra, written and maintained by Sebastian Heinlein <glatzor at ubuntu.com>
+on Sun,  3 Sep 2006 20:26:28 +0200.
+
+The original source can always be found at:
+	http://bzr.glatzor.de/python-distutils-extra/main
+
+Copyright: (c) 2007, 2008 Sebastian Heinlein
+
+License:
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this package; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
diff --git a/dist_extra/setup.cfg.example b/dist_extra/setup.cfg.example
new file mode 100644
index 0000000..683d5df
--- /dev/null
+++ b/dist_extra/setup.cfg.example
@@ -0,0 +1,8 @@
+[build]
+icons=False
+help=True
+
+[build_i18n]
+domain=update-manager
+desktop_files=[("share/applications", ("data/update-manager.desktop.in",))]
+schemas_files=[("share/gconf/schemas", ("data/update-manager.schemas.in",))]
diff --git a/dist_extra/setup.py.example b/dist_extra/setup.py.example
new file mode 100644
index 0000000..b63c6e8
--- /dev/null
+++ b/dist_extra/setup.py.example
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+from distutils.core import setup
+import glob
+import os
+from DistUtilsExtra.command import *
+
+setup(name='software-properties',
+      version='0.50',
+      packages=[
+                'softwareproperties',
+                'softwareproperties.gtk',
+                'softwareproperties.kde',
+                ],
+      scripts=[
+               'software-properties-gtk',
+               'software-properties-kde',
+               ],
+      data_files=[
+                  ('share/software-properties/designer',
+                   glob.glob("data/designer/*.ui")
+                  ),
+                  ('share/software-properties/glade',
+                   glob.glob("data/glade/*.glade")
+                  ),
+                  ],
+      cmdclass = { "build" : build_extra.build_extra,
+                   "build_i18n" :  build_i18n.build_i18n,
+                   "build_help" :  build_help.build_help,
+                   "build_icons" :  build_icons.build_icons }
+     )
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..056b70d
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,3 @@
+src/__init__.py
+src/view.py
+src/model.py
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..0b61c88
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,3 @@
+[build_i18n]
+bug_contact=cscott at laptop.org
+copyright=One Laptop per Child Association, Inc.
diff --git a/setup.py b/setup.py
index 89313ae..19a12be 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
 #!/usr/bin/python2.5
+from dist_extra import * # gettext support
 from distutils.core import setup
 setup(name='sugar-update-control',
       version="0.18",
@@ -12,4 +13,6 @@ setup(name='sugar-update-control',
                   ('/usr/share/sugar/data/icons',
                    ['module-updater.svg']),
                   ],
+      cmdclass = { "build" : build_extra.build_extra,
+                   "build_i18n" :  build_i18n.build_i18n },
       )
diff --git a/sugar-update-control.spec b/sugar-update-control.spec
index a1657bd..522544c 100644
--- a/sugar-update-control.spec
+++ b/sugar-update-control.spec
@@ -14,6 +14,7 @@ Source0: %{name}-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: %{PYTHON_NAME} >= %{PYTHON_VERSION}, %{PYTHON_NAME} < %{NEXT_PYTHON_VERSION}, olpc-update >= 2.13, sugar >= 0.83.0
 BuildPrereq: %{PYTHON_NAME}-devel >= 2.5
+BuildRequires: gettext, intltool
 BuildArch: noarch
 
 %description
@@ -32,11 +33,12 @@ mkdir -p $RPM_BUILD_ROOT
 python2.5 setup.py install --root=$RPM_BUILD_ROOT
 # avoid conflicts
 rm $RPM_BUILD_ROOT/usr/lib/python2.5/site-packages/{bitfrost,bitfrost/update,bitfrost/util}/__init__.py*
+%find_lang %{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%files -f %{name}.lang
 %defattr(-,root,root,-)
 %doc README COPYING
 

commit c49d2e6406653702c599a66aadd69101ed8696bf
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Wed Dec 17 15:02:43 2008 -0500

    Debian packaging: New sugar-update-control can't be used with old sugar.

diff --git a/debian/control b/debian/control
index 97104b5..80e2914 100755
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends: python-support (>= 0.6), debhelper (>= 5)
 
 Package: sugar-update-control
 Architecture: all
-Depends: ${python:Depends}, sugar
+Depends: ${python:Depends}, sugar (>= 0.83.0)
 #Provides: ${python:Provides}
 Description: Activity update control panel for Sugar.
  This package contains a control panel for the Sugar graphical environment

commit ce6c2a29ca006a3f50702e0ca5c153667ee3e316
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Wed Dec 17 14:58:54 2008 -0500

    Re-add bitfrost/update/__init__.py, accidentally removed by dsd.
    
    This was removed in bf43f5062152b6d3bc3b15f53dc2d29fddea3146 and broke
    the RPM packaging.

diff --git a/bitfrost/update/__init__.py b/bitfrost/update/__init__.py
new file mode 100644
index 0000000..e69de29

commit 6643092c5396dc019e7686052db69fd2afc42473
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Wed Dec 17 14:53:27 2008 -0500

    Use gobject's markup escape function, instead of our home-grown one.

diff --git a/src/view.py b/src/view.py
index a1f9c12..049fee5 100755
--- a/src/view.py
+++ b/src/view.py
@@ -61,18 +61,7 @@ TITLE = _('Software update')
 _DEBUG_VIEW_ALL=False
 """View even activities with no pending updates."""
 
-def _escape_markup(s):
-    """Escape special characters in `s` so that it is safe to use in
-    Pango markup.  Equivalent to `g_markup_escape_text` in glib."""
-    entities = { '&': '&amp;',
-                 '<': '&lt;',
-                 '>': '&gt;',
-                 '"': '&quot;',
-                 "'": '&apos;', }
-    if s is None: return None
-    return re.sub("[&<>\"']", lambda m: entities[m.group(0)],
-                  s.decode('utf-8','ignore')).encode('utf-8')
-_e = _escape_markup
+_e = gobject.markup_escape_text
 """Useful abbreviation."""
 
 def _make_button(label_text, stock=None, name=None):

commit 042167f52fa00a687a88d39ec5c8cca80efe8a90
Author: C. Scott Ananian <cscott at laptop.org>
Date:   Wed Dec 17 17:39:47 2008 -0500

    Add appropriate gettext domain to model as well as view.

diff --git a/src/model.py b/src/model.py
index 1461c62..912ae80 100755
--- a/src/model.py
+++ b/src/model.py
@@ -33,10 +33,12 @@ import socket
 import sys
 import traceback
 import zipfile
-from gettext import gettext as _
 from HTMLParser import HTMLParseError
 from urllib2 import HTTPError
 
+import gettext
+_ = lambda msg: gettext.dgettext('sugar-update-control', msg)
+
 import bitfrost.update.actinfo as actinfo
 import bitfrost.update.actutils as actutils
 import bitfrost.update.microformat as microformat
-----------------------------------------------------------------------


--
/home/cscott/public_git/sugar-update-control


More information about the Commits mailing list