upgpkg: sbcl 2.2.9-1
[arch-packages.git] / python-beaker / trunk / PKGBUILD
blob0d14687029ec204534ba22c683687cbca95ffa9b
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
3 # Contributor: Massimiliano Torromeo < massimiliano DOT torromeo AT gmail DOT com >
5 pkgname=python-beaker
6 pkgver=1.11.0
7 pkgrel=8
8 arch=('any')
9 license=('custom')
10 pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications"
11 url="http://beaker.groovie.org/"
12 depends=('python')
13 makedepends=('python-setuptools')
14 checkdepends=('python-nose' 'python-mock' 'python-sqlalchemy'
15               'python-pycryptodome' 'python-coverage' 'python-webtest' 'python-redis'
16               'python-pymongo' 'python-pylibmc' 'redis' 'python-cryptography'
17               'python-memcached' 'memcached' 'pifpaf' 'python-mongomock')
18 source=("$pkgname-$pkgver.tar.gz::https://github.com/bbangert/beaker/archive/$pkgver.tar.gz")
19 sha512sums=('0eab9ff40314786e0fb2d31a6b932f355680c193ac5c41de442ee5a3f4d5cf62ae1c30f2948f8e2c89c012bad5e4332a5a72be62c9b1cba0b9f2723afe7e9ae3')
21 prepare() {
22   # Use a fake MongoDB for tests
23   sed -e '/class TestMongoDB/i import mongomock' \
24       -e "s|'mongodb://localhost:27017/beaker_testdb'|mongomock.MongoClient('mongodb://localhost:27017/beaker_testdb')|" \
25       -i beaker-$pkgver/tests/test_managers/test_ext_mongodb.py
27   sed -i "s#/usr/bin/python#/usr/bin/python3#" beaker-$pkgver/beaker/crypto/pbkdf2.py
30 build() {
31   cd "$srcdir"/beaker-$pkgver
32   python3 setup.py build
35 check() {
36   # it_IT.UTF-8 is missing in test env
38   cd "$srcdir"/beaker-$pkgver
39   pifpaf run memcached --port 11211 -- pifpaf run redis python setup.py nosetests || warning "Tests failed"
42 package() {
43   cd beaker-$pkgver
44   python setup.py install --root="$pkgdir" --optimize=1
45   install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/python-beaker/LICENSE