summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-beaker/PKGBUILD
blob: fbc3bae33ba45d4c8f4d7b67bf1156de3d1e69f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# $Id$
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Massimiliano Torromeo < massimiliano DOT torromeo AT gmail DOT com >

pkgname=('python2-beaker')
pkgver=1.6.4
pkgrel=2
arch=('any')
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')
source=("http://cheeseshop.python.org/packages/source/B/Beaker/Beaker-${pkgver}.tar.gz")
md5sums=('c2e102870ed4c53104dec48ceadf8e9d')

build() {
    cp -r Beaker-${pkgver} python2-Beaker-${pkgver}

    cd "${srcdir}/Beaker-${pkgver}"
    sed -i "s#/usr/bin/python#/usr/bin/python3#" beaker/crypto/pbkdf2.py
#    python3 setup.py build

    cd "${srcdir}/python2-Beaker-${pkgver}"
    sed -i "s#/usr/bin/python#/usr/bin/python2#" beaker/crypto/pbkdf2.py
    python2 setup.py build
}

#package_python-beaker() {
#    depends=('python')

#    cd "${srcdir}/Beaker-${pkgver}"
#    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}/python2-Beaker-${pkgver}"
    python2 setup.py install --root="${pkgdir}" --optimize=1
    install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python2-beaker/LICENSE"
}