Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pillow-jpls / default.nix
blob6f5b77c50e4c2b9487e8024cfc179aabd5fa4a5f
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
5 , pytestCheckHook
6 , cmake
7 , ninja
8 , scikit-build-core
9 , charls
10 , eigen
11 , fmt
12 , numpy
13 , pillow
14 , pybind11
15 , setuptools
16 , pathspec
17 , pyproject-metadata
18 , setuptools-scm
21 buildPythonPackage rec {
22   pname = "pillow-jpls";
23   version = "1.3.2";
24   pyproject = true;
26   disabled = pythonOlder "3.7";
28   src = fetchFromGitHub {
29     owner = "planetmarshall";
30     repo = "pillow-jpls";
31     rev = "refs/tags/v${version}";
32     hash = "sha256-Rc4/S8BrYoLdn7eHDBaoUt1Qy+h0TMAN5ixCAuRmfPU=";
33   };
35   postPatch = ''
36     substituteInPlace pyproject.toml --replace '"conan~=2.0.16",' ""
37   '';
39   nativeBuildInputs = [
40     cmake
41     ninja
42     pybind11
43     scikit-build-core
44     setuptools
45     setuptools-scm
46   ];
47   buildInputs = [
48     charls
49     eigen
50     fmt
51   ];
52   propagatedBuildInputs = [
53     numpy
54     pillow
55     pathspec
56     pyproject-metadata
57   ];
59   pypaBuildFlags = [ "-C" "cmake.args='--preset=sysdeps'" ];
60   dontUseCmakeConfigure = true;
62   env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
64   checkInputs = [
65     pytestCheckHook
66   ];
67   # prevent importing from build during test collection:
68   preCheck = ''rm -rf pillow_jpls'';
70   pythonImportsCheck = [
71     "pillow_jpls"
72   ];
74   meta = with lib; {
75     description = "A JPEG-LS plugin for the Python Pillow library";
76     homepage = "https://github.com/planetmarshall/pillow-jpls";
77     license = licenses.bsd3;
78     maintainers = with maintainers; [ bcdarwin ];
79   };