From 7f5efba4f3a76bdd1cbd4daca2aacafb70731fe7 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 25 Jun 2021 10:08:00 +0200 Subject: [PATCH 1/9] OsqpEigen: Switch to use conda-forge binary package when generating conda packages --- cmake/BuildOsqpEigen.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/BuildOsqpEigen.cmake b/cmake/BuildOsqpEigen.cmake index a8efcacc3..e36dec344 100644 --- a/cmake/BuildOsqpEigen.cmake +++ b/cmake/BuildOsqpEigen.cmake @@ -15,4 +15,5 @@ ycm_ep_helper(OsqpEigen TYPE GIT CMAKE_ARGS -DBUILD_TESTING:BOOL=OFF DEPENDS osqp) -set(OsqpEigen_CONDA_DEPENDENCIES "eigen") \ No newline at end of file +set(OsqpEigen_CONDA_PKG_NAME osqp-eigen) +set(OsqpEigen_CONDA_PKG_CONDA_FORGE_OVERRIDE ON) From c684917049db4295654e79c194cd2363180be96b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 25 Jun 2021 14:07:55 +0200 Subject: [PATCH 2/9] Update generate-conda-packages.yaml --- .github/workflows/generate-conda-packages.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/generate-conda-packages.yaml b/.github/workflows/generate-conda-packages.yaml index fa8dcbe4d..a2dc988b2 100644 --- a/.github/workflows/generate-conda-packages.yaml +++ b/.github/workflows/generate-conda-packages.yaml @@ -100,7 +100,6 @@ jobs: # We manually specify the build order as conda build is too slow, and conda mambabuild does not support correctly multiple recipes # see https://github.com/mamba-org/boa/issues/117 conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml blockfactory - conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml osqp-eigen conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml ycm-cmake-modules conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml robot-testing-framework conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml yarp From 2b462f6237f97d14e6218b43d56ae5d7465439a3 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 25 Jun 2021 16:46:57 +0200 Subject: [PATCH 3/9] Update Buildevent-driven.cmake --- cmake/Buildevent-driven.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Buildevent-driven.cmake b/cmake/Buildevent-driven.cmake index d3fab18b5..7e0b4e1f3 100644 --- a/cmake/Buildevent-driven.cmake +++ b/cmake/Buildevent-driven.cmake @@ -14,3 +14,5 @@ ycm_ep_helper(event-driven TYPE GIT YCM COMPONENT event-driven FOLDER src) + +set(event-driven_CONDA_DEPENDENCIES libopencv qt) From d52e48dd3cf88eb520dfc7c20c197493e978e130 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 26 Jun 2021 11:41:56 +0200 Subject: [PATCH 4/9] Update RobotologySuperbuildGenerateCondaRecipes.cmake --- conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake b/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake index e919d35d9..e4d6b1c13 100644 --- a/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake +++ b/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake @@ -186,6 +186,7 @@ set_property(GLOBAL PROPERTY YCM_PROJECTS ${_projects}) set(_YH_YCM_REPOSITORY robotology/ycm.git) # Use ycm-cmake-modules as name as in debian set(YCM_CONDA_PKG_NAME ycm-cmake-modules) +set(YCM_CONDA_PKG_CONDA_FORGE_OVERRIDE ON) include(RobotologySuperbuildLogic) include(CondaGenerationOptions) From 95db9d389220897d2f0da02a22905dd8ebb6d509 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 26 Jun 2021 11:45:08 +0200 Subject: [PATCH 5/9] Update generate-conda-packages.yaml --- .github/workflows/generate-conda-packages.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/generate-conda-packages.yaml b/.github/workflows/generate-conda-packages.yaml index a2dc988b2..0398a8de3 100644 --- a/.github/workflows/generate-conda-packages.yaml +++ b/.github/workflows/generate-conda-packages.yaml @@ -100,7 +100,6 @@ jobs: # We manually specify the build order as conda build is too slow, and conda mambabuild does not support correctly multiple recipes # see https://github.com/mamba-org/boa/issues/117 conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml blockfactory - conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml ycm-cmake-modules conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml robot-testing-framework conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml yarp conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml matio-cpp From 6900ca86ccb4d0b14a59a2d97cd52c62ca170c06 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 26 Jun 2021 16:11:35 +0200 Subject: [PATCH 6/9] Update generate-conda-packages.yaml --- .github/workflows/generate-conda-packages.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/generate-conda-packages.yaml b/.github/workflows/generate-conda-packages.yaml index 0398a8de3..ed8d00670 100644 --- a/.github/workflows/generate-conda-packages.yaml +++ b/.github/workflows/generate-conda-packages.yaml @@ -100,7 +100,6 @@ jobs: # We manually specify the build order as conda build is too slow, and conda mambabuild does not support correctly multiple recipes # see https://github.com/mamba-org/boa/issues/117 conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml blockfactory - conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml robot-testing-framework conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml yarp conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml matio-cpp conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml yarp-telemetry From 9083ac47c2863650d106856ec3c62103f8a6cecf Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 26 Jun 2021 16:12:22 +0200 Subject: [PATCH 7/9] Update BuildRobotTestingFramework.cmake --- cmake/BuildRobotTestingFramework.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/BuildRobotTestingFramework.cmake b/cmake/BuildRobotTestingFramework.cmake index 9e9c6ce57..c281a6bc5 100644 --- a/cmake/BuildRobotTestingFramework.cmake +++ b/cmake/BuildRobotTestingFramework.cmake @@ -13,3 +13,5 @@ ycm_ep_helper(RobotTestingFramework TYPE GIT COMPONENT core FOLDER src) +set(RobotTestingFramework_CONDA_PKG_NAME robot-testing-framework) +set(RobotTestingFramework_CONDA_PKG_CONDA_FORGE_OVERRIDE ON) From 62ac8254291ad90cb8a1b4fb3b148cf0234e4b92 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 28 Jun 2021 13:17:13 +0200 Subject: [PATCH 8/9] Update RobotologySuperbuildGenerateCondaRecipes.cmake --- ...otologySuperbuildGenerateCondaRecipes.cmake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake b/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake index e4d6b1c13..bf5bfd1f6 100644 --- a/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake +++ b/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake @@ -132,6 +132,24 @@ macro(generate_metametadata_file) string(APPEND metametadata_file_contents " - ${_dep}\n") endforeach() endif() + + # By default we rely on properly set run_exports configurations in conda recipes + # to avoid to manually set run dependencies. However, in some cases (cmake-only + # libraries, header-only libraries) run_exports is not used, so it is necessary + # to manually specify them as run dependencies + if("ycm-cmake-modules" IN_LIST ${_cmake_pkg}_CONDA_DEPENDENCIES) + list(APPEND ${_cmake_pkg}_CONDA_RUN_DEPENDENCIES_EXPLICIT "ycm-cmake-modules") + endif() + if("eigen" IN_LIST ${_cmake_pkg}_CONDA_DEPENDENCIES) + list(APPEND ${_cmake_pkg}_CONDA_RUN_DEPENDENCIES_EXPLICIT "eigen") + endif() + if(NOT "${${_cmake_pkg}_CONDA_RUN_DEPENDENCIES_EXPLICIT}" STREQUAL "") + string(APPEND metametadata_file_contents " run_dependencies_explicit:\n") + foreach(_dep IN LISTS ${_cmake_pkg}_CONDA_RUN_DEPENDENCIES_EXPLICIT) + string(APPEND metametadata_file_contents " - ${_dep}\n") + endforeach() + endif() + # If some dependency require opengl to build and we are on Linux, add the required packages # See https://conda-forge.org/docs/maintainer/knowledge_base.html?#libgl From 7b6dfd66617558ea131d5bf351144b272ee65dac Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 28 Jun 2021 13:19:50 +0200 Subject: [PATCH 9/9] Update meta.yaml --- conda/recipe_template/meta.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conda/recipe_template/meta.yaml b/conda/recipe_template/meta.yaml index acfd9e6fe..44608dfa4 100644 --- a/conda/recipe_template/meta.yaml +++ b/conda/recipe_template/meta.yaml @@ -38,7 +38,7 @@ requirements: - {{ cdt('expat') }} {% endraw %}{% endif %} host: -{# List all dependencies just a host. Run dependenencies should be correctly set by run_exports #} +{# List all dependencies just a host. Run dependenencies should be correctly set by run_exports, except the one listed in #} {% for dep in dependencies %} - {{ dep }} {% endfor %} {# Handle specific packages required for gl on Linux, see https://conda-forge.org/docs/maintainer/knowledge_base.html?#libgl #} @@ -46,6 +46,9 @@ requirements: {# Handle the constraint of macos >= 10.13 #} run: - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] +{# List additional run dependencies that are not covered by run_exports #} +{% for dep in run_dependencies_explicit %} - {{ dep }} +{% endfor %} {% if add_python_runtime_dep %} - python {% endif %} {% if add_numpy_runtime_dep %}{% raw %} - {{ pin_compatible('numpy') }} {% endraw %}{% endif %}