r2500 - in python-tz/trunk/debian (changelog control rules test-pytz)

arnau at users.alioth.debian.org arnau at users.alioth.debian.org
Fri Oct 21 07:05:25 UTC 2011


    Date: Friday, October 21, 2011 @ 07:05:23
  Author: arnau
Revision: 2500

Add Python3 support. Thanks to Stefano Rivera (Closes: #641506)

Modified:
  python-tz/trunk/debian/changelog
  python-tz/trunk/debian/control
  python-tz/trunk/debian/rules
  python-tz/trunk/debian/test-pytz

Modified: python-tz/trunk/debian/changelog
===================================================================
--- python-tz/trunk/debian/changelog	2011-10-21 06:29:34 UTC (rev 2499)
+++ python-tz/trunk/debian/changelog	2011-10-21 07:05:23 UTC (rev 2500)
@@ -8,6 +8,7 @@
   * debian/patches/tzdata:
     - update following new upstream release.
     - Add missing patch for tzfile.py. Thanks to Matt Giuca (Closes: #579704)
+  * Add Python3 support. Thanks to Stefano Rivera (Closes: #641506)
 
   [ Gediminas Paulauskas ]
   * Switch to dh_python2 (Closes: #617041):

Modified: python-tz/trunk/debian/control
===================================================================
--- python-tz/trunk/debian/control	2011-10-21 06:29:34 UTC (rev 2499)
+++ python-tz/trunk/debian/control	2011-10-21 07:05:23 UTC (rev 2500)
@@ -2,11 +2,17 @@
 Section: python
 Priority: optional
 Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers at lists.alioth.debian.org>
-Uploaders: Brian Sutherland <brian at vanguardistas.net>, Fabio Tranchitella <kobold at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), python-setuptools
+Uploaders: Brian Sutherland <brian at vanguardistas.net>,
+           Fabio Tranchitella <kobold at debian.org>
+Build-Depends: debhelper (>= 7.0.50~),
+               python-all (>= 2.6.6-3~),
+               python3-all,
+               python-setuptools,
+               python3-setuptools
 Standards-Version: 3.9.2
 Homepage: http://pypi.python.org/pypi/pytz/
 X-Python-Version: >= 2.4
+X-Python3-Version: >= 3.1
 Vcs-Svn: svn://svn.debian.org/svn/pkg-zope/python-tz/trunk
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-zope/python-tz/trunk
 
@@ -19,3 +25,15 @@
  It also solves the issue of ambiguous times at the end of daylight savings,
  which you can read more about in the Python Library Reference
  (datetime.tzinfo).
+
+Package: python3-tz
+Architecture: all
+Depends: tzdata, ${python3:Depends}, ${misc:Depends}
+Description: Python3 version of the Olson timezone database
+ python-tz brings the Olson tz database into Python. This library allows
+ accurate and cross platform timezone calculations using Python 2.3 or higher.
+ It also solves the issue of ambiguous times at the end of daylight savings,
+ which you can read more about in the Python Library Reference
+ (datetime.tzinfo).
+ .
+ This package contains the Python 3 version of the library.

Modified: python-tz/trunk/debian/rules
===================================================================
--- python-tz/trunk/debian/rules	2011-10-21 06:29:34 UTC (rev 2499)
+++ python-tz/trunk/debian/rules	2011-10-21 07:05:23 UTC (rev 2500)
@@ -1,11 +1,40 @@
 #!/usr/bin/make -f
 
+PACKAGE=python-tz
+PACKAGE_PYTHON3=python3-tz
+
+PYVERS:=$(shell pyversions -r)
+PY3VERS:=$(shell py3versions -r)
+
 %:
-	dh --with python2 $@
+	dh --with python2 --with python3 $@
 
+override_dh_auto_build:
+	dh_auto_build -p$(PACKAGE)
+
+	set -e; \
+	for python in $(PY3VERS); do \
+		$$python setup.py build; \
+	done
+
+override_dh_auto_install:
+	dh_auto_install -p$(PACKAGE) --destdir=$(CURDIR)/debian/$(PACKAGE)
+
+	set -ex; \
+	for python in $(PY3VERS); do \
+		$$python setup.py install --install-layout=deb \
+			--root=$(CURDIR)/debian/$(PACKAGE_PYTHON3); \
+	done
+
+override_dh_clean:
+	dh_clean
+	rm -rf build
+
 override_dh_install:
 	dh_install
+
 	# install our testing package
 	install -D debian/test-pytz debian/python-tz/usr/lib/python-tz/test-pytz.py
+
 	# remove zoneinfo, our patch to pytz makes it use the one from tzdata
-	rm -rf debian/python-tz/usr/lib/python*/*-packages/pytz/zoneinfo
+	rm -rf debian/python*-tz/usr/lib/python*/*-packages/pytz/zoneinfo

Modified: python-tz/trunk/debian/test-pytz
===================================================================
--- python-tz/trunk/debian/test-pytz	2011-10-21 06:29:34 UTC (rev 2499)
+++ python-tz/trunk/debian/test-pytz	2011-10-21 07:05:23 UTC (rev 2500)
@@ -13,5 +13,5 @@
     tests += mod_tests
 
 if not errors:
-    print "Ran %s tests successfully." % tests
+    print("Ran %s tests successfully." % tests)
 sys.exit(errors)




More information about the pkg-zope-developers mailing list