text: # Maintainer: Butui Hu <hot123tea123@gmail.com>
  # Contributor: peippo <christoph.fink@gmail.com>
  
  pkgname=python-av
  _pkgname=PyAV
  pkgdesc="Pythonic bindings for FFmpeg's libraries"
  url='https://pyav.org'
  pkgver=8.0.2
  pkgrel=1
  arch=("x86_64")
  license=("BSD")
  makedepends=(
    'cython'
    'python-setuptools'
  )
  checkdepends=(
    'python-pytest'
  )
  depends=(
    'ffmpeg'
    'python-numpy'
    'python-pillow'
  )
  source=("${pkgname}-${pkgver}.tar.gz::https://github.com/PyAV-Org/PyAV/archive/v${pkgver}.tar.gz")
  sha512sums=('ae617e1601273c9694e0f320293a826b5ec5820a7d41a84c9dac9a77d64b67a5d47f8963aba29228a66b722274372720e6bb7b731b98a091ae107a9f15058012')
  
  get_pyver() {
    python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
  }
  
  build() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    python setup.py build
  }
  
  check() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-$(get_pyver)" python setup.py test
  }
  
  package() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  
    install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/python-av/LICENSE"
  }
  # vim:set ts=2 sw=2 et:
  
  