conda-forge / opencv-feedstock

A conda-smithy repository for opencv.
BSD 3-Clause "New" or "Revised" License
65 stars 60 forks source link

cv2.version module #343

Closed jamesmyatt closed 7 months ago

jamesmyatt commented 1 year ago

The PyPI wheel include a cv2.version module, which is created at build-time using find_version.py. See https://github.com/opencv/opencv-python/tree/4.x#versioning. Would it be possible to include the same logic in the conda packages? Would it be a good idea? Parity with the pypi wheel seems like a good idea to me.

Most of all, I'm interested to in the cv2.version.headless attribute that shows whether cv2 has been compiled with the headless options or not.

hmaarrfk commented 1 year ago

I (and likely other maintainers) would accept patches to conda-forge to improve things on this front. I would ask that an attempt is made to upstream them.

The last one we tried to upstream was stalled: https://github.com/opencv/opencv/pull/21611 but I think that if you add your voice for more "official" support for these features, it would go a long way.

mshabunin commented 1 year ago

Most of all, I'm interested to in the cv2.version.headless attribute that shows whether cv2 has been compiled with the headless options or not.

AFAIK there is no separate headless OpenCV package in conda-forge, see #293

Version string can be accessed directly as cv2.__version__ and more detailed information can be extracted from cv2.getBuildInformation()

hmaarrfk commented 7 months ago

I would like to close this as it seems that an adequate workaround was found.

Please feel free to re-open if you think there is an important usecase that you want to tackle.

We've recently released "headless" versions of opencv and would welcome feedback on them.