blob: 070294ca1be11d2a8c30fa01e73e31cd73cb43db (
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
|
# Maintainer: Butui Hu <hot123tea123@gmail.com>
_pkgname=mmsegmentation
pkgname=python-mmsegmentation
pkgver=1.2.2
pkgrel=2
epoch=1
pkgdesc='OpenMMLab Semantic Segmentation Toolbox and Benchmark'
arch=('any')
url='https://github.com/open-mmlab/mmsegmentation'
license=('Apache-2.0')
depends=(
python-matplotlib
python-mmengine
python-mmpretrain
python-mmcv
python-numpy
python-opencv
python-pillow
python-prettytable
python-pytorch
python-scipy
)
makedepends=(
python-build
python-installer
python-setuptools
python-wheel
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/open-mmlab/mmsegmentation/archive/v${pkgver}.tar.gz")
sha512sums=('5a026fbd90a0b2632340aee611b439f116a5875fb3b7f86fb1612a6deea5bfcdda9bbb58e053c825cbe8338470bb773e6b8839ea03e518aa117a80941b0266c0')
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python -m build --wheel --no-isolation
}
package() {
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
cd "${_pkgname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
# remove unused .mim and tests dir
rm -rfv "${pkgdir}${site_packages}/mmseg/.mim"
rm -rfv "${pkgdir}${site_packages}/tests"
}
# vim:set ts=2 sw=2 et:
|