1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pytestCheckHook,
7 flit-core,
8 setuptools,
9 numpy,
10 pydicom,
11 pylibjpeg-data,
12 pylibjpeg-libjpeg,
13}:
14
15buildPythonPackage rec {
16 pname = "pylibjpeg";
17 version = "2.0.1";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "pydicom";
24 repo = "pylibjpeg";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-MA1A/hTIx95MYZ2LGOifnHn77wbv0ydAgQSzNZRykVg=";
27 };
28
29 build-system = [ flit-core ];
30
31 dependencies = [ numpy ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 pydicom
36 pylibjpeg-data
37 pylibjpeg-libjpeg
38 ];
39
40 pythonImportsCheck = [ "pylibjpeg" ];
41
42 meta = with lib; {
43 description = "Python framework for decoding JPEG images, with a focus on supporting Pydicom";
44 homepage = "https://github.com/pydicom/pylibjpeg";
45 changelog = "https://github.com/pydicom/pylibjpeg/releases/tag/v${version}";
46 license = licenses.mit;
47 maintainers = with maintainers; [ bcdarwin ];
48 };
49}