summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5d2c5e18b436c2f126e42339bdbc38a9b51e26e1 (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
43
44
45
46
47
48
49
50
51
# Maintainer: asm0dey <pavel.finkelshtein+AUR@gmail.com>

pkgbase="python-prompt_toolkit-2"
pkgname=("python-prompt_toolkit-2" "python2-prompt_toolkit-2")
pkgver=2.0.9
pkgrel=3
pkgdesc="Library for building powerful interactive command line applications in Python"
url="https://github.com/jonathanslenders/python-prompt-toolkit"
arch=(any)
license=('BSD')
makedepends=('python-distribute')
source=($pkgname-$pkgver.tar.gz::https://github.com/jonathanslenders/python-prompt-toolkit/archive/$pkgver.tar.gz)
md5sums=('2d9887a39780f85099ec8f117a2e1801')

prepare() {
    cp -a "${srcdir}/python-prompt-toolkit-${pkgver}" "${srcdir}/python2-prompt-toolkit-${pkgver}"
}

build() {
    cd "${srcdir}/python-prompt-toolkit-${pkgver}"
    python setup.py build
    cd "${srcdir}/python2-prompt-toolkit-${pkgver}"
    python2 setup.py build
}

package_python-prompt_toolkit-2() {
    depends=(
        'python'
        'python-six>=1.9.0'
        'python-wcwidth'
    )
    provides=('python-prompt_toolkit')
    conflicts=('python-prompt_toolkit')
    cd "${srcdir}/python-prompt-toolkit-${pkgver}"
    python setup.py install --skip-build --root="${pkgdir}" --optimize=1
    install -D --mode 644 --target-directory "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}

package_python2-prompt_toolkit-2() {
    depends=(
        'python2'
        'python-six>=1.9.0'
        'python2-setuptools'
        'python2-wcwidth'
    )
    provides=('python2-prompt_toolkit')
    conflicts=('python2-prompt_toolkit')
    cd "${srcdir}/python2-prompt-toolkit-${pkgver}"
    python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1
    install -D --mode 644 --target-directory "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}