blob: aea759792ec195f6a0c1a7c0b1c4b98cd573e1d2 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Maintainer: Butui Hu <hot123tea123@gmail.com>
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:
|