Skip to content

Commit

Permalink
python311Packages.pillow-jpls: init at 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdarwin authored and pull[bot] committed Feb 23, 2024
1 parent 8827566 commit 2018022
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
82 changes: 82 additions & 0 deletions pkgs/development/python-modules/pillow-jpls/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchPypi
, fetchpatch
, pythonOlder
, pytestCheckHook
, cmake
, ninja
, scikit-build-core
, charls
, eigen
, fmt
, numpy
, pillow
, pybind11
, setuptools
, pathspec
, pyproject-metadata
, setuptools_scm
}:

buildPythonPackage rec {
pname = "pillow-jpls";
version = "1.3.2";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchFromGitHub {
owner = "planetmarshall";
repo = "pillow-jpls";
rev = "refs/tags/v${version}";
hash = "sha256-Rc4/S8BrYoLdn7eHDBaoUt1Qy+h0TMAN5ixCAuRmfPU=";
};

postPatch = ''
substituteInPlace pyproject.toml --replace '"conan~=2.0.16",' ""
'';

nativeBuildInputs = [
cmake
ninja
pybind11
scikit-build-core
setuptools
setuptools_scm
];
buildInputs = [
charls
eigen
fmt
];
propagatedBuildInputs = [
numpy
pillow
pathspec
pyproject-metadata
];

pypaBuildFlags = [ "-C" "cmake.args='--preset=sysdeps'" ];
dontUseCmakeConfigure = true;

env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

checkInputs = [
pytestCheckHook
];
# prevent importing from build during test collection:
preCheck = ''rm -rf pillow_jpls'';

pythonImportsCheck = [
"pillow_jpls"
];

meta = with lib; {
description = "A JPEG-LS plugin for the Python Pillow library";
homepage = "https://github.com/planetmarshall/pillow-jpls";
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9307,6 +9307,8 @@ self: super: with self; {

pillow-heif = callPackage ../development/python-modules/pillow-heif { };

pillow-jpls = callPackage ../development/python-modules/pillow-jpls { };

pillow-simd = callPackage ../development/python-modules/pillow-simd {
inherit (pkgs) freetype libjpeg zlib libtiff libwebp tcl lcms2 tk;
inherit (pkgs.xorg) libX11;
Expand Down

0 comments on commit 2018022

Please sign in to comment.