[Python-modules-commits] [webpy] 04/07: add Python 3 package

Wolfgang Borgert debacle at moszumanska.debian.org
Mon Aug 21 22:07:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository webpy.

commit d390a38b1079eb11a519d821e4709f9835012bf8
Author: W. Martin Borgert <debacle at debian.org>
Date:   Mon Aug 21 21:09:22 2017 +0200

    add Python 3 package
---
 debian/control                  | 23 +++++++++++++++++++--
 debian/patches/python3fix.patch | 44 +++++++++++++++++++++++++++++++++++++++++
 debian/patches/series           |  1 +
 debian/rules                    |  5 ++---
 4 files changed, 68 insertions(+), 5 deletions(-)

diff --git a/debian/control b/debian/control
index f9a1c6e..89a4327 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: python
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: W. Martin Borgert <debacle at debian.org>
-Build-Depends: debhelper (>= 10), python-all (>= 2.6.6-3~), dh-python
+Build-Depends: debhelper (>= 10), python-all (>= 2.6.6-3~), python-setuptools, python3-all, python3-setuptools, dh-python
 Standards-Version: 4.0.1
 Homepage: http://webpy.org/
 Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/webpy.git
@@ -14,7 +14,7 @@ Architecture: all
 Depends: ${python:Depends}, ${misc:Depends}
 Recommends: python-cheetah, python-flup, python-psycopg2 | python-pysqlite2 | python-pysqlite1.1 | python-sqlite | python-mysqldb | python-kinterbasdb
 Description: Web framework for Python applications
- Webpy offers a clean and well designed API for Python Web applications
+ Webpy offers a clean and well designed API for Python Web applications.
  .
  The philosophy behind webpy is to: "Think about the ideal way to write a web
  app. Write the code to make it happen."
@@ -23,3 +23,22 @@ Description: Web framework for Python applications
   * less code
   * code that ran faster
   * code that is easier to read and maintain.
+ .
+ This package provides the Python 2.x module.
+
+Package: python3-webpy
+Architecture: all
+Depends: ${python3:Depends}, ${misc:Depends}
+Recommends: python3-cheetah, python3-flup, python3-psycopg2 | python3-pysqlite2 | python3-pysqlite1.1 | python3-sqlite | python3-mysqldb | python3-kinterbasdb
+Description: Web framework for Python applications
+ Webpy offers a clean and well designed API for Python Web applications.
+ .
+ The philosophy behind webpy is to: "Think about the ideal way to write a web
+ app. Write the code to make it happen."
+ .
+ Implementations using this library have resulted in:
+  * less code
+  * code that ran faster
+  * code that is easier to read and maintain.
+ .
+ This package provides the Python 3.x module.
diff --git a/debian/patches/python3fix.patch b/debian/patches/python3fix.patch
new file mode 100644
index 0000000..d104009
--- /dev/null
+++ b/debian/patches/python3fix.patch
@@ -0,0 +1,44 @@
+Description: fix Python 3 related syntax errors
+Author: W. Martin Borgert <debacle at debian.org>
+Origin: vendor
+Last-Update: 2017-08-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/web/wsgiserver/wsgiserver2.py
++++ b/web/wsgiserver/wsgiserver2.py
+@@ -1016,7 +1016,7 @@
+             try:
+                 bytes_sent = self.send(data)
+                 data = data[bytes_sent:]
+-            except socket.error, e:
++            except socket.error as e:
+                 if e.args[0] not in socket_errors_nonblocking:
+                     raise
+ 
+@@ -1037,7 +1037,7 @@
+                 data = self._sock.recv(size)
+                 self.bytes_read += len(data)
+                 return data
+-            except socket.error, e:
++            except socket.error as e:
+                 if (e.args[0] not in socket_errors_nonblocking
+                         and e.args[0] not in socket_error_eintr):
+                     raise
+@@ -1932,7 +1932,7 @@
+             af, socktype, proto, canonname, sa = res
+             try:
+                 self.bind(af, socktype, proto)
+-            except socket.error, serr:
++            except socket.error as serr:
+                 msg = "%s -- (%s: %s)" % (msg, sa, serr)
+                 if self.socket:
+                     self.socket.close()
+@@ -2283,7 +2283,7 @@
+         # exc_info tuple."
+         if self.req.sent_headers:
+             try:
+-                raise exc_info[0], exc_info[1], exc_info[2]
++                raise exc_info[0](exc_info[1], exc_info[2])
+             finally:
+                 exc_info = None
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ca39d7d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+python3fix.patch
diff --git a/debian/rules b/debian/rules
index ea3fbe9..6272d1b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,6 @@
 #!/usr/bin/make -f
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export PYBUILD_NAME=webpy
 
 %:
-	dh $@ --with python2
+	dh $@ --buildsystem=pybuild --with python2,python3

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/webpy.git



More information about the Python-modules-commits mailing list