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

python311Packages.opencv4 does not install type stubs #292395

Closed
carschandler opened this issue Feb 29, 2024 · 0 comments · Fixed by #317546
Closed

python311Packages.opencv4 does not install type stubs #292395

carschandler opened this issue Feb 29, 2024 · 0 comments · Fixed by #317546
Labels
0.kind: bug Something is broken

Comments

@carschandler
Copy link

Describe the bug

A clear and concise description of what the bug is.

OpenCV started including Python type stubs (.pyi files) in version 4.8.0, which allow Python LSPs to provide completion and documentation for the package. When installing via nixpkgs, these are not included in the install.

This is all on nixpkgs-unstable via a devshell flake.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install python3.withPackages pypkgs: [ pypkgs.opencv4 ]
  2. Open an editor with an LSP installed and observe lack of completion
  3. Inspect site-packages directory; no .pyi files installed for OpenCV.

Expected behavior

Type stubs are installed.

Additional context

It appears type stub generation occurs here:
https://github.com/opencv/opencv/blob/5e5a035c5bddbd0190f6cec8e9db90363f402799/modules/python/src2/typing_stubs_generation/generation.py#L132

Notify maintainers

@basvandijk
@SomeoneSerge

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.133.1-microsoft-standard-WSL2, NixOS, 24.05 (Uakari), 24.05.20240205.faf912b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.11, nixos-wsl"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a 👍 reaction to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant