summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 49beb4c1b43b310cd2bac11ec3b3fc56f82998f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Butui Hu <hot123tea123@gmail.com>

_pkgname=xtcocoapi
pkgname=python-xcocotools
pkgver=1.14.3
pkgrel=5
pkgdesc='Extended COCO-API'
arch=('x86_64')
url='https://github.com/jin-s13/xtcocoapi'
license=('MIT')
depends=(
  glibc
  python-numpy
  python-matplotlib
)
makedepends=(
  cython
  python-build
  python-installer
  python-setuptools
  python-wheel
)
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/jin-s13/xtcocoapi/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('99cd46eaee88ab4eaf7154a8fa0aca7c36aafa96e9cd49b836f338884f24206fdd819dbf23931cbd51fc1aeb8c60ffed28eef77d16cb5095e56f3819643b7b8d')

prepare() {
  sed -i "s/version=get_version()/version='$pkgver'/" "${srcdir}/${_pkgname}-${pkgver}/setup.py"
}

build() {
  cd "${_pkgname}-${pkgver}"
  python -m build --wheel --no-isolation
}

package() {
  cd "${_pkgname}-${pkgver}"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set ts=2 sw=2 et: