debian/0000755000000000000000000000000011677467413007206 5ustar debian/changelog0000644000000000000000000000170011677467413011056 0ustar python-gflags (1.5.1-1build1) precise; urgency=low * Rebuild to drop python2.6 dependencies. -- Matthias Klose Sat, 31 Dec 2011 02:10:19 +0000 python-gflags (1.5.1-1) unstable; urgency=low * New upstream release * python2.7-testsuite.patch: Make test suite pass with Python 2.7. (Closes: #625155) * Convert to dh7 and dh_python2. * Bump Standards-Version to 3.9.2. No changes needed. * Add Vcs headers. * Stop depending on googlecode.debian.net in debian/watch. * Make sure to remove generated man page on clean. * Drop update-SOURCES.txt.patch and just delete SOURCES.txt on clean. * Make failure of the test suite fatal for every python version, not just the last one. -- Soren Hansen Fri, 17 Jun 2011 16:56:56 +0200 python-gflags (1.3-1) unstable; urgency=low * Initial upload to unstable. (Closes: #588284) -- Soren Hansen Wed, 28 Jul 2010 14:48:14 +0200 debian/README0000644000000000000000000000010211576625132010047 0ustar debian/rules0000755000000000000000000000073611576665411010270 0ustar #!/usr/bin/make -f %: dh $@ --with python2 override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) set -e ; for pyversion in $(shell pyversions -r); do $$pyversion gflags_unittest.py; done endif override_dh_auto_install: dh_auto_install mv $(CURDIR)/debian/python-gflags/usr/bin/gflags2man.py $(CURDIR)/debian/python-gflags/usr/bin/gflags2man PYTHONPATH=$(CURDIR) python gflags2man.py --dest_dir $(CURDIR) $(CURDIR)/debian/python-gflags/usr/bin/gflags2man debian/manpages0000644000000000000000000000001511575646257010722 0ustar gflags2man.1 debian/control0000644000000000000000000000233211576632125010601 0ustar Source: python-gflags Section: python Priority: optional Maintainer: Debian Python Modules Team Uploaders: Soren Hansen Build-Depends: debhelper (>= 7.0.50~), python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3~) Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-gflags/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-gflags/trunk/ Package: python-gflags Architecture: all Depends: ${python:Depends}, ${misc:Depends} Description: Python implementation of the Google command line flags module GFlags defines a distributed command line system, replacing systems like getopt(), optparse and manual argument processing. Rather than an application having to define all flags in or near main(), each Python module defines flags that are useful to it. When one Python module imports another, it gains access to the other's flags. . It includes the ability to define flag types (boolean, float, integer, list), autogeneration of help (in both human and machine readable format) and reading arguments from a file. It also includes the ability to automatically generate man pages from the help flags. debian/copyright0000644000000000000000000000355311575646257011151 0ustar This package was debianized by Soren Hansen on Tue, 06 Jul 2010 22:50:29 +0200 It was downloaded from http://code.google.com/p/google-gflags/downloads/list Copyright: Copyright © 2006-2010, Google Inc. License: All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The Debian packaging is © 2010 Soren Hansen and is licensed under the same license as python-gflags. debian/source/0000755000000000000000000000000011576665475010514 5ustar debian/source/format0000644000000000000000000000001411575646257011716 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000016111576625733010234 0ustar version=3 http://code.google.com/p/python-gflags/ //python-gflags.googlecode.com/files/python-gflags-(.*).tar.gz debian/patches/0000755000000000000000000000000011576665475010643 5ustar debian/patches/python2.7-testsuite.patch0000644000000000000000000000642711575755752015471 0ustar Description: Make test suite pass with Python2.7 Python 2.7's unittest module introduced some new methods that gflags_unittest already had defined. This calls for some special handling to avoid having them step on each other's toes. Forwarded: http://code.google.com/p/python-gflags/issues/detail?id=7 Author: Soren Hansen Last-Update: 2011-06-14 Index: python-gflags-1.5.1/gflags_unittest.py =================================================================== --- python-gflags-1.5.1.orig/gflags_unittest.py +++ python-gflags-1.5.1/gflags_unittest.py @@ -102,22 +102,34 @@ return False +class _UnitTestClass(unittest.TestCase): + def assertListEqual(self, list1, list2, msg=None): + """Asserts that, when sorted, list1 and list2 are identical.""" + if hasattr(super(_UnitTestClass, self), 'assertListEqual'): + super(_UnitTestClass, self).assertListEqual(Sorted(list1), Sorted(list2)) + else: + self.assertEqual(Sorted(list1), Sorted(list2)) + + def assertMultiLineEqual(self, expected, actual): + """Could do fancy diffing, but for now, just do a normal compare.""" + self.assert_(MultiLineEqual(expected, actual)) -class FlagsUnitTest(unittest.TestCase): + def assertRaisesWithRegexpMatch(self, exception, regexp, fn, *args, **kwargs): + try: + fn(*args, **kwargs) + except exception, why: + self.assert_(re.search(regexp, str(why)), + '"%s" does not match "%s"' % (regexp, why)) + return + self.fail(exception.__name__ + ' not raised') + +class FlagsUnitTest(_UnitTestClass): "Flags Unit Test" def setUp(self): # make sure we are using the old, stupid way of parsing flags. FLAGS.UseGnuGetOpt(False) - def assertListEqual(self, list1, list2): - """Asserts that, when sorted, list1 and list2 are identical.""" - self.assertEqual(Sorted(list1), Sorted(list2)) - - def assertMultiLineEqual(self, expected, actual): - self.assert_(MultiLineEqual(expected, actual)) - - def test_flags(self): ############################################## @@ -1411,19 +1423,11 @@ self.assertFalse('x5' in flag_values.RegisteredFlags()) -class KeyFlagsTest(unittest.TestCase): +class KeyFlagsTest(_UnitTestClass): def setUp(self): self.flag_values = flags.FlagValues() - def assertListEqual(self, list1, list2): - """Asserts that, when sorted, list1 and list2 are identical.""" - self.assertEqual(Sorted(list1), Sorted(list2)) - - def assertMultiLineEqual(self, s1, s2): - """Could do fancy diffing, but for now, just do a normal compare.""" - self.assertEqual(s1, s2) - def _GetNamesOfDefinedFlags(self, module, flag_values): """Returns the list of names of flags defined by a module. Index: python-gflags-1.5.1/test_module_baz.py =================================================================== --- /dev/null +++ python-gflags-1.5.1/test_module_baz.py @@ -0,0 +1,18 @@ +#!/usr/bin/python2.4 +# +# Copyright 2010 Google Inc. All Rights Reserved. + +"""Auxiliary module for testing flags.py. + +The purpose of this module is to test the behavior of flags that are defined +before main() executes. +""" + + +__author__ = 'mikecurtis@google.com (Michael Bennett Curtis)' + +import gflags as flags + +FLAGS = flags.FLAGS + +flags.DEFINE_boolean('tmod_baz_x', True, 'Boolean flag.') debian/patches/series0000644000000000000000000000003211576663776012055 0ustar python2.7-testsuite.patch debian/compat0000644000000000000000000000000211575755752010407 0ustar 7 debian/docs0000644000000000000000000000010011576625132010040 0ustar # Dummy docs file to work around bug 623163 in svn-buildpackage debian/clean0000644000000000000000000000006011576663776010217 0ustar gflags2man.1 python_gflags.egg-info/SOURCES.txt