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

Marks all buildInputs from python3Packages.pillow as unused #84

Open
SuperSandro2000 opened this issue Mar 3, 2021 · 2 comments
Open

Comments

@SuperSandro2000
Copy link
Contributor

SuperSandro2000 commented Mar 3, 2021

Evaluation breaks if those packages are removed. Tested on master.

�[1mWhen evaluating attribute ‘python3Packages.pillow’:�[0m
�[1;33mwarning: attribute-ordering�[0m
The lists of dependencies, including the attribute “propagatedBuildInputs” should preferably come before attributes for overriding default phases’ “postPatch” attribute in the expression.

Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/generic.nix:16:3:
   |
16 |   postPatch = ''
   |   ^
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/generic.nix:31:3:
   |
31 |   propagatedBuildInputs = [ olefile ];
   |   ^
See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/attribute-ordering.md
�[1;33mwarning: attribute-ordering�[0m
The lists of dependencies, including the attribute “buildInputs” should preferably come before lists of dependencies’ “checkInputs” attribute in the expression.

Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/generic.nix:33:3:
   |
33 |   checkInputs = [ pytestCheckHook pyroma numpy ];
   |   ^
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/generic.nix:35:3:
   |
35 |   buildInputs = [ freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ]
   |   ^
See: https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/attribute-ordering.md
�[1;33mwarning: unused-argument�[0m
Unused argument: `stdenv`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:1:8:
  |
1 | { lib, stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k
  |        ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `buildPythonPackage`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:1:16:
  |
1 | { lib, stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k
  |                ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `isPyPy`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:1:47:
  |
1 | { lib, stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k
  |                                               ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `olefile`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:3:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |   ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `freetype`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:12:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |            ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `libjpeg`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:22:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |                      ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `zlib`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:31:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |                               ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `libtiff`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:37:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |                                     ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `libwebp`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:46:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |                                              ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `tcl`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:55:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |                                                       ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `lcms2`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:60:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |                                                            ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `tk`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:67:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |                                                                   ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `libX11`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:2:71:
  |
2 | , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
  |                                                                       ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `libxcb`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:3:3:
  |
3 | , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
  |   ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `openjpeg`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:3:11:
  |
3 | , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
  |           ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `libimagequant`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:3:21:
  |
3 | , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
  |                     ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `pyroma`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:3:36:
  |
3 | , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
  |                                    ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `numpy`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:3:44:
  |
3 | , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
  |                                            ^
�[1;33mwarning: unused-argument�[0m
Unused argument: `pytestCheckHook`.
Near /home/hotpi/src/nixpkgs2/pkgs/development/python-modules/pillow/default.nix:3:51:
  |
3 | , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
  |                                                   ^

You have uninstalled pretty_errors but it is still present in your python startup.  Please remove its section from file:
 /home/hotpi/.local/lib/python3.8/site-packages/usercustomize.py

@rmcgibbo
Copy link
Collaborator

rmcgibbo commented Mar 3, 2021

I see. Here's the expression:

{ lib, stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k
, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11
, libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook
}@args:

import ./generic.nix (rec {
  pname = "Pillow";
  version = "8.0.1";

  disabled = !isPy3k;

  src = fetchPypi {
    inherit pname version;
    sha256 = "11c5c6e9b02c9dac08af04f093eb5a2f84857df70a7d4a6a6ad461aca803fb9e";
  };

  meta = with lib; {
    homepage = "https://python-pillow.org/";
    description = "The friendly PIL fork (Python Imaging Library)";
    longDescription = ''                                                                                                                          
      The Python Imaging Library (PIL) adds image processing                                                                                      
      capabilities to your Python interpreter.  This library                                                                                      
      supports many file formats, and provides powerful image                                                                                     
      processing and graphics capabilities.                                                                                                       
    '';
    license = "http://www.pythonware.com/products/pil/license.htm";
    maintainers = with maintainers; [ goibhniu prikhi SuperSandro2000 ];
  };
} // args )

That //args at the end of the expression is quite devious.

@jtojnar
Copy link
Owner

jtojnar commented Mar 3, 2021

Oh, right. callPackage uses builtins.functionArgs to determine what to pass. I guess we will have to consider all functions with @ operator as covered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants