Skip to content
Snippets Groups Projects
Commit 01088248 authored by Vincent POLLET's avatar Vincent POLLET
Browse files

Fix sub-packages dependency specification

parent 99d198fc
No related branches found
No related tags found
1 merge request!462Fix sub-packages dependency specification
Pipeline #46259 passed
......@@ -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
- {{ pin_subpackage('libopencv', max_pin='x.x.x') }}
- libopencv
requirements:
build:
......@@ -88,108 +88,103 @@ 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
- name: opencv
requirements:
run:
- {{ pin_subpackage('libopencv', exact=True) }}
- {{ pin_subpackage('py-opencv', exact=True) }}
- {{ pin_subpackage('libopencv', max_pin='x.x.x') }}
- {{ pin_subpackage('py-opencv', max_pin='x.x') }}
- name: py-opencv
build:
run_exports:
# 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') }}
- 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
- numpy
- python {{ python }}
- numpy {{ numpy }}
run:
- python
- {{ pin_compatible('numpy') }}
......@@ -198,9 +193,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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment