# Maintainer: Manuel "UtG" # Contributor: Neo Kolokotronis pkgbase=python-beaker pkgname=('python3-beaker' 'python2-beaker') pkgver=1.8.0 pkgrel=1 arch=('x86_64') license=('custom') pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications." url="http://beaker.groovie.org/" makedepends=('python2-setuptools' 'python3-setuptools') source=("git+https://github.com/bbangert/beaker.git#tag=$pkgver") md5sums=('SKIP') prepare() { cp -a beaker{,-py2} sed -i "s#/usr/bin/python#/usr/bin/python3#" beaker/beaker/crypto/pbkdf2.py sed -i "s#/usr/bin/python#/usr/bin/python2#" beaker-py2/beaker/crypto/pbkdf2.py } build() { cd "${srcdir}/beaker" python3 setup.py build cd "${srcdir}/beaker-py2" python2 setup.py build } package_python3-beaker() { depends=('python3') cd "${srcdir}/beaker" python3 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python-beaker/LICENSE" } package_python2-beaker() { depends=('python2') cd "${srcdir}/beaker-py2" python2 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python2-beaker/LICENSE" }