[Python-modules-commits] r8578 - in packages/prettytable/trunk/debian (5 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Wed May 27 06:56:25 UTC 2009


    Date: Wednesday, May 27, 2009 @ 06:56:11
  Author: morph
Revision: 8578

Initial release (Closes: #530704)

Added:
  packages/prettytable/trunk/debian/examples
  packages/prettytable/trunk/debian/prettytable-example.py
Modified:
  packages/prettytable/trunk/debian/changelog
  packages/prettytable/trunk/debian/control
  packages/prettytable/trunk/debian/copyright

Modified: packages/prettytable/trunk/debian/changelog
===================================================================
--- packages/prettytable/trunk/debian/changelog	2009-05-27 06:27:56 UTC (rev 8577)
+++ packages/prettytable/trunk/debian/changelog	2009-05-27 06:56:11 UTC (rev 8578)
@@ -1,5 +1,5 @@
-prettytable (0.5-1) unstable; urgency=low
+prettytable (0.5-1) UNRELEASED; urgency=low
 
-  * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
+  * Initial release (Closes: #530704)
 
- -- Sandro Tosi <morph at debian.org>  Wed, 27 May 2009 08:06:55 +0200
+ -- Sandro Tosi <morph at debian.org>  Wed, 27 May 2009 08:33:46 +0200

Modified: packages/prettytable/trunk/debian/control
===================================================================
--- packages/prettytable/trunk/debian/control	2009-05-27 06:27:56 UTC (rev 8577)
+++ packages/prettytable/trunk/debian/control	2009-05-27 06:56:11 UTC (rev 8578)
@@ -1,13 +1,22 @@
 Source: prettytable
-Section: unknown
-Priority: extra
-Maintainer: Sandro Tosi <morph at debian.org>
-Build-Depends: debhelper (>= 7)
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Uploaders: Sandro Tosi <morph at debian.org>
+Build-Depends: debhelper (>= 7), python
+Build-Depends-Indep: python-support (>= 1.0.0)
 Standards-Version: 3.8.1
-Homepage: <insert the upstream URL, if relevant>
+Homepage: http://code.google.com/p/prettytable/
+Vcs-Svn: svn://svn.debian.org/python-modules/packages/prettytable/trunk/
+Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/prettytable/trunk/
 
-Package: prettytable
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
+Package: python-prettytable
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}
+Description: library to represent tabular data in visually appealing ASCII tables
+ PrettyTable is a simple Python library designed to make it quick and
+ easy to represent tabular data in visually appealing ASCII tables. It
+ was inspired by the ASCII tables used in the PostgreSQL shell
+ psql. PrettyTable allows for selection of which columns are to be
+ printed, independent alignment of columns (left or right justified or
+ centred) and printing of "sub-tables" by specifying a row range.

Modified: packages/prettytable/trunk/debian/copyright
===================================================================
--- packages/prettytable/trunk/debian/copyright	2009-05-27 06:27:56 UTC (rev 8577)
+++ packages/prettytable/trunk/debian/copyright	2009-05-27 06:56:11 UTC (rev 8578)
@@ -1,28 +1,43 @@
 This package was debianized by Sandro Tosi <morph at debian.org> on
 Wed, 27 May 2009 08:06:55 +0200.
 
-It was downloaded from <url://example.com>
+It was downloaded from http://code.google.com/p/prettytable/
 
-Upstream Author(s):
+Upstream Author:
 
-    <put author's name and email here>
-    <likewise for another author>
+    Luke Maurits <luke at maurits.id.au>
 
 Copyright:
 
-    <Copyright (C) YYYY Name OfAuthor>
-    <likewise for another author>
+    Copyright (c) 2009, Luke Maurits <luke at maurits.id.au>
 
 License:
 
-    <Put the license of the package here indented by 4 spaces>
+    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.
+    * The name of the author may not 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:
 
     Copyright (C) 2009 Sandro Tosi <morph at debian.org>
 
-and is licensed under the GPL version 3, 
-see `/usr/share/common-licenses/GPL-3'.
-
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
+and is licensed under the same terms as upstream code

Added: packages/prettytable/trunk/debian/examples
===================================================================
--- packages/prettytable/trunk/debian/examples	                        (rev 0)
+++ packages/prettytable/trunk/debian/examples	2009-05-27 06:56:11 UTC (rev 8578)
@@ -0,0 +1 @@
+debian/prettytable-example.py

Added: packages/prettytable/trunk/debian/prettytable-example.py
===================================================================
--- packages/prettytable/trunk/debian/prettytable-example.py	                        (rev 0)
+++ packages/prettytable/trunk/debian/prettytable-example.py	2009-05-27 06:56:11 UTC (rev 8578)
@@ -0,0 +1,79 @@
+#!/usr/bin/python
+# Example extracted from the source code of prettytable module
+
+def main():
+
+    x = PrettyTable(["City name", "Area", "Population", "Annual Rainfall"])
+    x.set_field_align("City name", "l") # Left align city names
+    x.add_row(["Adelaide",1295, 1158259, 600.5])
+    x.add_row(["Brisbane",5905, 1857594, 1146.4])
+    x.add_row(["Darwin", 112, 120900, 1714.7])
+    x.add_row(["Hobart", 1357, 205556, 619.5])
+    x.add_row(["Sydney", 2058, 4336374, 1214.8])
+    x.add_row(["Melbourne", 1566, 3806092, 646.9])
+    x.add_row(["Perth", 5386, 1554769, 869.4])
+    print x
+
+    if len(sys.argv) > 1 and sys.argv[1] == "test":
+
+    # This "test suite" is hideous and provides poor, arbitrary coverage.
+    # I'll replace it with some proper unit tests Sometime Soon (TM).
+    # Promise.
+        print "Testing field subset selection:"
+        x.printt(fields=["City name","Population"])
+        print "Testing row subset selection:"
+        x.printt(start=2, end=5)
+        print "Testing hrules settings:"
+        print "FRAME:"
+        x.printt(hrules=FRAME)
+        print "ALL:"
+        x.printt(hrules=ALL)
+        print "NONE:"
+        x.printt(hrules=NONE)
+        print "Testing lack of headers:"
+        x.printt(header=False)
+        x.printt(header=False, border=False)
+        print "Testing lack of borders:"
+        x.printt(border=False)
+        print "Testing sorting:"
+        x.printt(sortby="City name")
+        x.printt(sortby="Annual Rainfall")
+        x.printt(sortby="Annual Rainfall", reversesort=True)
+        print "Testing padding parameter:"
+        x.set_padding_width(0)
+        x.printt()
+        x.set_padding_width(5)
+        x.printt()
+        x.set_left_padding(5)
+        x.set_right_padding(0)
+        x.printt()
+        x.set_right_padding(20)
+        x.printt()
+        x.set_left_padding(None)
+        x.set_right_padding(None)
+        x.set_padding_width(2)
+        print "Testing changing characters"
+        x.set_border_chars("*","*","*")
+        x.printt()
+        x.set_border_chars("!","~","o")
+        x.printt()
+        x.set_border_chars("|","-","+")
+        print "Testing everything at once:"
+        x.printt(start=2, end=5, fields=["City name","Population"], border=False, hrules=True)
+        print "Rebuilding by columns:"
+        x = PrettyTable()
+        x.add_column("City name", ["Adelaide", "Brisbane", "Darwin", "Hobart", "Sydney", "Melbourne", "Perth"])
+        x.add_column("Area", [1295, 5905, 112, 1357, 2058, 1566, 5385])
+        x.add_column("Population", [1158259, 1857594, 120900, 205556, 4336374, 3806092, 1554769])
+        x.add_column("Annual Rainfall", [600.5, 1146.4, 1714.7, 619.5, 1214.8, 646.9, 869.4])
+        x.printt()
+        print "Testing HTML:"
+        x.print_html()
+        x.print_html(border=False)
+        x.print_html(border=True)
+        x.print_html(format=False)
+        x.print_html(attributes={"name": "table", "id": "table"})
+
+if __name__ == "__main__":
+    main()
+




More information about the Python-modules-commits mailing list