mirror of
https://github.com/bertptrs/aur.git
synced 2025-12-25 20:40:32 +01:00
upgpkg: python-pydicom 2.4.4-1
upstream release Implement patch from https://github.com/pydicom/pydicom/pull/1908 to deal with newer Pillow version in arch repos
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
pkgbase = python-pydicom
|
pkgbase = python-pydicom
|
||||||
pkgdesc = Pure python package for working with DICOM files
|
pkgdesc = Pure python package for working with DICOM files
|
||||||
pkgver = 2.4.3
|
pkgver = 2.4.4
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://pydicom.github.io/pydicom/stable/index.html
|
url = https://pydicom.github.io/pydicom/stable/index.html
|
||||||
arch = any
|
arch = any
|
||||||
@@ -15,7 +15,9 @@ pkgbase = python-pydicom
|
|||||||
optdepends = python-pylibjpeg: for working with compressed JPEG images
|
optdepends = python-pylibjpeg: for working with compressed JPEG images
|
||||||
optdepends = python-pylibjpeg-openjpeg: for working with compressed JPEG-LS or JPEG 2000 images
|
optdepends = python-pylibjpeg-openjpeg: for working with compressed JPEG-LS or JPEG 2000 images
|
||||||
optdepends = python-pylibjpeg-rle: for working with compressed RLE images
|
optdepends = python-pylibjpeg-rle: for working with compressed RLE images
|
||||||
source = python-pydicom-2.4.3.tar.gz::https://github.com/pydicom/pydicom/archive/v2.4.3.tar.gz
|
source = python-pydicom-2.4.4.tar.gz::https://github.com/pydicom/pydicom/archive/v2.4.4.tar.gz
|
||||||
md5sums = 699086918b267894f303d101b833406a
|
source = pillow-10.1.patch
|
||||||
|
md5sums = 748bfd7ad12373675c9df4e088f38dd1
|
||||||
|
md5sums = 837949b3e4505c3fee9c43e8d5665251
|
||||||
|
|
||||||
pkgname = python-pydicom
|
pkgname = python-pydicom
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Contributor: wedjat <wedjat@protonmail.com>
|
# Contributor: wedjat <wedjat@protonmail.com>
|
||||||
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
|
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
|
||||||
pkgname=python-pydicom
|
pkgname=python-pydicom
|
||||||
pkgver=2.4.3
|
pkgver=2.4.4
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Pure python package for working with DICOM files"
|
pkgdesc="Pure python package for working with DICOM files"
|
||||||
arch=("any")
|
arch=("any")
|
||||||
@@ -18,8 +18,18 @@ optdepends=('python-numpy: for working with pixel data'
|
|||||||
'python-pylibjpeg-rle: for working with compressed RLE images'
|
'python-pylibjpeg-rle: for working with compressed RLE images'
|
||||||
)
|
)
|
||||||
checkdepends=('python-pytest')
|
checkdepends=('python-pytest')
|
||||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/pydicom/pydicom/archive/v$pkgver.tar.gz")
|
source=(
|
||||||
md5sums=('699086918b267894f303d101b833406a')
|
"$pkgname-$pkgver.tar.gz::https://github.com/pydicom/pydicom/archive/v$pkgver.tar.gz"
|
||||||
|
"pillow-10.1.patch"
|
||||||
|
)
|
||||||
|
md5sums=('748bfd7ad12373675c9df4e088f38dd1'
|
||||||
|
'837949b3e4505c3fee9c43e8d5665251')
|
||||||
|
|
||||||
|
prepare()
|
||||||
|
{
|
||||||
|
cd "$srcdir/pydicom-$pkgver"
|
||||||
|
patch --forward --strip=1 --input="$srcdir/pillow-10.1.patch"
|
||||||
|
}
|
||||||
|
|
||||||
build()
|
build()
|
||||||
{
|
{
|
||||||
|
|||||||
16
python-pydicom/pillow-10.1.patch
Normal file
16
python-pydicom/pillow-10.1.patch
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/pydicom/pixel_data_handlers/pillow_handler.py b/pydicom/pixel_data_handlers/pillow_handler.py
|
||||||
|
index ff781025d..adcab9c80 100644
|
||||||
|
--- a/pydicom/pixel_data_handlers/pillow_handler.py
|
||||||
|
+++ b/pydicom/pixel_data_handlers/pillow_handler.py
|
||||||
|
@@ -129,7 +129,10 @@ def _decompress_single_frame(
|
||||||
|
image.tile[0][2],
|
||||||
|
(color_mode, ''),
|
||||||
|
)]
|
||||||
|
- image.mode = color_mode
|
||||||
|
+ if hasattr(image, "_mode"):
|
||||||
|
+ image._mode = color_mode
|
||||||
|
+ else:
|
||||||
|
+ image.mode = color_mode
|
||||||
|
image.rawmode = color_mode
|
||||||
|
return image
|
||||||
|
|
||||||
Reference in New Issue
Block a user