pkgs/development/python-modules: stdenv.lib -> lib

This commit is contained in:
Pavol Rusnak
2021-01-24 01:29:22 +01:00
parent 2f34b4b883
commit a4bbfba80d
211 changed files with 525 additions and 546 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ buildPythonPackage rec {
checkPhase = ''
runHook preCheck
python -m pytest -v -x -W always${stdenv.lib.optionalString stdenv.isDarwin " --deselect=Tests/test_file_icns.py::TestFileIcns::test_save --deselect=Tests/test_imagegrab.py::TestImageGrab::test_grab"}
python -m pytest -v -x -W always${lib.optionalString stdenv.isDarwin " --deselect=Tests/test_file_icns.py::TestFileIcns::test_save --deselect=Tests/test_imagegrab.py::TestImageGrab::test_grab"}
runHook postCheck
'';
@@ -32,7 +32,7 @@ buildPythonPackage rec {
buildInputs = [
freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ]
++ stdenv.lib.optionals (isPyPy) [ tk libX11 ];
++ lib.optionals (isPyPy) [ tk libX11 ];
# NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp.
# NOTE: The Pillow install script will, by default, add paths like /usr/lib
@@ -61,7 +61,7 @@ buildPythonPackage rec {
export CFLAGS="-I${libwebp}/include"
''
# Remove impurities
+ stdenv.lib.optionalString stdenv.isDarwin ''
+ lib.optionalString stdenv.isDarwin ''
substituteInPlace setup.py \
--replace '"/Library/Frameworks",' "" \
--replace '"/System/Library/Frameworks"' ""
@@ -24,7 +24,7 @@ buildPythonPackage rec {
'';
# Disable darwin tests which require executables: `iconutil` and `screencapture`
disabledTests = stdenv.lib.optionals stdenv.isDarwin [ "test_save" "test_grab" "test_grabclipboard" ];
disabledTests = lib.optionals stdenv.isDarwin [ "test_save" "test_grab" "test_grabclipboard" ];
propagatedBuildInputs = [ olefile ];
@@ -32,7 +32,7 @@ buildPythonPackage rec {
buildInputs = [
freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ]
++ stdenv.lib.optionals (isPyPy) [ tk libX11 ];
++ lib.optionals (isPyPy) [ tk libX11 ];
# NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp.
# NOTE: The Pillow install script will, by default, add paths like /usr/lib
@@ -61,7 +61,7 @@ buildPythonPackage rec {
export CFLAGS="-I${libwebp}/include"
''
# Remove impurities
+ stdenv.lib.optionalString stdenv.isDarwin ''
+ lib.optionalString stdenv.isDarwin ''
substituteInPlace setup.py \
--replace '"/Library/Frameworks",' "" \
--replace '"/System/Library/Frameworks"' ""