archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-krb5 / repos / community-x86_64 / PKGBUILD
blob4f1894e904c1acb62aafd4a70062ec7287be9e7e
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 _pkg=krb5
4 pkgname=python-${_pkg}
5 pkgver=0.5.0
6 pkgrel=2
7 pkgdesc="krb5 API interface"
8 arch=(x86_64)
9 url="https://github.com/jborean93/pykrb5"
10 license=(MIT)
11 depends=(python krb5)
12 makedepends=(cython python-setuptools)
13 checkdepends=(python-pytest python-k5test)
14 # No tests in pypi tarball
15 #source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
16 source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
17 sha256sums=('9660773e64a205e59c61272ee7783b58f4617129e23a7c313b4e2210bf98f823')
19 build() {
20   cd py${_pkg}-${pkgver}
21   python setup.py build
24 check() {
25   cd py${_pkg}-${pkgver}
26   local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
27   PYTHONPATH="${PWD}"/build/lib.linux-$CARCH-cpython-${python_version/./} pytest -vv --color=yes
30 package() {
31   cd py${_pkg}-${pkgver}
32   python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
33   install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}