summaryrefslogtreecommitdiff
path: root/python-platformdirs/PKGBUILD
blob: 394eea69bbf6cddef2fcd7caaab417e296c798bb (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 (Arch): Felix Yan <felixonmars@archlinux.org>
# Contributor (Arch): Tobias Roettger <toroettg@gmail.com>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>
# Contributor: rachad

pkgbase=python-platformdirs
pkgname=('python-platformdirs' 'tauthon-platformdirs')
pkgver=2.2.0
pkgrel=2
pkgdesc='A small module for determining appropriate platform-specific dirs, e.g. a "user data dir"'
arch=('any')
url='https://github.com/platformdirs/platformdirs'
license=('Expat')
makedepends=('python-setuptools' 'tauthon-setuptools')
source=("https://pypi.io/packages/source/p/platformdirs/platformdirs-$pkgver.tar.gz")
sha512sums=('9822b7602aad04a0f5e8540a470c4e935ac6cd975b4f12c919f0ccba8395d7516764c764dea043e47e6f4e79d21afe049aa7f1ea57a9c9f67c83ed4decb82a67')

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

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

  cd "$srcdir"/platformdirs-$pkgver-py2
  tauthon setup.py build
}

package_python-platformdirs() {
  pkgdesc+=" (for Python)"
  depends=('python')

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

package_tauthon-platformdirs() {
  pkgdesc+=" (for Tauthon)"
  depends=('tauthon')

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