summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-anytree/PKGBUILD
blob: 1e863931c46eaa2421a19eced32eb8a9e11713a6 (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
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgbase=python-anytree
pkgname=(python-anytree python2-anytree)
pkgver=2.4.3
pkgrel=2
pkgdesc="Powerful and Lightweight Python Tree Data Structure"
url="https://anytree.readthedocs.io/"
arch=(any)
license=(Apache)
makedepends=(python{,2}-{six,setuptools} git)
_commit=bf6c5134a5257a05b2ed38b91b9f7846add08065  # tags/2.4.3
source=("$pkgbase::git+https://github.com/c0fec0de/anytree#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgbase
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cp -a $pkgbase python2
  cp -a $pkgbase python3
}

build() {
  cd python3
  python3 setup.py build

  cd ../python2
  python2 setup.py build
}

package_python-anytree() {
  depends=(python-six)

  cd python3
  python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

package_python2-anytree() {
  depends=(python2-six)

  cd python2
  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}