Hello community, here is the log from the commit of package python-distutils-extra for openSUSE:Factory checked in at Tue Nov 2 13:52:32 CET 2010. -------- --- python-distutils-extra/python-distutils-extra.changes 2010-04-02 03:41:07.000000000 +0200 +++ /mounts/work_src_done/STABLE/python-distutils-extra/python-distutils-extra.changes 2010-10-30 10:33:43.000000000 +0200 @@ -1,0 +2,80 @@ +Sat Oct 30 08:22:11 UTC 2010 - rwobben@hotmail.com + +- Update to version 2.22 ( 2.6 is not the latest one) + + +Changelog to 2.22 + +* setup.py: Drop import of "commands"; unused, and does not exist in + python3. + * DistUtilsExtra/command/build_extra.py: Use "in" operator instead of + has_key(). It's more elegant and Python 3 compatible. + * test/auto.py: Use Python3 compatible octal constant. + * test/auto.py: Decode stdout/stderr result from subprocess from bytes to + str, to work with Python3. + * test/auto.py: Use whichever Python interpreter we got invoked with (using + /proc/self/exe) instead of hardcoding "python". With that we can run the + tests through python3 as well. + * DistUtilsExtra/auto.py: Port from deprecated "compiler" module to current + "ast" module. + * test/auto.py: Only set PYTHONPATH if it isn't set already, so that we can + override it from outside. + * test/auto.py: Do not require that "setup.py clean -a" doesn't print + anything to stderr; with Python 3.1 it now sends out warnings about + nonexisting directories. + * test/auto.py: Changed print statements to work with both Python 2 and 3. + * DistUtilsExtra/command/build_extra.py: Drop unnecessary hashbang line. + * test/auto.py: Filter out bogus errors about missing files which current + Python 3 distutils spews out. + * test/auto.py, Use python{,3}-{pkg-resources,httplib2} as + external test modules instead of -xdg and -dateutil, since the latter are + not available for Python 3 yet. + +Changelog to 2.20 + + [Didier Roche ] + * build_i18n.py: add support for LINGUAS (Siegfried Gevatter) (LP: #510957) + +[ Martin Pitt ] +* debian/local/python-mkdebian: Make langpack.mk include optional, as it + only exists in Ubuntu, not Debian. (Closes: #589802) +* debian/local/python-mkdebian: If we are on Debian, set upload target to + "unstable". (Closes: #589794) + +changelog to 2.19 + + * auto.py: Also recognize Qt .ui files if they start with an "<?xml..." + first line. (LP: #543707) +* test/auto.py: Check that automatic translation extraction also works for + extensionless files and single quotation marks. (Side discussion in + LP #533565) +* test/auto.py: Check that scripts explicitly mentioned in "data_files" and + "scripts" are covered by the automatic POTFILES.in generation. This + reproduces LP #533565. +* auto.py: Include scripts in setup.py's data_files into potential + POTFILES.in candidates. (LP: #533565) +* debian/control: Swap maintainer (me) and uploaders (Sebastian), since I'm + the de-facto maintainer now. +* debian/control: Replace python-all-dev build dependency with python-all, + which is enough. Also wrap build dependencies. +* Add debian/source/format: 3.0 (native). +* setup.py: Grab version from DistUtilsExtra/auto.py instead of duplicating + and hardcoding it. +* python_mkdebian: Add --version option. +* Move primary __version__ definition to DistUtilsExtra/__init__.py, where + it makes more sense than just in the auto module. +* Add debian/local/python-mkdebian.1. (Closes: #546266) +* Add debian/python-distutils-extra.manpages to install the new manpage. + + +------------------------------------------------------------------- +Fri Oct 29 10:25:13 UTC 2010 - rwobben@hotmail.com + +- Update to version 2.6 + +------------------------------------------------------------------- +Fri Oct 29 09:55:56 UTC 2010 - rwobben@hotmail.com + +- Update to version 2.22 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- python-distutils-extra-2.18.tar.gz New: ---- python-distutils-extra-2.22.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-distutils-extra.spec ++++++ --- /var/tmp/diff_new_pack.ZuvZSd/_old 2010-11-02 13:52:15.000000000 +0100 +++ /var/tmp/diff_new_pack.ZuvZSd/_new 2010-11-02 13:52:15.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package python-distutils-extra (Version 2.18) +# spec file for package python-distutils-extra (Version 2.22) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,7 +19,7 @@ Name: python-distutils-extra -Version: 2.18 +Version: 2.22 Release: 1 Summary: Distutils/Setuptools Adapter Source: http://launchpad.net/python-distutils-extra/trunk/%{version}/+download/python-distutils-extra-%{version}.tar.gz ++++++ python-distutils-extra-2.18.tar.gz -> python-distutils-extra-2.22.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-distutils-extra-2.18/DistUtilsExtra/auto.py new/python-distutils-extra-2.22/DistUtilsExtra/auto.py --- old/python-distutils-extra-2.18/DistUtilsExtra/auto.py 2010-03-24 09:45:52.000000000 +0100 +++ new/python-distutils-extra-2.22/DistUtilsExtra/auto.py 2010-09-16 19:31:55.000000000 +0200 @@ -34,15 +34,14 @@ author, license, etc.) in ./setup.py. ''' -__version__ = '2.18' - # (c) 2009 Canonical Ltd. # Author: Martin Pitt <martin.pitt@ubuntu.com> import os, os.path, fnmatch, stat, sys, subprocess -import compiler # TODO: deprecated +import ast import distutils.core +from DistUtilsExtra import __version__ as __pkgversion from DistUtilsExtra.command import * import distutils.dir_util import distutils.command.clean @@ -50,6 +49,8 @@ import distutils.command.install import distutils.filelist +__version__ = __pkgversion + # FIXME: global variable, to share with build_i18n_auto src = {} src_all = {} @@ -329,16 +330,16 @@ This filters out modules which are shipped with Python itself. ''' try: - ast = compiler.parseFile(file) + tree = ast.parse(open(file).read(), file) - for node in ast.node.nodes: - if isinstance(node, compiler.ast.Import): - for name, _ in node.names: - if __external_mod(name, attrs): - imports.add(name) - if isinstance(node, compiler.ast.From): - if __external_mod(node.modname, attrs): - imports.add(node.modname) + for node in ast.walk(tree): + if isinstance(node, ast.Import): + for alias in node.names: + if __external_mod(alias.name, attrs): + imports.add(alias.name) + if isinstance(node, ast.ImportFrom): + if __external_mod(node.module, attrs): + imports.add(node.module) except SyntaxError, e: print >> sys.stderr, 'WARNING: syntax errors in', file, ':', e @@ -557,7 +558,7 @@ # find extensionless executable scripts which are Python files, and # generate a temporary *.py alias, so that they get caught by # intltool - for f in src_all: + for f in reduce(lambda x, y: x.union(y[1]), self.distribution.data_files, src_all): f_py = f + '.py' if os.access(f, os.X_OK) and os.path.splitext(f)[1] == '' and \ not os.path.exists(f_py): @@ -597,9 +598,13 @@ # add *.ui files which belong to KDE4 kdeui_files = [] for f in src_fileglob(src, '*.ui'): - if open(f).readline().startswith('<ui version="'): + fd = open(f) + # might be on the first or second line + if fd.readline().startswith('<ui version="') or \ + fd.readline().startswith('<ui version="'): src_mark(src, f) kdeui_files.append(f) + fd.close() if kdeui_files: try: uf = eval(self.ui_files) @@ -665,7 +670,8 @@ os.unlink(os.path.join(self.root, f)) except OSError: pass - + if not self.root: + self.root = '' distutils.dir_util.copy_tree('etc', os.path.join(self.root, 'etc'), preserve_times=0, preserve_symlinks=1, verbose=1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-distutils-extra-2.18/DistUtilsExtra/command/build_extra.py new/python-distutils-extra-2.22/DistUtilsExtra/command/build_extra.py --- old/python-distutils-extra-2.18/DistUtilsExtra/command/build_extra.py 2009-06-27 09:34:35.000000000 +0200 +++ new/python-distutils-extra-2.22/DistUtilsExtra/command/build_extra.py 2010-09-16 19:17:46.000000000 +0200 @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import distutils import glob import os @@ -28,19 +26,19 @@ def finalize_options(self): def has_help(command): return self.help == "True" or \ - (self.distribution.cmdclass.has_key("build_help") and not \ + ("build_help" in self.distribution.cmdclass and not \ self.help == "False") def has_icons(command): return self.icons == "True" or \ - (self.distribution.cmdclass.has_key("build_icons") and not \ + ("build_icons" in self.distribution.cmdclass and not \ self.help == "False") def has_i18n(command): return self.i18n == "True" or \ - (self.distribution.cmdclass.has_key("build_i18n") and not \ + ("build_i18n" in self.distribution.cmdclass and not \ self.i18n == "False") def has_kdeui(command): return self.kdeui == "True" or \ - (self.distribution.cmdclass.has_key("build_kdeui") and not \ + ("build_kdeui" in self.distribution.cmdclass and not \ self.kdeui == "False") distutils.command.build.build.finalize_options(self) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-distutils-extra-2.18/DistUtilsExtra/command/build_i18n.py new/python-distutils-extra-2.22/DistUtilsExtra/command/build_i18n.py --- old/python-distutils-extra-2.18/DistUtilsExtra/command/build_i18n.py 2009-12-22 21:38:59.000000000 +0100 +++ new/python-distutils-extra-2.22/DistUtilsExtra/command/build_i18n.py 2010-09-16 15:53:37.000000000 +0200 @@ -77,6 +77,15 @@ from setup.cfg. Remove the Makefile to avoid problems.""") + # If there is a po/LINGUAS file, or the LINGUAS environment variable + # is set, only compile the languages listed there. + selected_languages = None + linguas_file = os.path.join(self.po_dir, "LINGUAS") + if os.path.isfile(linguas_file): + selected_languages = open(linguas_file).read().split() + if "LINGUAS" in os.environ: + selected_languages = os.environ["LINGUAS"].split() + # 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] @@ -87,6 +96,8 @@ max_po_mtime = 0 for po_file in glob.glob("%s/*.po" % self.po_dir): lang = os.path.basename(po_file[:-3]) + if selected_languages and not lang in selected_languages: + continue 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): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-distutils-extra-2.18/DistUtilsExtra/__init__.py new/python-distutils-extra-2.22/DistUtilsExtra/__init__.py --- old/python-distutils-extra-2.18/DistUtilsExtra/__init__.py 2009-03-23 12:59:39.000000000 +0100 +++ new/python-distutils-extra-2.22/DistUtilsExtra/__init__.py 2010-09-16 20:10:16.000000000 +0200 @@ -0,0 +1 @@ +__version__ = '2.22' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-distutils-extra-2.18/PKG-INFO new/python-distutils-extra-2.22/PKG-INFO --- old/python-distutils-extra-2.18/PKG-INFO 2010-03-24 09:46:37.000000000 +0100 +++ new/python-distutils-extra-2.22/PKG-INFO 2010-09-16 20:10:31.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: python-distutils-extra -Version: 2.18 +Version: 2.22 Summary: Add support for i18n, documentation and icons to distutils Home-page: UNKNOWN Author: Sebastian Heinlein, Martin Pitt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-distutils-extra-2.18/python_distutils_extra.egg-info/PKG-INFO new/python-distutils-extra-2.22/python_distutils_extra.egg-info/PKG-INFO --- old/python-distutils-extra-2.18/python_distutils_extra.egg-info/PKG-INFO 2010-03-24 09:46:37.000000000 +0100 +++ new/python-distutils-extra-2.22/python_distutils_extra.egg-info/PKG-INFO 2010-09-16 20:10:31.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: python-distutils-extra -Version: 2.18 +Version: 2.22 Summary: Add support for i18n, documentation and icons to distutils Home-page: UNKNOWN Author: Sebastian Heinlein, Martin Pitt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-distutils-extra-2.18/setup.py new/python-distutils-extra-2.22/setup.py --- old/python-distutils-extra-2.18/setup.py 2010-03-24 09:45:57.000000000 +0100 +++ new/python-distutils-extra-2.22/setup.py 2010-09-16 15:53:37.000000000 +0200 @@ -1,11 +1,14 @@ #!/usr/bin/env python from setuptools import setup -import glob, os, commands, sys +import glob, os, sys + +sys.path.insert(0, '.') +from DistUtilsExtra import __version__ as pkgversion setup( name = 'python-distutils-extra', - version = '2.18', + version = pkgversion, author = 'Sebastian Heinlein, Martin Pitt', author_email = 'sebi@glatzor.de, martin.pitt@ubuntu.com', description = 'Add support for i18n, documentation and icons to distutils', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-distutils-extra-2.18/test/auto.py new/python-distutils-extra-2.22/test/auto.py --- old/python-distutils-extra-2.18/test/auto.py 2010-03-24 09:43:12.000000000 +0100 +++ new/python-distutils-extra-2.22/test/auto.py 2010-09-16 19:46:25.000000000 +0200 @@ -2,7 +2,7 @@ # test DistUtilsExtra.auto -import sys, unittest, shutil, tempfile, os, os.path, subprocess +import sys, unittest, shutil, tempfile, os, os.path, subprocess, re class T(unittest.TestCase): def setUp(self): @@ -28,7 +28,6 @@ try: # check that setup.py clean removes everything (o, e, s) = self.setup_py(['clean', '-a']) - self.assertEqual(e, '') self.assertEqual(s, 0) cruft = self.diff_snapshot() self.assertEqual(cruft, '', 'no cruft after cleaning:\n' + cruft) @@ -192,7 +191,7 @@ os.path.join(self.install_tree, 'usr/share/locale/de/LC_MESSAGES/foo.mo')], stdout=subprocess.PIPE) - out = msgunfmt.communicate()[0] + out = msgunfmt.communicate()[0].decode() self.assertEqual(out, open(os.path.join(self.src, 'po/de.po')).read()) def test_policykit(self): @@ -330,8 +329,8 @@ ''') self._mksrc('data/stuff') - self._mksrc('data/handlers/red.py', 'import sys\nprint "RED"') - self._mksrc('data/handlers/blue.py', 'import sys\nprint "BLUE"') + self._mksrc('data/handlers/red.py', 'import sys\nprint ("RED")') + self._mksrc('data/handlers/blue.py', 'import sys\nprint ("BLUE")') self._mksrc('data/40-foo.rules') self._mksrc('data/blob1.conf') self._mksrc('data/blob2.conf') @@ -448,6 +447,47 @@ # above loop would match yes11 to yes1 as well, so test it explicitly self.assert_('msgid "yes1"' in pot) + def test_pot_auto_explicit(self): + '''PO template creation with automatic POTFILES.in and explicit scripts''' + + self._mk_i18n_source() + + # add some additional binaries here which aren't caught by default + self._mksrc('cli/client-cli', "#!/usr/bin/python\nprint (_('yes15'))", True) + self._mksrc('gtk/client-gtk', '#!/usr/bin/python\nprint (_("yes16"))', True) + # this is the most tricky case: intltool doesn't consider them Python + # files by default and thus just looks for _(""): + self._mksrc('kde/client-kde', "#!/usr/bin/python\nprint (_('yes17'))", True) + self._mksrc('po/POTFILES.in.in', 'gtk/client-gtk\nkde/client-kde') + self._mksrc('setup.py', ''' +from DistUtilsExtra.auto import setup + +setup( + name='foo', + version='0.1', + data_files=[('share/foo', ['gtk/client-gtk', 'kde/client-kde'])], + scripts=['cli/client-cli'], +) +''') + + (o, e, s) = self.setup_py(['build']) + self.assertEqual(e, '') + self.assertEqual(s, 0) + # POT file should not be shown as not recognized + self.failIf('\n po/foo.pot\n' in o) + + pot_path = os.path.join(self.src, 'po', 'foo.pot') + self.assert_(os.path.exists(pot_path)) + pot = open(pot_path).read() + + self.failIf('msgid "no"' in pot) + for i in range(2, 18): + self.assert_('msgid "yes%i' % i in pot or + 'msgid ""\n"yes%i' % i in pot, + 'yes%i' % i) + # above loop would match yes11 to yes1 as well, so test it explicitly + self.assert_('msgid "yes1"' in pot) + def test_standard_files(self): '''Standard files (MANIFEST.in, COPYING, etc.)''' @@ -611,16 +651,16 @@ '''automatic requires/provides''' try: - __import__('xdg') - __import__('dateutil') + __import__('pkg_resources') + __import__('httplib2') except ImportError: - self.fail('You need to have xdg and dateutil installed for this test suite to work') + self.fail('You need to have pkg_resources and httplib2 installed for this test suite to work') self._mksrc('foo/__init__.py', '') self._mksrc('foo/stuff.py', '''import xml.parsers.expat import os, os.path, email.mime, distutils.command.register from email import header as h -import xdg.Mime, unknown +import httplib2.iri2uri, unknown ''') self._mksrc('foo/bar/__init__.py', '') @@ -630,11 +670,11 @@ self._mksrc('bin/foo-cli', '''#!/usr/bin/python import sys -from dateutil import tz +import pkg_resources import foo.bar -from xdg import Menu +from httplib2 import iri2uri -print 'import iamnota.module' +print ('import iamnota.module') ''', executable=True) # this shouldn't be treated specially @@ -667,7 +707,7 @@ # check requires req = [prop.split(' ', 1)[1] for prop in egg if prop.startswith('Requires: ')] - self.assertEqual(set(req), set(['DistUtilsExtra.auto', 'xdg', 'dateutil'])) + self.assertEqual(set(req), set(['DistUtilsExtra.auto', 'httplib2', 'pkg_resources'])) def test_help(self): '''Docbook XML help''' @@ -717,12 +757,22 @@ env = os.environ oldcwd = os.getcwd() - env['PYTHONPATH'] = oldcwd + if 'PYTHONPATH' not in env: + env['PYTHONPATH'] = oldcwd os.chdir(self.src) - s = subprocess.Popen(['python', 'setup.py'] + args, env=env, + s = subprocess.Popen(['/proc/self/exe', 'setup.py'] + args, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (out, err) = s.communicate() + out = out.decode() + err = err.decode() os.chdir(oldcwd) + + # python3 distutils bug workaround, filter out bogus errors + bogus_re = re.compile('^file .* \(for module .*\) not found$') + err = '\n'.join([l for l in err.splitlines() if not bogus_re.match(l)]) + if err: + err += '\n' + return (out, err, s.returncode) def do_install(self): @@ -756,13 +806,13 @@ f = open(path, 'w') if content is None: # default content, to spot with diff - print >> f, 'dummy' + f.write('dummy') else: - print >> f, content + f.write(content + '\n') f.close() if executable: - os.chmod(path, 0755) + os.chmod(path, 0o755) def do_snapshot(self): '''Snapshot source tree. @@ -783,7 +833,8 @@ diff = subprocess.Popen(['diff', '-x', 'foo.pot', '-Nur', os.path.join(self.snapshot, 's'), self.src], stdout=subprocess.PIPE, stderr=subprocess.PIPE) (out, err) = diff.communicate() - self.assertEqual(err, '', 'diff error messages') + out = out.decode() + self.assertEqual(err, b'', 'diff error messages') return out def _mkpo(self): @@ -807,26 +858,26 @@ def _mk_i18n_source(self): '''Create some example source files with gettext calls''' - self._mksrc('gtk/main.py', '''print _("yes1") -print "no1" -print __("no2") + self._mksrc('gtk/main.py', '''print (_("yes1")) +print ("no1") +print (__("no2")) x = _('yes2 %s') % y def f(): - print _(u"yes3") - return _(u'yes6')''') + print (_("yes3")) + return _('yes6')''') self._mksrc('helpers.py', ''' -print f(_(u"yes4")) -print _(\'\'\'yes5 +print (f(_("yes4"))) +print (_(\'\'\'yes5 even more -lines\'\'\') -print _("""yes6 -more lines""") -print \'\'\'no3 -boo\'\'\' -print """no4 -more"""''') +lines\'\'\')) +print (_("""yes6 +more lines""")) +print (\'\'\'no3 +boo\'\'\') +print ("""no4 +more""")''') self._mksrc('gui/foo.desktop.in', '''[Desktop Entry] _Name=yes7 @@ -869,9 +920,9 @@ self._mksrc('Makefile', 'echo _("no7")') # Executables without *.py extension - self._mksrc('gtk/foo-gtk', '#!/usr/bin/python\nprint _("yes13")', + self._mksrc('gtk/foo-gtk', '#!/usr/bin/python\nprint (_("yes13"))', executable=True) - self._mksrc('cli/foo-cli', '#!/usr/bin/env python\nprint _("yes14")', + self._mksrc('cli/foo-cli', '#!/usr/bin/env python\nprint (_(\'yes14\'))', executable=True) self._mksrc('daemon/foobarize', '#!/usr/bin/flex\np _("no8")', executable=True) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org