[arch-commits] Commit in python-cherrypy/trunk (2 files)
Thore Bödecker
foxxx0 at archlinux.org
Tue Sep 4 13:29:38 UTC 2018
Date: Tuesday, September 4, 2018 @ 13:29:38
Author: foxxx0
Revision: 376640
upgpkg: python-cherrypy 18.0.0-2
backport some dependency/import fixes
Added:
python-cherrypy/trunk/fix-legacy-contextlib2-import.patch
Modified:
python-cherrypy/trunk/PKGBUILD
-------------------------------------+
PKGBUILD | 18 ++++++++++++++----
fix-legacy-contextlib2-import.patch | 30 ++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-09-04 13:29:20 UTC (rev 376639)
+++ PKGBUILD 2018-09-04 13:29:38 UTC (rev 376640)
@@ -9,7 +9,7 @@
pkgname='python-cherrypy'
_pkgname="${pkgname#python-}"
pkgver=18.0.0
-pkgrel=1
+pkgrel=2
pkgdesc='A pythonic, object-oriented web development framework'
arch=('any')
url='https://cherrypy.org'
@@ -19,11 +19,21 @@
makedepends=('python-setuptools' 'python-setuptools-scm' 'python-six'
'python-cheroot' 'python-portend' 'python-more-itertools' 'python-zc.lockfile')
checkdepends=('python-tox')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/v$pkgver.tar.gz")
-sha512sums=('4c1ace8107a436214372b029ba89417b74c82438d281be648abae9f4aa07cae5d9187c0d2ce212125a16ca8acc09b2b26812cd3319386b4be3aa27548cdfa06b')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/v$pkgver.tar.gz"
+ 'fix-legacy-contextlib2-import.patch')
+sha512sums=('4c1ace8107a436214372b029ba89417b74c82438d281be648abae9f4aa07cae5d9187c0d2ce212125a16ca8acc09b2b26812cd3319386b4be3aa27548cdfa06b'
+ '8cd6910177c4057252c4ad7d049265f2528f808feb81e15e45e1a0f15f8f75f177059fdd98614de8a9e15ba5616f8feb394c06f6eb10bedbd2effac3104d76c7')
prepare() {
- :
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ # apply patch from the source array (should be a pacman feature)
+ local filename
+ for filename in "${source[@]}"; do
+ if [[ "$filename" =~ \.patch$ ]]; then
+ msg2 "Applying patch ${filename##*/}"
+ patch -p1 -N -i "$srcdir/${filename##*/}"
+ fi
+ done
}
build() {
Added: fix-legacy-contextlib2-import.patch
===================================================================
--- fix-legacy-contextlib2-import.patch (rev 0)
+++ fix-legacy-contextlib2-import.patch 2018-09-04 13:29:38 UTC (rev 376640)
@@ -0,0 +1,30 @@
+--- a/cherrypy/lib/sessions.py 2018-09-02 01:11:12.000000000 +0200
++++ b/cherrypy/lib/sessions.py 2018-09-04 15:24:32.137916798 +0200
+@@ -109,7 +109,7 @@ import binascii
+
+ import six
+ from six.moves import cPickle as pickle
+-import contextlib2
++import contextlib
+
+ import zc.lockfile
+
+@@ -572,7 +572,7 @@ class FileSession(Session):
+ def release_lock(self, path=None):
+ """Release the lock on the currently-loaded session data."""
+ self.lock.close()
+- with contextlib2.suppress(FileNotFoundError):
++ with contextlib.suppress(FileNotFoundError):
+ os.remove(self.lock._path)
+ self.locked = False
+
+--- a/setup.py 2018-09-02 01:11:12.000000000 +0200
++++ b/setup.py 2018-09-04 15:24:42.964449629 +0200
+@@ -63,7 +63,6 @@ params = dict(
+ 'portend>=2.1.1',
+ 'more_itertools',
+ 'zc.lockfile',
+- 'contextlib2',
+ ],
+ extras_require={
+ 'docs': [
More information about the arch-commits
mailing list