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 >
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/"
13 makedepends=('python-setuptools')
14 checkdepends=('python-pytest' '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=('d7ef5070f036ca7ea100c348df58aa98edad0ee8e361c0a600485b6e1de301f3381ecc782dcbc4b1b2735a4b54e8aff7fd516a7c9d655d2c10517e358ffe031c')
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
32 python3 setup.py build
37 # it_IT.UTF-8 is missing in test env
38 pifpaf run memcached --port 11211 -- pifpaf run redis -- \
39 pytest --deselect tests/test_cookie_expires.py::test_cookie_expires_different_locale
44 python setup.py install --root="$pkgdir" --optimize=1
45 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/python-beaker/