1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Merge pull request #332722 from dotlambda/python3Packages.pyturbojpeg

python312Packages.pyturbojpeg: 1.7.3 -> 1.7.5
This commit is contained in:
Robert Schütz 2024-08-06 12:55:13 -07:00 committed by GitHub
commit 553cf48d77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@
lib,
stdenv,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
libjpeg_turbo,
setuptools,
numpy,
@ -12,13 +12,14 @@
buildPythonPackage rec {
pname = "pyturbojpeg";
version = "1.7.3";
version = "1.7.5";
pyproject = true;
src = fetchPypi {
pname = "PyTurboJPEG";
inherit version;
hash = "sha256-edSOOrU0YVKP+4AJxCCYnQh6iewxVFTM1QmU88mukis=";
src = fetchFromGitHub {
owner = "lilohuang";
repo = "PyTurboJPEG";
rev = "refs/tags/v${version}";
hash = "sha256-HML56qnv//fSeXBcQC+nED/CNqUY9p8Hwrmd0EGCzx0=";
};
patches = [
@ -28,18 +29,23 @@ buildPythonPackage rec {
})
];
nativeBuildInputs = [ setuptools ];
build-system = [ setuptools ];
propagatedBuildInputs = [ numpy ];
dependencies = [ numpy ];
# upstream has no tests, but we want to test whether the library is found
checkPhase = ''
runHook preCheck
${python.interpreter} -c 'from turbojpeg import TurboJPEG; TurboJPEG()'
runHook postCheck
'';
pythonImportsCheck = [ "turbojpeg" ];
meta = with lib; {
changelog = "https://github.com/lilohuang/PyTurboJPEG/releases/tag/v${version}";
description = "Python wrapper of libjpeg-turbo for decoding and encoding JPEG image";
homepage = "https://github.com/lilohuang/PyTurboJPEG";
license = licenses.mit;