croc: 10.1.1 -> 10.1.3 (#364662)
[NixPkgs.git] / pkgs / development / python-modules / pillow-jpls / default.nix
bloba55d6d6740e6d9efa35cf6b5b92e8e27c7bc92c4
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   pytestCheckHook,
7   cmake,
8   ninja,
9   scikit-build-core,
10   charls,
11   eigen,
12   fmt,
13   numpy,
14   pillow,
15   pybind11,
16   setuptools,
17   pathspec,
18   pyproject-metadata,
19   setuptools-scm,
22 buildPythonPackage rec {
23   pname = "pillow-jpls";
24   version = "1.3.2";
25   pyproject = true;
27   disabled = pythonOlder "3.7";
29   src = fetchFromGitHub {
30     owner = "planetmarshall";
31     repo = "pillow-jpls";
32     rev = "refs/tags/v${version}";
33     hash = "sha256-Rc4/S8BrYoLdn7eHDBaoUt1Qy+h0TMAN5ixCAuRmfPU=";
34   };
36   env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
38   dontUseCmakeConfigure = true;
40   postPatch = ''
41     substituteInPlace pyproject.toml \
42       --replace-fail '"conan~=2.0.16",' "" \
43       --replace-fail '"pybind11~=2.11.1",' '"pybind11",'
44   '';
46   build-system = [
47     cmake
48     ninja
49     pybind11
50     scikit-build-core
51     setuptools
52     setuptools-scm
53   ];
55   buildInputs = [
56     charls
57     eigen
58     fmt
59   ];
61   dependencies = [
62     numpy
63     pillow
64     pathspec
65     pyproject-metadata
66   ];
68   pypaBuildFlags = [
69     "-C"
70     "cmake.args=--preset=sysdeps"
71   ];
73   nativeCheckInputs = [ pytestCheckHook ];
75   # Prevent importing from build during test collection:
76   preCheck = ''rm -rf pillow_jpls'';
78   pythonImportsCheck = [ "pillow_jpls" ];
80   meta = with lib; {
81     description = "JPEG-LS plugin for the Python Pillow library";
82     homepage = "https://github.com/planetmarshall/pillow-jpls";
83     changelog = "https://github.com/planetmarshall/pillow-jpls/releases/tag/v${version}";
84     license = licenses.bsd3;
85     maintainers = with maintainers; [ bcdarwin ];
86   };