[arch-commits] Commit in python-cherrypy/repos (3 files)

Jelle van der Waa jelle at nymeria.archlinux.org
Mon Mar 17 07:38:40 UTC 2014


    Date: Monday, March 17, 2014 @ 08:38:39
  Author: jelle
Revision: 107355

archrelease: copy trunk to community-staging-any

Added:
  python-cherrypy/repos/community-staging-any/
  python-cherrypy/repos/community-staging-any/PKGBUILD
    (from rev 107354, python-cherrypy/trunk/PKGBUILD)
  python-cherrypy/repos/community-staging-any/cherrypy-python33.patch
    (from rev 107354, python-cherrypy/trunk/cherrypy-python33.patch)

-------------------------+
 PKGBUILD                |   64 ++++++++++++++++++++++++++++++++++++++++++++++
 cherrypy-python33.patch |   50 +++++++++++++++++++++++++++++++++++
 2 files changed, 114 insertions(+)

Copied: python-cherrypy/repos/community-staging-any/PKGBUILD (from rev 107354, python-cherrypy/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2014-03-17 07:38:39 UTC (rev 107355)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Angel Velasquez <angvp at archlinux.org> 
+# Contributor: Kaiting Chen <kaitocracy at gmail.com>
+# Contributor: Douglas Soares de Andrade <dsa at aur.archlinux.org>
+# Contributor: Armando M. Baratti <amblistas at ajato.com.br>
+# Contributor: Florian Richter <Florian_Richter at gmx.de>
+pkgname=('python-cherrypy' 'python2-cherrypy')
+pkgver=3.2.5
+pkgrel=2
+pkgdesc="A pythonic, object-oriented web development framework"
+arch=('any')
+url="http://www.cherrypy.org"
+license=('BSD')
+makedepends=('python' 'python2')
+source=("https://pypi.python.org/packages/source/C/CherryPy/CherryPy-${pkgver}.tar.gz")
+md5sums=('bb130fbd5b6fa38d4e9f5c5597ea9800')
+
+build() {
+  cp -r CherryPy-${pkgver} CherryPy2-${pkgver}
+
+  cd CherryPy-${pkgver}
+  python ./setup.py build
+
+  cd "${srcdir}/CherryPy2-${pkgver}"
+  sed \
+    -e 's_#! /usr/bin/env python_&2_' \
+    -i cherrypy/cherryd
+  sed \
+    -e 's_#!/usr/bin/python_&2_' \
+    -i cherrypy/test/sessiondemo.py
+  python2 ./setup.py build
+
+}
+
+package_python-cherrypy() {
+  depends=('python')
+
+  cd CherryPy-${pkgver}
+
+  python ./setup.py install --root="${pkgdir}" --optimize=1
+
+  install -Dm644 cherrypy/LICENSE.txt \
+    "${pkgdir}/usr/share/licenses/python-cherrypy/LICENSE.txt"
+}
+
+package_python2-cherrypy() {
+  depends=('python2')
+
+  cd CherryPy2-${pkgver}
+
+  python2 ./setup.py install --root="${pkgdir}" --optimize=1
+  mv "${pkgdir}/usr/bin/cherryd" "${pkgdir}/usr/bin/cherryd2"
+
+  install -Dm644 cherrypy/LICENSE.txt \
+    "${pkgdir}/usr/share/licenses/python2-cherrypy/LICENSE.txt"
+}
+
+check() {
+  cd CherryPy2-${pkgver}
+  python2 ./setup.py check
+
+  cd ../CherryPy-${pkgver}
+  python3 ./setup.py check
+}

Copied: python-cherrypy/repos/community-staging-any/cherrypy-python33.patch (from rev 107354, python-cherrypy/trunk/cherrypy-python33.patch)
===================================================================
--- community-staging-any/cherrypy-python33.patch	                        (rev 0)
+++ community-staging-any/cherrypy-python33.patch	2014-03-17 07:38:39 UTC (rev 107355)
@@ -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 -r 9820107d4ffb8058fd507888f90e28c695f6b4c0 -r 01b6adcb3849b2ff4fa31e3298b494f6b136369e cherrypy/_cpcompat.py
+--- a/cherrypy/_cpcompat.py	Wed Oct 03 08:02:12 2012 -0400
++++ b/cherrypy/_cpcompat.py	Sun Oct 07 21:48:07 2012 -0400
+@@ -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 -r 9820107d4ffb8058fd507888f90e28c695f6b4c0 -r 01b6adcb3849b2ff4fa31e3298b494f6b136369e cherrypy/process/plugins.py
+--- a/cherrypy/process/plugins.py	Wed Oct 03 08:02:12 2012 -0400
++++ b/cherrypy/process/plugins.py	Sun Oct 07 21:48:07 2012 -0400
+@@ -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;




More information about the arch-commits mailing list