diff --git a/conda/opencv/meta.yaml b/conda/opencv/meta.yaml index 628faaa0290582b179b0429864de3caf21f35519..5f8459f6a6b8da9deeb42b190caa762fe5612d72 100644 --- a/conda/opencv/meta.yaml +++ b/conda/opencv/meta.yaml @@ -46,7 +46,7 @@ build: run_exports: # https://abi-laboratory.pro/index.php?view=timeline&l=opencv # Things seem to change every patch versions, mostly the dnn module - - libopencv + - {{ pin_subpackage('libopencv', max_pin='x.x.x') }} requirements: build: @@ -88,84 +88,85 @@ requirements: run: # Don't depend on python in the run section # py-opencv will depend on python + - {{ pin_compatible('harfbuzz') }} # [unix] test: - requires: - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - pkg-config # [not win] - - mkl-devel {{ mkl }} # [blas_impl == 'mkl'] - - openblas-devel {{ openblas }} # [blas_impl == 'openblas'] - - nomkl # [blas_impl == 'openblas'] - - cmake - - ninja - - qt 5.9.* # [linux64] - files: - - CMakeLists.txt - - test.cpp - commands: - # Verify dynamic libraries on all systems - {% set win_ver_lib = version|replace(".", "") %} - {% set opencv_libs = [ - "aruco", - "bgsegm", - "calib3d", - "ccalib", - "core", - "datasets", - "dnn", - "dpm", - "face", - "features2d", - "flann", - "fuzzy", - "highgui", - "imgcodecs", - "imgproc", - "line_descriptor", - "ml", - "objdetect", - "optflow", - "phase_unwrapping", - "photo", - "plot", - "reg", - "rgbd", - "saliency", - "shape", - "stereo", - "stitching", - "structured_light", - "superres", - "surface_matching", - "text", - "tracking", - "video", - "videoio", - "videostab", - "xfeatures2d", - "ximgproc", - "xobjdetect", - "xphoto" - ] %} - - export MACOSX_DEPLOYMENT_TARGET={{ MACOSX_DEPLOYMENT_TARGET }} # [osx] - - export CONDA_BUILD_SYSROOT={{ CONDA_BUILD_SYSROOT }} # [osx] - - OPENCV_FLAGS=`pkg-config --cflags opencv4` # [unix] - - $CXX -std=c++11 $RECIPE_DIR/test.cpp ${OPENCV_FLAGS} -o test # [unix] - - if [[ $(./test) != $PKG_VERSION ]]; then exit 1 ; fi # [unix] - {% for each_opencv_lib in opencv_libs %} - - test -f $PREFIX/lib/libopencv_{{ each_opencv_lib }}${SHLIB_EXT} # [unix] - - if not exist %PREFIX%\\Library\\bin\\opencv_{{ each_opencv_lib }}{{ win_ver_lib }}.dll exit 1 # [win] - {% endfor %} - - test -f $PREFIX/lib/libopencv_bioinspired${SHLIB_EXT} # [unix] - - test -f $PREFIX/lib/libopencv_hdf${SHLIB_EXT} # [unix] - - test -f $PREFIX/lib/libopencv_freetype${SHLIB_EXT} # [unix] - - mkdir -p cmake_build_test && pushd cmake_build_test - - cmake -G "Ninja" .. - - cmake --build . --config Release - - popd + requires: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - pkg-config # [not win] + - mkl-devel {{ mkl }} # [blas_impl == 'mkl'] + - openblas-devel {{ openblas }} # [blas_impl == 'openblas'] + - nomkl # [blas_impl == 'openblas'] + - cmake + - ninja + - qt 5.9.* # [linux64] + files: + - CMakeLists.txt + - test.cpp + commands: + # Verify dynamic libraries on all systems + {% set win_ver_lib = version|replace(".", "") %} + {% set opencv_libs = [ + "aruco", + "bgsegm", + "calib3d", + "ccalib", + "core", + "datasets", + "dnn", + "dpm", + "face", + "features2d", + "flann", + "fuzzy", + "highgui", + "imgcodecs", + "imgproc", + "line_descriptor", + "ml", + "objdetect", + "optflow", + "phase_unwrapping", + "photo", + "plot", + "reg", + "rgbd", + "saliency", + "shape", + "stereo", + "stitching", + "structured_light", + "superres", + "surface_matching", + "text", + "tracking", + "video", + "videoio", + "videostab", + "xfeatures2d", + "ximgproc", + "xobjdetect", + "xphoto" + ] %} + - export MACOSX_DEPLOYMENT_TARGET={{ MACOSX_DEPLOYMENT_TARGET }} # [osx] + - export CONDA_BUILD_SYSROOT={{ CONDA_BUILD_SYSROOT }} # [osx] + - OPENCV_FLAGS=`pkg-config --cflags opencv4` # [unix] + - $CXX -std=c++11 $RECIPE_DIR/test.cpp ${OPENCV_FLAGS} -o test # [unix] + - if [[ $(./test) != $PKG_VERSION ]]; then exit 1 ; fi # [unix] + {% for each_opencv_lib in opencv_libs %} + - test -f $PREFIX/lib/libopencv_{{ each_opencv_lib }}${SHLIB_EXT} # [unix] + - if not exist %PREFIX%\\Library\\bin\\opencv_{{ each_opencv_lib }}{{ win_ver_lib }}.dll exit 1 # [win] + {% endfor %} + - test -f $PREFIX/lib/libopencv_bioinspired${SHLIB_EXT} # [unix] + - test -f $PREFIX/lib/libopencv_hdf${SHLIB_EXT} # [unix] + - test -f $PREFIX/lib/libopencv_freetype${SHLIB_EXT} # [unix] + - mkdir -p cmake_build_test && pushd cmake_build_test + - cmake -G "Ninja" .. + - cmake --build . --config Release + - popd outputs: - name: libopencv @@ -178,13 +179,17 @@ outputs: - name: py-opencv build: run_exports: - - py-opencv + # Should we even have this??? + # don't pin the python version so hard. + # Actually, I have found pretty good compatibility in the python + # package + - {{ pin_subpackage('py-opencv') }} requirements: # There is no build script, but I just want it to think # that it needs python and numpy at build time host: - - python {{ python }} - - numpy {{ numpy }} + - python + - numpy run: - python - {{ pin_compatible('numpy') }} @@ -193,9 +198,9 @@ outputs: requires: # Test with the two currently supported lapack implementatons # One test done on different versions of python on each platform - - mkl-devel {{ mkl }} # [blas_impl == 'mkl'] + - mkl-devel {{ mkl }} # [blas_impl == 'mkl'] - openblas-devel {{ openblas }} # [blas_impl == 'openblas'] - - nomkl # [blas_impl == 'openblas'] + - nomkl # [blas_impl == 'openblas'] imports: - cv2 - cv2.xfeatures2d