# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-oslo-serialization
pkgver=5.4.0
_commit=548c7a3fd5db17a64d2e8a1dacc58b23060d7062
pkgrel=2
pkgdesc="Oslo Serialization library"
arch=('any')
url="https://docs.openstack.org/developer/oslo.serialization"
license=('Apache')
depends=('python-pbr' 'python-msgpack' 'python-oslo-utils')
makedepends=('git' 'python-setuptools')
checkdepends=('python-stestr' 'python-oslotest' 'python-oslo-i18n')
source=("git+https://github.com/openstack/oslo.serialization.git#commit=$_commit")
sha512sums=('SKIP')

prepare() {
  cd oslo.serialization
  # We have system tzdata
  sed -i '/tzdata/d' requirements.txt
}

build() {
  cd oslo.serialization
  python setup.py build
}

check() {
  cd oslo.serialization
  stestr run
}

package() {
  cd oslo.serialization
  python setup.py install --root="$pkgdir/" --optimize=1
}

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