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

morph at users.alioth.debian.org morph at users.alioth.debian.org
Tue May 1 10:51:22 UTC 2012


    Date: Tuesday, May 1, 2012 @ 10:51:20
  Author: morph
Revision: 21468

Provide python3 package; thanks to James Page for initial patch;
Closes: #638303

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

Modified: packages/prettytable/trunk/debian/changelog
===================================================================
--- packages/prettytable/trunk/debian/changelog	2012-05-01 09:02:00 UTC (rev 21467)
+++ packages/prettytable/trunk/debian/changelog	2012-05-01 10:51:20 UTC (rev 21468)
@@ -2,8 +2,10 @@
 
   * debian/control
     - bump Standards-Version to 3.9.3 (no changes needed)
+  * Provide python3 package; thanks to James Page for initial patch;
+    Closes: #638303
 
- -- Sandro Tosi <morph at debian.org>  Tue, 01 May 2012 11:00:06 +0200
+ -- Sandro Tosi <morph at debian.org>  Tue, 01 May 2012 12:48:52 +0200
 
 prettytable (0.5-1) unstable; urgency=low
 

Modified: packages/prettytable/trunk/debian/control
===================================================================
--- packages/prettytable/trunk/debian/control	2012-05-01 09:02:00 UTC (rev 21467)
+++ packages/prettytable/trunk/debian/control	2012-05-01 10:51:20 UTC (rev 21468)
@@ -3,7 +3,7 @@
 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, python-setuptools
+Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), python3-all (>= 3.1.3-3), python-setuptools, python3-setuptools
 Build-Depends-Indep: python-support (>= 1.0.0)
 Standards-Version: 3.9.3
 Homepage: http://code.google.com/p/prettytable/
@@ -20,3 +20,16 @@
  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.
+
+Package: python3-prettytable
+Architecture: all
+Depends: ${python3:Depends}, ${misc:Depends}
+Description: library to represent tabular data in visually appealing ASCII tables (Python3)
+ 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.
+ .
+ This package contains the Python 3 version of prettytable.

Modified: packages/prettytable/trunk/debian/prettytable-example.py
===================================================================
--- packages/prettytable/trunk/debian/prettytable-example.py	2012-05-01 09:02:00 UTC (rev 21467)
+++ packages/prettytable/trunk/debian/prettytable-example.py	2012-05-01 10:51:20 UTC (rev 21468)
@@ -14,7 +14,7 @@
     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
+    print(x)
 
 if __name__ == "__main__":
     main()

Added: packages/prettytable/trunk/debian/python3-prettytable.examples
===================================================================
--- packages/prettytable/trunk/debian/python3-prettytable.examples	                        (rev 0)
+++ packages/prettytable/trunk/debian/python3-prettytable.examples	2012-05-01 10:51:20 UTC (rev 21468)
@@ -0,0 +1 @@
+debian/prettytable-example.py

Modified: packages/prettytable/trunk/debian/rules
===================================================================
--- packages/prettytable/trunk/debian/rules	2012-05-01 09:02:00 UTC (rev 21467)
+++ packages/prettytable/trunk/debian/rules	2012-05-01 10:51:20 UTC (rev 21468)
@@ -2,6 +2,39 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+PY2VERS := $(shell pyversions -s)
+PY3VERS := $(shell py3versions -s)
 
 %:
-	dh $@
+	dh $@ --with python3
+
+override_dh_auto_install:
+	set -e ; \
+	for python in $(PY2VERS); do \
+		$$python setup.py install --no-compile -O0 --install-layout=deb \
+			--root $(CURDIR)/debian/python-prettytable; \
+	done
+
+	# convert to Python 3
+	2to3 -w $(CURDIR)/prettytable.py
+
+	set -e ; \
+	for python in $(PY3VERS); do \
+		$$python setup.py install --no-compile -O0 --install-layout=deb \
+			--root $(CURDIR)/debian/python3-prettytable; \
+	done
+
+	# restore pristine copy after 2to3 run
+	mv $(CURDIR)/prettytable.py.bak $(CURDIR)/prettytable.py
+
+override_dh_auto_clean:
+	set -e ; \
+	for python in $(PY2VERS); do \
+	    $$python setup.py clean -a; \
+	done
+	set -e ; \
+	for python in $(PY3VERS); do \
+	    $$python setup.py clean -a; \
+	done
+	find . -name \*.pyc -exec rm {} \;
+	dh_clean




More information about the Python-modules-commits mailing list