summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-appdirs/PKGBUILD
blob: 2b6a71c4878053944fe56d4821fd35508288d0e3 (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
52
53
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Tobias Roettger <toroettg@gmail.com>

pkgbase=python-appdirs
pkgname=(python-appdirs python2-appdirs)
pkgver=1.4.3
pkgrel=2
pkgdesc='A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".'
arch=('any')
url="https://github.com/ActiveState/appdirs"
license=('MIT')
makedepends=('python-setuptools' 'python2-setuptools')
source=("https://pypi.io/packages/source/a/appdirs/appdirs-$pkgver.tar.gz")
md5sums=('44c679904082a2133f5566c8a0d3ab42')

prepare() {
  cp -a appdirs-$pkgver{,-py2}
}

build() {
  cd "$srcdir"/appdirs-$pkgver
  python setup.py build

  cd "$srcdir"/appdirs-$pkgver-py2
  python2 setup.py build
}

check() {
  cd "$srcdir"/appdirs-$pkgver
  python setup.py test

  cd "$srcdir"/appdirs-$pkgver-py2
  python2 setup.py test
}

package_python-appdirs() {
  depends=('python')

  cd appdirs-$pkgver
  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}

package_python2-appdirs() {
  depends=('python2')

  cd appdirs-$pkgver-py2
  python2 setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}

# vim:set ts=2 sw=2 et: