Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.pillow: 6.2.1 -> 7.1.2 #77714

Merged
merged 3 commits into from Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkgs/development/python-modules/batchgenerators/default.nix
Expand Up @@ -2,6 +2,7 @@
, buildPythonPackage
, isPy27
, fetchFromGitHub
, fetchpatch
, pytest
, unittest2
, future
Expand All @@ -27,6 +28,13 @@ buildPythonPackage rec {

};

patches = [
(fetchpatch {
url = "https://github.com/MIC-DKFZ/batchgenerators/pull/59.patch";
sha256 = "171b3dm40yn0wi91m9s2nq3j565s1w39jpdf1mvc03rn75i8vdp0";
})
];

propagatedBuildInputs = [
future numpy pillow scipy scikitlearn scikitimage threadpoolctl
];
Expand Down
Expand Up @@ -4,6 +4,7 @@
, django
, python
, pillow
, python_magic
}:

buildPythonPackage rec {
Expand All @@ -14,7 +15,7 @@ buildPythonPackage rec {
inherit pname version;
sha256 = "8322ee9d7bf5ffa5360990320d2cc2efc7017feff35422636d49f625721edf82";
};
propagatedBuildInputs = [ pillow ];
propagatedBuildInputs = [ pillow python_magic ];

checkInputs = [ django ];

Expand Down
26 changes: 18 additions & 8 deletions pkgs/development/python-modules/pillow/default.nix
@@ -1,32 +1,40 @@
{ stdenv, buildPythonPackage, fetchPypi, isPyPy
, olefile
, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
, pytestrunner
, pytest
, openjpeg, libimagequant
, pytest, pytestrunner, pyroma, numpy
, isPy3k
}:
evanjs marked this conversation as resolved.
Show resolved Hide resolved

buildPythonPackage rec {
pname = "Pillow";
version = "6.2.2";
version = "7.1.2";

disabled = !isPy3k;

src = fetchPypi {
inherit pname version;
sha256 = "db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950";
sha256 = "1pdh1zzdwxilvsjg6rnl4q810pc2p2y16q6lx9gzzihb25h9kd50";
};

doCheck = !stdenv.isDarwin && !isPyPy;

# Disable imagefont tests, because they don't work well with infinality:
# https://github.com/python-pillow/Pillow/issues/1259
postPatch = ''
rm Tests/test_imagefont.py
'';

checkPhase = ''
runHook preCheck
python -m pytest -v -x -W always
runHook postCheck
'';

propagatedBuildInputs = [ olefile ];

checkInputs = [ pytest pytestrunner ];
checkInputs = [ pytest pytestrunner pyroma numpy ];

buildInputs = [
freetype libjpeg zlib libtiff libwebp tcl lcms2 ]
freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ]
++ stdenv.lib.optionals (isPyPy) [ tk libX11 ];

# NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp.
Expand All @@ -45,6 +53,8 @@ buildPythonPackage rec {
sed -i "setup.py" \
-e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = ${libinclude freetype}|g ;
s|^JPEG_ROOT =.*$|JPEG_ROOT = ${libinclude libjpeg}|g ;
s|^JPEG2K_ROOT =.*$|JPEG2K_ROOT = ${libinclude openjpeg}|g ;
s|^IMAGEQUANT_ROOT =.*$|IMAGEQUANT_ROOT = ${libinclude' libimagequant}|g ;
s|^ZLIB_ROOT =.*$|ZLIB_ROOT = ${libinclude zlib}|g ;
s|^LCMS_ROOT =.*$|LCMS_ROOT = ${libinclude lcms2}|g ;
s|^TIFF_ROOT =.*$|TIFF_ROOT = ${libinclude libtiff}|g ;
Expand Down