blob: c62dc00603d34f4e959e295c7906793e787996a3 (
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
|
# Maintainer: Bert Peters <bert@bertptrs.nl>
# Contributor: wedjat <wedjat@protonmail.com>
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
pkgname=python-pydicom
pkgver=3.0.0
pkgrel=1
pkgdesc="Pure python package for working with DICOM files"
arch=("any")
url="https://pydicom.github.io/pydicom/stable/index.html"
license=('MIT' 'LicenseRef-GDCM')
depends=('python' 'python-setuptools')
makedepends=('python-wheel' 'python-build' 'python-installer' 'python-flit-core')
optdepends=('python-numpy: for working with pixel data'
'python-pillow: for working with compressed image data'
'gdcm: for working with compressed JPEG, JPEG-LS and JPEG 2000 images'
'python-pylibjpeg: for working with compressed JPEG images'
'python-pylibjpeg-openjpeg: for working with compressed JPEG-LS or JPEG 2000 images'
'python-pylibjpeg-rle: for working with compressed RLE images'
)
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://github.com/pydicom/pydicom/archive/v$pkgver.tar.gz")
sha256sums=('0d21b27ea0110190725ee7cf2ddc29de633e230518b6f859025c1bb063df1b21')
build()
{
cd "$srcdir/pydicom-$pkgver"
python -m build --wheel --no-isolation
}
package()
{
cd "$srcdir/pydicom-$pkgver"
python -m installer --destdir="$pkgdir"/ dist/*.whl
install -D "$srcdir/pydicom-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
check()
{
cd "$srcdir/pydicom-$pkgver"
# Create a venv because software needs to be installed to run tests
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
# Skipped tests: have almost correct assertions on exception message
test-env/bin/python -m pytest -v -k "not test_deepcopy_bufferedreader_raises and not test_no_decoders_raises"
}
|