# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>

pkgname=python-oslo-i18n
pkgver=6.6.0
pkgrel=1
pkgdesc="Oslo i18n library"
arch=('any')
url="https://pypi.python.org/pypi/oslo.i18n/$pkgver"
license=('Apache-2.0')
depends=('python-pbr')
makedepends=('git' 'python-build' 'python-installer')
checkdepends=('python-stestr' 'python-oslotest' 'python-testscenarios' 'python-oslo-config')
source=("git+https://github.com/openstack/oslo.i18n.git#tag=$pkgver"
        "fix-tests-extra-warning.patch")
sha512sums=('0a05c3d0d0ff23b2f82465b0039ed8381a7bf0c497c0f10f02563ef1a1b7169ff9ac0d0d2f21ea0a585bdc80da582383716181a192cf0c4069e3934f2335382f'
            '445b03985fafef0e4db856afe54772bb8b23b328f0a0166277c5aba9e899e2c6596737c45c11f0581fa3093853048134eac1c894227e88be463a4d0affe849e8')

prepare() {
  cd oslo.i18n
  patch -Np1 -i ../fix-tests-extra-warning.patch
}

build() {
  cd oslo.i18n
  python -m build -nw
}

check() {
  cd oslo.i18n
  stestr run
}

package() {
  cd oslo.i18n
  python -m installer --destdir "$pkgdir" dist/*.whl
}

# vim:set ts=2 sw=2 et:
