[Python-modules-commits] r25789 - in packages/cherrypy3/trunk/debian (5 files)

xnox at users.alioth.debian.org xnox at users.alioth.debian.org
Sun Sep 8 19:52:59 UTC 2013


    Date: Sunday, September 8, 2013 @ 19:52:38
  Author: xnox
Revision: 25789

* Team upload
* Add python3 package (Closes: #714403)

Added:
  packages/cherrypy3/trunk/debian/patches/02_compat.diff
Modified:
  packages/cherrypy3/trunk/debian/changelog
  packages/cherrypy3/trunk/debian/control
  packages/cherrypy3/trunk/debian/patches/series
  packages/cherrypy3/trunk/debian/rules

Modified: packages/cherrypy3/trunk/debian/changelog
===================================================================
--- packages/cherrypy3/trunk/debian/changelog	2013-09-08 15:01:38 UTC (rev 25788)
+++ packages/cherrypy3/trunk/debian/changelog	2013-09-08 19:52:38 UTC (rev 25789)
@@ -1,11 +1,16 @@
 cherrypy3 (3.2.2-3) UNRELEASED; urgency=low
 
+  [ Jakub Wilk ]
   * Use canonical URIs for Vcs-* fields.
   * Drop obsolete Conflicts with python2.3-cherrypy and python2.4-cherrypy.
   * Fix a typo in README.Debian.
 
- -- Jakub Wilk <jwilk at debian.org>  Wed, 12 Jun 2013 13:11:12 +0200
+  [ Dmitrijs Ledkovs ]
+  * Team upload
+  * Add python3 package (Closes: #714403)
 
+ -- Dmitrijs Ledkovs <xnox at debian.org>  Mon, 22 Jul 2013 23:18:25 +0100
+
 cherrypy3 (3.2.2-2) unstable; urgency=low
 
   * Team upload.

Modified: packages/cherrypy3/trunk/debian/control
===================================================================
--- packages/cherrypy3/trunk/debian/control	2013-09-08 15:01:38 UTC (rev 25788)
+++ packages/cherrypy3/trunk/debian/control	2013-09-08 19:52:38 UTC (rev 25789)
@@ -3,11 +3,12 @@
 Priority: optional
 Maintainer: Gustavo Noronha Silva <kov at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 7.0.0), quilt, python-setuptools (>= 0.6a9), python-all (>= 2.6.6-3~), help2man, python-nose
+Build-Depends: debhelper (>= 9), python-setuptools (>= 0.6a9), python-all (>= 2.6.6-3~), help2man, python-nose, python3-all, python3-nose, python3-setuptools, dh-python
 Build-Depends-Indep: python-epydoc
 Standards-Version: 3.8.4
 Homepage: http://www.cherrypy.org/
 X-Python-Version: >= 2.3
+X-Python3-Version: >= 3.2
 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/cherrypy3/trunk/
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/cherrypy3/trunk/
 
@@ -34,3 +35,25 @@
  .
  This version is backwards incompatible with the 2.2 version in some
  ways. See http://www.cherrypy.org/wiki/UpgradeTo30.
+
+Package: python3-cherrypy3
+Architecture: all
+Depends: ${python3:Depends}, ${misc:Depends}
+Description: Python 3 web development framework - version 3
+ CherryPy is a pythonic, object-oriented web development framework. It
+ provides the foundation over which complex web-based applications can
+ be written, with little or no knowledge of the underlying
+ protocols. CherryPy allows developers to build web applications in
+ much the same way they would build any other object-oriented Python
+ program. This usually results in smaller source code developed in
+ less time.
+ .
+ CherryPy is up-to-date with the latest developments on using Python
+ for web development: it features a bundled WSGI server, and is able
+ to integrate with other dispatching mechanisms, such as
+ Routes. CherryPy can be run as a standalone application, since it
+ provides its own HTTP server; setting it up behind another HTTP
+ server, such as Apache, or even with mod_python are also options.
+ .
+ This version is backwards incompatible with the 2.2 version in some
+ ways. See http://www.cherrypy.org/wiki/UpgradeTo30.

Added: packages/cherrypy3/trunk/debian/patches/02_compat.diff
===================================================================
--- packages/cherrypy3/trunk/debian/patches/02_compat.diff	                        (rev 0)
+++ packages/cherrypy3/trunk/debian/patches/02_compat.diff	2013-09-08 19:52:38 UTC (rev 25789)
@@ -0,0 +1,50 @@
+# HG changeset patch
+# User Jason R. Coombs <jaraco at jaraco.com>
+# Date 1349660887 14400
+# Branch cherrypy-3.2.x
+# Node ID 01b6adcb3849b2ff4fa31e3298b494f6b136369e
+# Parent  9820107d4ffb8058fd507888f90e28c695f6b4c0
+Timer class was renamed from _Timer to Timer in Python 3.3. This change adds a compatibility shim to detect this change and reference the base class accordingly. Fixes #1163.
+
+diff --git a/cherrypy/_cpcompat.py b/cherrypy/_cpcompat.py
+--- a/cherrypy/_cpcompat.py
++++ b/cherrypy/_cpcompat.py
+@@ -18,6 +18,7 @@
+ import os
+ import re
+ import sys
++import threading
+ 
+ if sys.version_info >= (3, 0):
+     py3k = True
+@@ -325,3 +326,9 @@
+     # Python 2
+     def next(i):
+         return i.next()
++
++if sys.version_info >= (3,3):
++    Timer = threading.Timer
++else:
++    # Python 3.2 and earlier
++    Timer = threading._Timer
+diff --git a/cherrypy/process/plugins.py b/cherrypy/process/plugins.py
+--- a/cherrypy/process/plugins.py
++++ b/cherrypy/process/plugins.py
+@@ -7,7 +7,7 @@
+ import time
+ import threading
+ 
+-from cherrypy._cpcompat import basestring, get_daemon, get_thread_ident, ntob, set
++from cherrypy._cpcompat import basestring, get_daemon, get_thread_ident, ntob, set, Timer
+ 
+ # _module__file__base is used by Autoreload to make
+ # absolute any filenames retrieved from sys.modules which are not
+@@ -421,7 +421,7 @@
+             pass
+ 
+ 
+-class PerpetualTimer(threading._Timer):
++class PerpetualTimer(Timer):
+     """A responsive subclass of threading._Timer whose run() method repeats.
+ 
+     Use this timer only when you really need a very interruptible timer;

Modified: packages/cherrypy3/trunk/debian/patches/series
===================================================================
--- packages/cherrypy3/trunk/debian/patches/series	2013-09-08 15:01:38 UTC (rev 25788)
+++ packages/cherrypy3/trunk/debian/patches/series	2013-09-08 19:52:38 UTC (rev 25789)
@@ -1,2 +1,3 @@
 00_supress_profiler_warning.diff
 01_cherryd_location_fix.diff
+02_compat.diff

Modified: packages/cherrypy3/trunk/debian/rules
===================================================================
--- packages/cherrypy3/trunk/debian/rules	2013-09-08 15:01:38 UTC (rev 25788)
+++ packages/cherrypy3/trunk/debian/rules	2013-09-08 19:52:38 UTC (rev 25789)
@@ -1,47 +1,33 @@
 #!/usr/bin/make -f
 
-include /usr/share/quilt/quilt.make
+export PYBUILD_DESTDIR_python2=debian/python-cherrypy3/
+export PYBUILD_DESTDIR_python3=debian/python3-cherrypy3/
+export PYBUILD_BEFORE_TEST=cp cherrypy/cherryd {build_dir}/cherrypy
 
-PY_DEFAULT = $(strip $(shell pyversions -d))
-UPSTREAM_VERSION=$(shell dpkg-parsechangelog --format dpkg | grep ^Version | cut -d ' ' -f 2 | cut -d '-' -f 1)
+include /usr/share/dpkg/default.mk
 
-clean: unpatch
-	dh clean --with=python2
+%:
+	dh $@ --buildsystem pybuild --with python2,python3
+
+override_dh_clean:
 	-rm -rf api
 	-rm -rf CherryPy.egg-info/
 	-rm -f debian/cherryd.1
+	dh_clean
 
-build: $(QUILT_STAMPFN)
-	PYTHONPATH=. help2man -n cherryd -s 1 -o debian/cherryd.1 --version-string=$(UPSTREAM_VERSION)  ./cherrypy/cherryd
+override_dh_auto_build:
+	PYTHONPATH=. help2man -n cherryd -s 1 -o debian/cherryd.1 --version-string=$(DEB_VERSION_UPSTREAM)  ./cherrypy/cherryd
 	env PYTHONPATH=`pwd` epydoc --name CherryPy3 --url http://www.cherrypy.org/ -o api cherrypy
-	dh build --with=python2
+	dh_auto_build --buildsystem pybuild
 
+#Testsuite hangs and wasn't run before
+override_dh_auto_test:
 
-install: build
-	dh install --with=python2 --before dh_python2
+override_dh_install:
+	find debian/python*-cherrypy3/ -name LICENSE.txt -exec rm {} \;
+	dh_install
+	# Make python 2&3 cherrypy3 co-installable
+	mv debian/python3-cherrypy3/usr/bin/cherryd debian/python3-cherrypy3/usr/bin/cherryd3
 
-	# the 'daemonization' helper should be made available properly
-	mv debian/python-cherrypy3/usr/lib/$(PY_DEFAULT)/*/cherrypy/cherryd \
-		debian/python-cherrypy3/usr/sbin/
-	chmod a+x debian/python-cherrypy3/usr/sbin/cherryd
-	rm -f debian/python-cherrypy3/usr/lib/*/*/cherrypy/cherryd
-
-	# no additional licensing files wanted =)
-	find debian/python-cherrypy3/ -name LICENSE.txt -exec rm {} \;
-
-	dh install --remaining --with=python2
-
-
-binary-indep: build install
-	dh binary-indep --before dh_compress --with=python2
-	dh_compress -X.py -X.pdf --with=python2
-	dh binary-indep --remaining --with=python2
-
-
-binary-arch: build install
-
-
-binary: build binary-indep binary-arch
-
-
-.PHONY: build clean install binary-indep binary-arch binary
+override_dh_compress:
+	dh_compress -X.py -X.pdf




More information about the Python-modules-commits mailing list