Merge pull request #312713 from fabaff/pillow-jpls-fix
python312Packages.pillow-jpls: refactor
This commit is contained in:
@@ -1,21 +1,22 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, cmake
|
||||
, ninja
|
||||
, scikit-build-core
|
||||
, charls
|
||||
, eigen
|
||||
, fmt
|
||||
, numpy
|
||||
, pillow
|
||||
, pybind11
|
||||
, setuptools
|
||||
, pathspec
|
||||
, pyproject-metadata
|
||||
, setuptools-scm
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
pytestCheckHook,
|
||||
cmake,
|
||||
ninja,
|
||||
scikit-build-core,
|
||||
charls,
|
||||
eigen,
|
||||
fmt,
|
||||
numpy,
|
||||
pillow,
|
||||
pybind11,
|
||||
setuptools,
|
||||
pathspec,
|
||||
pyproject-metadata,
|
||||
setuptools-scm,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -32,11 +33,17 @@ buildPythonPackage rec {
|
||||
hash = "sha256-Rc4/S8BrYoLdn7eHDBaoUt1Qy+h0TMAN5ixCAuRmfPU=";
|
||||
};
|
||||
|
||||
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml --replace '"conan~=2.0.16",' ""
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail '"conan~=2.0.16",' "" \
|
||||
--replace-fail '"pybind11~=2.11.1",' '"pybind11",'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
cmake
|
||||
ninja
|
||||
pybind11
|
||||
@@ -44,36 +51,36 @@ buildPythonPackage rec {
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
charls
|
||||
eigen
|
||||
fmt
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
|
||||
dependencies = [
|
||||
numpy
|
||||
pillow
|
||||
pathspec
|
||||
pyproject-metadata
|
||||
];
|
||||
|
||||
pypaBuildFlags = [ "-C" "cmake.args='--preset=sysdeps'" ];
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
pypaBuildFlags = [
|
||||
"-C"
|
||||
"cmake.args='--preset=sysdeps'"
|
||||
];
|
||||
# prevent importing from build during test collection:
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
# Prevent importing from build during test collection:
|
||||
preCheck = ''rm -rf pillow_jpls'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"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";
|
||||
changelog = "https://github.com/planetmarshall/pillow-jpls/releases/tag/v${version}";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ bcdarwin ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user