blob: 52fa3eb6c031a33ee779faf9a79ed128db459729 (
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.4.0
pkgrel=1
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}-${pkgver}::git+https://github.com/pydicom/pylibjpeg-openjpeg.git#tag=v${pkgver}")
sha512sums=('96421f61789f180b30e00d6d96f62ea4b8c894ee6b0334b0733191830aa2e7f38a05444b7bd05a9e1a3064577b2bb2cbb65215d20663afea864c41c5081bcfc9')
prepare() {
cd "${pkgname}-${pkgver}"
git submodule update --init --recursive
}
build() {
cd "${pkgname}-${pkgver}"
poetry build --format wheel
}
package() {
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
cd "${pkgname}-${pkgver}"
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:
|