Commit 74b4537c authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Merge branch 'fix_opencv_subpackage_dependencies' into 'master'

Fix sub-packages dependency specification

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