diff --git a/.github/workflows/generate-conda-packages.yaml b/.github/workflows/generate-conda-packages.yaml index 857248912..883d3eda2 100644 --- a/.github/workflows/generate-conda-packages.yaml +++ b/.github/workflows/generate-conda-packages.yaml @@ -149,6 +149,8 @@ jobs: # see https://github.com/mamba-org/boa/issues/117 # We also manually delete the recipe directory to avoid that it is built again, # specifically because we can't use --skip-existing as these packages are part of the robotology channel + conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml robot-log-visualizer + rm -rf robot-log-visualizer conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml yarp rm -rf yarp conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml gazebo-yarp-plugins diff --git a/cmake/RobSupPurePythonYCMEPHelper.cmake b/cmake/RobSupPurePythonYCMEPHelper.cmake index ebedc29fa..edeae8581 100644 --- a/cmake/RobSupPurePythonYCMEPHelper.cmake +++ b/cmake/RobSupPurePythonYCMEPHelper.cmake @@ -50,8 +50,4 @@ function(ROB_SUP_PURE_PYTHON_YCM_EP_HELPER _name) CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${Python3_EXECUTABLE} -m pip install --upgrade --no-deps --target=${YCM_EP_INSTALL_DIR}/${ROBSUB_PYTHON_INSTALL_DIR} -VV ) - - # Set this variable so that RobotologySuperbuildGenerateCondaRecipes.cmake pass this information to the - # Python scripts that generates the conda recipes - set(${_name}_CONDA_BUILD_TYPE "pure_python") endfunction() diff --git a/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake b/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake index f51506e25..d69f21136 100644 --- a/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake +++ b/conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake @@ -1,9 +1,12 @@ # Copyright (C) Fondazione Istituto Italiano di Tecnologia # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT -# Redefine find_or_build_package and ycm_ep_helper -# functions to extract metadata necessary for conda recipe -# generation from the RobotologySuperbuildLogic file +# Redefine find_or_build_package, ycm_ep_helper and rob_sup_pure_python_ycm_ep_helper +# as macros to extract metadata necessary for conda recipe +# generation from the RobotologySuperbuildLogic file. +# Note that these were originally functions, but they are re-defined as macros so that +# all the variables that they create are placed in the global scope, and in this script +# we can access variables such as ${_YH_${_cmake_pkg}_CMAKE_ARGS} macro(ycm_ep_helper _name) # Check arguments set(_options ) @@ -44,6 +47,30 @@ macro(ycm_ep_helper _name) set_property(GLOBAL PROPERTY YCM_PROJECTS ${_projects}) endmacro() +macro(ROB_SUP_PURE_PYTHON_YCM_EP_HELPER _name) + # Check arguments + set(_options) + set(_oneValueArgs COMPONENT + FOLDER + REPOSITORY + TAG) + set(_multiValueArgs DEPENDS) + + cmake_parse_arguments(_PYH_${_name} "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" "${ARGN}") + + ycm_ep_helper(${_name} TYPE GIT + STYLE GITHUB + REPOSITORY ${_PYH_${_name}_REPOSITORY} + DEPENDS ${_PYH_${_name}_DEPENDS} + TAG ${_PYH_${_name}_TAG} + COMPONENT ${_PYH_${_name}_COMPONENT} + FOLDER ${_PYH_${_name}_FOLDER}) + + # Set this variable so that RobotologySuperbuildGenerateCondaRecipes.cmake pass this information to the + # Python scripts that generates the conda recipes + set(${_name}_CONDA_BUILD_TYPE "pure_python") +endmacro() + macro(find_or_build_package _pkg) get_property(_superbuild_pkgs GLOBAL PROPERTY YCM_PROJECTS) if(NOT ${_pkg} IN_LIST _superbuild_pkgs) @@ -223,7 +250,6 @@ macro(generate_conda_recipes) set(python_generation_script_additional_options "") endif() execute_process(COMMAND python ${python_generation_script} -i ${metametadata_file} -o ${generated_conda_recipes_dir} ${python_generation_script_additional_options} RESULT_VARIABLE CONDA_GENERATION_SCRIPT_RETURN_VALUE) - message(STATUS "CONDA_GENERATION_SCRIPT_RETURN_VALUE: ${CONDA_GENERATION_SCRIPT_RETURN_VALUE}") if(CONDA_GENERATION_SCRIPT_RETURN_VALUE STREQUAL "0") message(STATUS "conda recipes correctly generated in ${generated_conda_recipes_dir}.") message(STATUS "To build the generated conda recipes, navigate to the directory and run conda build . in it.") diff --git a/conda/pure_python_recipe_template/meta.yaml b/conda/pure_python_recipe_template/meta.yaml index 251ddc01f..b61e7ea9a 100644 --- a/conda/pure_python_recipe_template/meta.yaml +++ b/conda/pure_python_recipe_template/meta.yaml @@ -10,7 +10,7 @@ source: build: number: {{ conda_build_number }} - script: {{ PYTHON }} -m pip install . --no-deps -vv +{% raw %} script: {{ PYTHON }} -m pip install . --no-deps -vv {% endraw %} requirements: build: