Skip to content

Commit 3d0dc1f

Browse files
authored
Better define the install requirements (#35)
1 parent b0da768 commit 3d0dc1f

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

libjpeg/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re
44

55

6-
__version__ = '1.3.0'
6+
__version__ = '1.3.1'
77

88

99
VERSION_PATTERN = r"""

libjpeg/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
import enum
23
from math import ceil
34
from pathlib import Path
45
import warnings
@@ -123,7 +124,7 @@ def decode(stream, colour_transform=0, reshape=True):
123124
)
124125

125126

126-
def decode_pixel_data(arr, ds=None, **kwargs):
127+
def decode_pixel_data(arr, ds = None, **kwargs):
127128
"""Return the decoded JPEG data from `arr` as a :class:`numpy.ndarray`.
128129
129130
Intended for use with *pydicom* ``Dataset`` objects.
@@ -133,12 +134,13 @@ def decode_pixel_data(arr, ds=None, **kwargs):
133134
arr : numpy.ndarray or bytes
134135
A 1D array of ``np.uint8``, or a Python :class:`bytes` object
135136
containing the encoded JPEG image.
136-
ds : pydicom.dataset.Dataset
137+
ds : pydicom.dataset.Dataset, optional
137138
A :class:`~pydicom.dataset.Dataset` containing the group ``0x0028``
138139
elements corresponding to the *Pixel Data*. Must contain a
139140
(0028,0004) *Photometric Interpretation* element with the colour
140141
space of the pixel data, one of ``'MONOCHROME1'``, ``'MONOCHROME2'``,
141142
``'RGB'``, ``'YBR_FULL'``, ``'YBR_FULL_422'``.
143+
**kwargs
142144
143145
Returns
144146
-------

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
cython
2-
numpy>=1.16.0
1+
numpy>=1.20.0; python_version == '3.7'
2+
numpy>=1.22.0; python_version >= '3.8'

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ def get_source_files():
179179
include_package_data = True,
180180
zip_safe = False,
181181
python_requires = ">=3.7",
182-
install_requires = ["numpy>=1.20.0"],
182+
install_requires = [
183+
"numpy >= 1.20; python_version == '3.7'",
184+
"numpy >= 1.22; python_version >= '3.8'",
185+
],
183186
ext_modules = extensions,
184187
# Plugin registrations
185188
entry_points={

0 commit comments

Comments
 (0)