upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-whichcraft / trunk / PKGBUILD
blob699dd87a06f58cee46546a838d2c971e0d15ae80
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=whichcraft
4 pkgname=python-whichcraft
5 pkgver=0.6.1
6 pkgrel=6
7 pkgdesc="This package provides cross-platform cross-python shutil.which functionality"
8 arch=('any')
9 url="https://github.com/cookiecutter/whichcraft"
10 license=('BSD')
11 depends=('python')
12 makedepends=('python-setuptools')
13 checkdepends=('python-pytest')
14 source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
15 sha512sums=('85075289ae5cacb8f45a23776fcbbef3f62a4d8bdf110e1d3f9f25fb4ba44117c459d5f42dec7fd7f5c9680963d6aa1c1e31fc5b9fbe6127395698468f8d77fb')
17 prepare() {
18   mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
21 build() {
22   cd "$pkgname-$pkgver"
23   python setup.py build
26 check() {
27   cd "$pkgname-$pkgver"
28   export PYTHONPATH="build:${PYTHONPATH}"
29   pytest -v
32 package() {
33   cd "$pkgname-$pkgver"
34   python setup.py install --skip-build \
35     --optimize=1 \
36     --prefix=/usr \
37     --root="${pkgdir}"
38   install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
39   install -vDm 644 {AUTHORS,CONTRIBUTING,HISTORY,README}.rst \
40     -t "${pkgdir}/usr/share/doc/${pkgname}"