summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bf3b87f4ba973f81a440ab4158f790d760e49679 (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
# Maintainer: Mubashshir <ahmubashshir@gmail.com>
# from: pypi
# what: combomethod

_name=combomethod
pkgname=( python-$_name python2-$_name)
pkgbase=python-$_name
pkgver=1.0.12
pkgrel=7
pkgdesc='Decorator indicating a method is both a class and an instance method'

arch=(any)
url=https://web.archive.org/web/*/https://bitbucket.org/jeunice/combomethod
license=(Apache)
depends=()

makedepends=(python-setuptools python2-setuptools)
source=("$pkgbase-$pkgver.zip::https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.zip")
sha256sums=('4975b436ffe3e0a2561b58e3e9d047a50f4b16c8d4956d6a3e6ce566d034dd5e')

prepare() {
    # copy folder, so we can cleanly build for both python versions
    cp -rup $_name-$pkgver $_name-$pkgver-py2
}

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

package_python-combomethod()
{
    depends=( python )
    cd "$srcdir/$_name-$pkgver"
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

package_python2-combomethod()
{
    depends=( python2 )
    cd "$srcdir/$_name-$pkgver-py2"
    python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}