pythonPackages.pillow: 6.2.2 -> 7.1.2
pythonPackages.pillow: drop support for python2.7
- Support for Python 2.7 was removed in Pillow 7.0.0
- https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst#700-2020-01-02
- use test command from travis build configuration
- 1671f6bd71/.ci/test.sh
- add support for jpeg2k, imagequant
This commit is contained in:
parent
f342b667a5
commit
0e5e6b08aa
|
@ -1,32 +1,40 @@
|
||||||
{ stdenv, buildPythonPackage, fetchPypi, isPyPy
|
{ stdenv, buildPythonPackage, fetchPypi, isPyPy
|
||||||
, olefile
|
, olefile
|
||||||
, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
|
, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
|
||||||
, pytestrunner
|
, openjpeg, libimagequant
|
||||||
, pytest
|
, pytest, pytestrunner, pyroma, numpy
|
||||||
|
, isPy3k
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "Pillow";
|
pname = "Pillow";
|
||||||
version = "6.2.2";
|
version = "7.1.2";
|
||||||
|
|
||||||
|
disabled = !isPy3k;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950";
|
sha256 = "1pdh1zzdwxilvsjg6rnl4q810pc2p2y16q6lx9gzzihb25h9kd50";
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = !stdenv.isDarwin && !isPyPy;
|
|
||||||
|
|
||||||
# Disable imagefont tests, because they don't work well with infinality:
|
# Disable imagefont tests, because they don't work well with infinality:
|
||||||
# https://github.com/python-pillow/Pillow/issues/1259
|
# https://github.com/python-pillow/Pillow/issues/1259
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
rm Tests/test_imagefont.py
|
rm Tests/test_imagefont.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
python -m pytest -v -x -W always
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [ olefile ];
|
propagatedBuildInputs = [ olefile ];
|
||||||
|
|
||||||
checkInputs = [ pytest pytestrunner ];
|
checkInputs = [ pytest pytestrunner pyroma numpy ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
freetype libjpeg zlib libtiff libwebp tcl lcms2 ]
|
freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ]
|
||||||
++ stdenv.lib.optionals (isPyPy) [ tk libX11 ];
|
++ stdenv.lib.optionals (isPyPy) [ tk libX11 ];
|
||||||
|
|
||||||
# NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp.
|
# NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp.
|
||||||
|
@ -45,6 +53,8 @@ buildPythonPackage rec {
|
||||||
sed -i "setup.py" \
|
sed -i "setup.py" \
|
||||||
-e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = ${libinclude freetype}|g ;
|
-e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = ${libinclude freetype}|g ;
|
||||||
s|^JPEG_ROOT =.*$|JPEG_ROOT = ${libinclude libjpeg}|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|^ZLIB_ROOT =.*$|ZLIB_ROOT = ${libinclude zlib}|g ;
|
||||||
s|^LCMS_ROOT =.*$|LCMS_ROOT = ${libinclude lcms2}|g ;
|
s|^LCMS_ROOT =.*$|LCMS_ROOT = ${libinclude lcms2}|g ;
|
||||||
s|^TIFF_ROOT =.*$|TIFF_ROOT = ${libinclude libtiff}|g ;
|
s|^TIFF_ROOT =.*$|TIFF_ROOT = ${libinclude libtiff}|g ;
|
||||||
|
|
Loading…
Reference in New Issue