Fix sub-packages dependency specification
This merge request aims to solve the issue identified in !461 (closed). The work there got a bit side-tracked trying to change to much of the recipe, thus this merge request which should tackle the issue directly.
opencv package has an unsatisfiable dependency on py-opencv:
Problem: nothing provides py-opencv 4.5.0 py37h1209919_0 needed by opencv-4.5.0-py37_0
py-opencv package that is build is the following:
py-opencv 4.5.0 py37h73dd053_0 bobconda.lab.idiap.ch/software/bob/conda/linux-64 1 MB
which doesn't match the requirement from
Building the recipe locally with
bdt build -vvv --stable -m conda_build_config.yaml conda/opencv would not reproduce the issue: the local
opencv package depended on
py-opencv with correct hash.
As far as I know the package hash is computed from the list of its dependencies which versions do matter for binary compatibility doc. Therefore by adding unused dependencies to
py-opencv you can get a different hash for it, however the
opencv dependency would still be unchanged.
Issue appears to be that
py-opencv dependency of
opencv gets wrongfully pinned as the result of the wrong usage of the
pin_subpackage function in run_exports sections of the subpackages.
As stated in the doc:
pin_subpackageshould be used in run and/or test requirements to refer to a subpackage built by the parent recipe elsewhere in the recipe.
run_exportssections are used to automatically put the package in the run-time dependency of any other package that has this package as a host and/or build dependency.