# Maintainer: Butui Hu pkgname=python-lvis-git _pkgname=lvis _pkgver=0.5.3 pkgver=0.5.3.r24.7d7f07d pkgrel=2 pkgdesc='Python API for LVIS Dataset' arch=('any') url='https://github.com/lvis-dataset/lvis-api' license=('BSD-3-Clause') depends=( python-opencv python-cycler python-dateutil python-kiwisolver python-matplotlib python-numpy python-pyparsing python-pycocotools python-six ) makedepends=( cython git python-build python-installer python-pip python-setuptools python-wheel ) checkdepends=( hdf5 qt5-base ) provides=(python-lvis) conflicts=(python-lvis) source=("${_pkgname}::git+https://github.com/lvis-dataset/lvis-api.git") sha512sums=('SKIP') prepare() { # fix https://github.com/lvis-dataset/lvis-api/issues/37 sed -i "s,np.float,float,g" "${_pkgname}/lvis/eval.py" } pkgver() { cd "${_pkgname}" printf "%s.r%s.%s" "${_pkgver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } build() { cd "${_pkgname}" python -m build --wheel --no-isolation } check() { cd "${_pkgname}" python test.py } package() { cd "${_pkgname}" python -m installer --destdir="${pkgdir}" dist/*.whl install -Dm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" } # vim:set ts=2 sw=2 et: