desktop/python-appdirs/PKGBUILD
2017-10-27 00:01:37 +02:00

42 lines
1.2 KiB
Bash

# Arch contribution https://www.archlinux.org/packages/community/any/python2-appdirs/
pkgbase=python-appdirs
pkgname=('python3-appdirs' 'python2-appdirs')
pkgver=1.4.3
pkgrel=1
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=('python3-setuptools' 'python2-setuptools')
source=("https://pypi.python.org/packages/source/a/appdirs/appdirs-$pkgver.tar.gz")
sha512sums=('964db6c9f830c9b23d78f0230c5f574f214f08faf3fd24f10ccc941d23e38de66186461d754f7effb94aa0553c25df4843c9ff5dcd375c992c322550b3d98cce')
prepare() {
cp -a appdirs-$pkgver{,-py2}
}
check() {
cd "$srcdir/appdirs-$pkgver"
python setup.py test
cd "$srcdir/appdirs-$pkgver-py2"
python2 setup.py test
}
package_python3-appdirs() {
depends=('python')
cd "$srcdir/appdirs-$pkgver"
python3 setup.py install --root="$pkgdir/" --optimize=1
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}
package_python2-appdirs() {
depends=('python2')
cd "$srcdir/appdirs-$pkgver-py2"
python2 setup.py install --root="$pkgdir/" --optimize=1
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}