blob: 9e58aa1f53c3147c92c1db86784e3038979c9158 (
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
pkgname=python-pylibjpeg
pkgver=2.0.1
pkgrel=1
pkgdesc='A Python framework for decoding JPEG images, with a focus on supporting pydicom'
arch=(any)
url='https://github.com/pydicom/pylibjpeg'
license=(MIT)
depends=(
python-numpy
)
makedepends=(
python-build
python-flit-core
python-installer
python-wheel
)
optdepends=(
python-pylibjpeg-libjpeg
python-pylibjpeg-openjpeg
python-pylibjpeg-rle
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/pydicom/pylibjpeg/archive/v${pkgver}.tar.gz")
sha512sums=('cf3ae7d4f22cfd492b6a37974dd340bf917d8f49a487e72ca4d7d4774d6727d7a96691bfcd492746af29ade3c2870bc61238c445920d1952df338c5f1f061969')
build() {
cd "${_pkgname}-${pkgver}"
python -m build --wheel --no-isolation
}
package() {
cd "${_pkgname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 "LICENCE.txt" -t "${pkgdir}/usr/share/licenses/${pkgname}"
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
rm -rf "${pkgdir}${site_packages}/pylibjpeg/tests"
rm -rf "${pkgdir}${site_packages}/pylibjpeg/tools/tests"
}
# vim:set ts=2 sw=2 et:
|