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

python3Packages.opencv should also export the wrapper packages #157397

Open
pasqui23 opened this issue Jan 30, 2022 · 3 comments
Open

python3Packages.opencv should also export the wrapper packages #157397

pasqui23 opened this issue Jan 30, 2022 · 3 comments
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: python

Comments

@pasqui23
Copy link
Contributor

Describe the bug

python3Packages.opencv only exports the opencv package.
However many python packages depend on the prebuilt opencv-python(https://pypi.org/project/opencv-python/) or opencv-python-headless(https://pypi.org/project/opencv-python-headless/) pip package, as they are a drop in replacement for each other.
Also if opencv is built with the contrib extensions opencv-contrib-python(https://pypi.org/project/opencv-contrib-python/) should be exposed too.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Try to package a python package depending on opencv-python like medialib
  2. Add opencv to propagatedBuildInputs
  3. Build it

Expected behavior

Build succeeds without problems

Additional context

I've encountered this while trying to build #153255
The suggested workaround of patching the dependant packages by removing the opencv-python dependency would not work if we source the package from a wheel for example.

It also duplicate works that should be done only in one place

Notify maintainers

@jonringer @mdaiter @basvandijk

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.16.2, NixOS, 22.05 (Quokka)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.5.1
  • nixpkgs: /nix/store/8jc465d8r1mrjxb7j6wx7qc7d95frv0k-source
@jonringer
Copy link
Contributor

It would probably be easiest to have just a stub setup.py, and just have a meta package which exports the 4 packages built by https://github.com/opencv/opencv-python

@jonringer
Copy link
Contributor

related: #153373 (comment)

@pasqui23
Copy link
Contributor Author

It would probably be easiest to have just a stub setup.py, and just have a meta package which exports the 4 packages built by https://github.com/opencv/opencv-python

opencv-contrib-python should be produced only if opencv is built with the contrib extensions.

I guess this would be easier if it is all evaluated from inside opencv package

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: python
Projects
None yet
Development

No branches or pull requests

3 participants