archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-torrentool / trunk / PKGBUILD
blobf48a1068d7770601989c373ebf3570c0ca25949e
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=torrentool
4 pkgname=python-torrentool
5 pkgver=1.1.1
6 pkgrel=4
7 pkgdesc="The tool to work with torrent files"
8 arch=('any')
9 url="https://github.com/idlesign/torrentool"
10 license=('BSD')
11 depends=('python')
12 makedepends=('python-setuptools')
13 checkdepends=('python-pytest' 'python-pytest-datafixtures'
14 'python-pytest-responsemock')
15 optdepends=('python-click: for torrentool')
16 source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
17 sha512sums=('7f884b5bf78d1b43954822574116323a2dddf35cb4cd8135f70aaf56091fa47f36e2cc9b15f8c9e95f8a4e15547956d9ff2efdb41c1270bfbb76b96e31d020ec')
18 b2sums=('d1e434fc99fedf71a7a14f60bacd573f42a4801909bee695a72300a0e95da8b32009e828cbdf312e0e62f03a7a11d183c9bd04e6158eb33dcac4886bab9d40ce')
20 prepare() {
21   mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
24 build() {
25   cd "$pkgname-$pkgver"
26   python setup.py build
29 check() {
30   cd "$pkgname-$pkgver"
31   export PYTHONPATH="build:${PYTHONPATH}"
32   pytest -v
35 package() {
36   cd "$pkgname-$pkgver"
37   python setup.py install --skip-build \
38                           --optimize=1 \
39                           --root="${pkgdir}"
40   install -vDm 644 {AUTHORS,CHANGELOG,README.rst} -t "${pkgdir}/usr/share/doc/${pkgname}"
41   install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"