NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.48k stars 12.98k forks source link

Should python3Packages.imutils support opencv4? #74914

Open mtrsk opened 4 years ago

mtrsk commented 4 years ago

Describe the bug Looking at the current derivation of imutils it seems opecv's version is set to 3. This makes some code break if you're working on a opencv4 project, since it'll fall back to version 3.

To Reproduce Steps to reproduce the behavior:

  1. Add imutils to an existing opencv4 project,

Given the following shell.nix:

{ pkgs ? import <nixpkgs> {} }:

let
  python = pkgs.python37Packages;

  pythonPkgs = with python; [
    opencv4
  ];

  systemPkgs = with pkgs; [
    opencv4
  ];
in
pkgs.mkShell {
  name = "py-env";
  buildInputs = systemPkgs ++ pythonPkgs;
}

Verify that's running openc4:

$ python
Python 3.7.5 (default, Oct 14 2019, 23:08:55) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.1.2'

Now add imutils to pythonPkgs:

>>> import cv2
>>> cv2.__version__
'3.4.8'

Expected behavior The correct version of opencv should be picked.

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.1, NixOS, 20.03pre203904.bb1013511e1 (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.1`
 - channels(root): `"nixos-20.03pre203904.bb1013511e1"`
 - channels(usul): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: nixos.python37Packages.imutils
# a list of nixos modules affected by the problem
module:
stale[bot] commented 4 years ago

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net.