blob: 93fac2af92f6f7e18aaa5c89c942bcaef9ff7cb4 (
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
|
# Maintainer: Butui Hu <hot123tea123@gmail.com>
_pkgname=pylibjpeg-openjpeg
pkgname=python-pylibjpeg-openjpeg
pkgver=2.2.1
pkgrel=2
pkgdesc='A J2K and JP2 plugin for pylibjpeg'
arch=('x86_64')
url='https://github.com/pydicom/pylibjpeg-openjpeg'
license=(MIT)
depends=(
python-numpy
)
makedepends=(
cmake
git
poetry
python-installer
)
source=("${pkgname}::git+https://github.com/pydicom/pylibjpeg-openjpeg.git#tag=v${pkgver}")
sha512sums=('c2356f42f96c822309daaf8ed275dac2c4f7e4794155f47fd886f8b666ced0819adaf7f385e87d6b3d60bcea532aa1ea86cf34fa0258e11cace9153973e3950b')
prepare() {
cd "${pkgname}"
git submodule update --init --recursive
}
build() {
cd "${pkgname}"
poetry build --format wheel
}
package() {
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
cd "${pkgname}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
# remove tests files
rm -rf "${pkgdir}${site_packages}/openjpeg/tests"
}
# vim:set ts=2 sw=2 et:
|