From 486145856b4cfd261184d1c0b2fb06ea6290f6f2 Mon Sep 17 00:00:00 2001 From: regro-cf-autotick-bot <36490558+regro-cf-autotick-bot@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:03:01 +0000 Subject: [PATCH 01/10] updated v11.0.0 --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 90a5793..ce63f69 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set component_name = "msgs" %} {% set repo_name = "gz-" + component_name %} -{% set version = "10.3.0" %} +{% set version = "11.0.0" %} {% set major_version = version.split('.')[0] %} {% set name = repo_name + major_version %} {% set component_version = component_name + major_version %} @@ -14,12 +14,12 @@ package: source: - url: https://github.com/gazebosim/{{ repo_name }}/archive/{{ repo_name }}{{ major_version }}_{{ version }}.tar.gz - sha256: a93a59379b1179b22a2995a3888daf18486f945565170fd97446d6a58b543b25 + sha256: c7ce37fc78985b72afaef73fca0a64fb144a0aa5f0df099355da51c2cd6350a4 patches: - win_enable_py_tests.patch build: - number: 1 + number: 0 outputs: - name: {{ cxx_name }} From 8f595b3ee64bb3ccdbeb7cd6095ffaa62fad1b67 Mon Sep 17 00:00:00 2001 From: regro-cf-autotick-bot <36490558+regro-cf-autotick-bot@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:03:54 +0000 Subject: [PATCH 02/10] MNT: Re-rendered with conda-build 24.9.0, conda-smithy 3.40.1, and conda-forge-pinning 2024.09.26.19.22.15 --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index d3c7a4f..3e481f6 100644 --- a/README.md +++ b/README.md @@ -81,9 +81,9 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | -| [![Conda Recipe](https://img.shields.io/badge/recipe-gz--msgs10-green.svg)](https://anaconda.org/conda-forge/gz-msgs10) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/gz-msgs10.svg)](https://anaconda.org/conda-forge/gz-msgs10) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/gz-msgs10.svg)](https://anaconda.org/conda-forge/gz-msgs10) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/gz-msgs10.svg)](https://anaconda.org/conda-forge/gz-msgs10) | -| [![Conda Recipe](https://img.shields.io/badge/recipe-gz--msgs10--python-green.svg)](https://anaconda.org/conda-forge/gz-msgs10-python) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/gz-msgs10-python.svg)](https://anaconda.org/conda-forge/gz-msgs10-python) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/gz-msgs10-python.svg)](https://anaconda.org/conda-forge/gz-msgs10-python) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/gz-msgs10-python.svg)](https://anaconda.org/conda-forge/gz-msgs10-python) | -| [![Conda Recipe](https://img.shields.io/badge/recipe-libgz--msgs10-green.svg)](https://anaconda.org/conda-forge/libgz-msgs10) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libgz-msgs10.svg)](https://anaconda.org/conda-forge/libgz-msgs10) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libgz-msgs10.svg)](https://anaconda.org/conda-forge/libgz-msgs10) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libgz-msgs10.svg)](https://anaconda.org/conda-forge/libgz-msgs10) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-gz--msgs11-green.svg)](https://anaconda.org/conda-forge/gz-msgs11) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/gz-msgs11.svg)](https://anaconda.org/conda-forge/gz-msgs11) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/gz-msgs11.svg)](https://anaconda.org/conda-forge/gz-msgs11) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/gz-msgs11.svg)](https://anaconda.org/conda-forge/gz-msgs11) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-gz--msgs11--python-green.svg)](https://anaconda.org/conda-forge/gz-msgs11-python) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/gz-msgs11-python.svg)](https://anaconda.org/conda-forge/gz-msgs11-python) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/gz-msgs11-python.svg)](https://anaconda.org/conda-forge/gz-msgs11-python) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/gz-msgs11-python.svg)](https://anaconda.org/conda-forge/gz-msgs11-python) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-libgz--msgs11-green.svg)](https://anaconda.org/conda-forge/libgz-msgs11) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libgz-msgs11.svg)](https://anaconda.org/conda-forge/libgz-msgs11) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libgz-msgs11.svg)](https://anaconda.org/conda-forge/libgz-msgs11) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libgz-msgs11.svg)](https://anaconda.org/conda-forge/libgz-msgs11) | Installing gz-msgs ================== @@ -95,41 +95,41 @@ conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `gz-msgs10, gz-msgs10-python, libgz-msgs10` can be installed with `conda`: +Once the `conda-forge` channel has been enabled, `gz-msgs11, gz-msgs11-python, libgz-msgs11` can be installed with `conda`: ``` -conda install gz-msgs10 gz-msgs10-python libgz-msgs10 +conda install gz-msgs11 gz-msgs11-python libgz-msgs11 ``` or with `mamba`: ``` -mamba install gz-msgs10 gz-msgs10-python libgz-msgs10 +mamba install gz-msgs11 gz-msgs11-python libgz-msgs11 ``` -It is possible to list all of the versions of `gz-msgs10` available on your platform with `conda`: +It is possible to list all of the versions of `gz-msgs11` available on your platform with `conda`: ``` -conda search gz-msgs10 --channel conda-forge +conda search gz-msgs11 --channel conda-forge ``` or with `mamba`: ``` -mamba search gz-msgs10 --channel conda-forge +mamba search gz-msgs11 --channel conda-forge ``` Alternatively, `mamba repoquery` may provide more information: ``` # Search all versions available on your platform: -mamba repoquery search gz-msgs10 --channel conda-forge +mamba repoquery search gz-msgs11 --channel conda-forge -# List packages depending on `gz-msgs10`: -mamba repoquery whoneeds gz-msgs10 --channel conda-forge +# List packages depending on `gz-msgs11`: +mamba repoquery whoneeds gz-msgs11 --channel conda-forge -# List dependencies of `gz-msgs10`: -mamba repoquery depends gz-msgs10 --channel conda-forge +# List dependencies of `gz-msgs11`: +mamba repoquery depends gz-msgs11 --channel conda-forge ``` From 661b442172bf60bf30bc37f81b82a2aa4e755f54 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 27 Sep 2024 09:05:50 +0200 Subject: [PATCH 03/10] Fix dependency versions --- recipe/meta.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ce63f69..49718ee 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -38,13 +38,15 @@ outputs: - pkg-config - python # We need all host deps also in build for cross-compiling - - libgz-math7 # [build_platform != target_platform] + - libgz-cmake4 # [build_platform != target_platform] + - libgz-math8 # [build_platform != target_platform] - libgz-tools2 # [build_platform != target_platform] - tinyxml2 # [build_platform != target_platform] - libabseil # [build_platform != target_platform] - libprotobuf # [build_platform != target_platform] host: - - libgz-math7 + - libgz-cmake4 + - libgz-math8 - libgz-tools2 - tinyxml2 - libabseil @@ -78,13 +80,13 @@ outputs: - pkg-config - python # We need all host deps also in build for cross-compiling - - libgz-math7 # [build_platform != target_platform] + - libgz-math8 # [build_platform != target_platform] - libgz-tools2 # [build_platform != target_platform] - tinyxml2 # [build_platform != target_platform] - libabseil # [build_platform != target_platform] - libprotobuf # [build_platform != target_platform] host: - - libgz-math7 + - libgz-math8 - libgz-tools2 - tinyxml2 - libabseil @@ -102,7 +104,7 @@ outputs: requires: - pip imports: - - gz.msgs10 + - gz.msgs11 - name: {{ name }} build: @@ -125,7 +127,7 @@ outputs: requires: - pip imports: - - gz.msgs10 + - gz.msgs11 about: home: https://github.com/gazebosim/{{ repo_name }} From 8a4c56fd0aa5207b3d25b074ff73fd994b09252d Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 27 Sep 2024 09:07:04 +0200 Subject: [PATCH 04/10] Add v10 branch to abi_migration_branches --- conda-forge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda-forge.yml b/conda-forge.yml index 8312777..6fad6b2 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,6 +1,7 @@ bot: abi_migration_branches: - v9 + - v10 automerge: true build_platform: linux_aarch64: linux_aarch64 From 5b5dfe39fdb659b703d68589848172504ff8bb8f Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 27 Sep 2024 14:40:43 +0200 Subject: [PATCH 05/10] Update build_py.sh for gz-msgs11 --- recipe/build_py.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/build_py.sh b/recipe/build_py.sh index bae3ab2..ccc24ce 100644 --- a/recipe/build_py.sh +++ b/recipe/build_py.sh @@ -33,7 +33,7 @@ mkdir build_py cd build_py if [[ "${CONDA_BUILD_CROSS_COMPILATION}" == "1" ]]; then - export CMAKE_ARGS_FOR_PY_BUILD="-Dgz-msgs10_PYTHON_INTERPRETER=$BUILD_PREFIX/bin/python -Dgz-msgs10_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc -Dgz-msgs10_PROTO_GENERATOR_PLUGIN=$BUILD_PREFIX/bin/gz-msgs10_protoc_plugin -DPython3_EXECUTABLE:PATH=$BUILD_PREFIX/bin/python -DPYTHON_EXECUTABLE:PATH=$BUILD_PREFIX/bin/python" + export CMAKE_ARGS_FOR_PY_BUILD="-Dgz-msgs11_PYTHON_INTERPRETER=$BUILD_PREFIX/bin/python -Dgz-msgs11_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc -Dgz-msgs11_PROTO_GENERATOR_PLUGIN=$BUILD_PREFIX/bin/gz-msgs11_protoc_plugin -DPython3_EXECUTABLE:PATH=$BUILD_PREFIX/bin/python -DPYTHON_EXECUTABLE:PATH=$BUILD_PREFIX/bin/python" else export CMAKE_ARGS_FOR_PY_BUILD="-DPython3_EXECUTABLE:PATH=$PYTHON -DPYTHON_EXECUTABLE:PATH=$PYTHON" fi From 10ab8de949d2f6ad504d0de3dbb5fa8e8ceaee99 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 27 Sep 2024 14:41:22 +0200 Subject: [PATCH 06/10] Delete recipe/391.patch --- recipe/391.patch | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 recipe/391.patch diff --git a/recipe/391.patch b/recipe/391.patch deleted file mode 100644 index 55cbb8f..0000000 --- a/recipe/391.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 690d2a65eae3c968e82d47f62aee1234548163a6 Mon Sep 17 00:00:00 2001 -From: Silvio Traversaro -Date: Mon, 2 Oct 2023 11:29:01 +0200 -Subject: [PATCH] Set GZ_TOOLS_VER to 2 for consistency with rest of Garden and - Harmonic libraries - -Signed-off-by: Silvio Traversaro ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2a9e8ed0..7a4a6699 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -97,7 +97,7 @@ set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR}) - # Note that CLI files are installed regardless of whether the dependency is - # available during build time - find_program(HAVE_GZ_TOOLS gz) --set(GZ_TOOLS_VER 1) -+set(GZ_TOOLS_VER 2) - - #-------------------------------------- - # Find Tinyxml2 From 008fd3d47611cd9d2004cdbe304e66af99b49345 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 27 Sep 2024 14:41:31 +0200 Subject: [PATCH 07/10] Delete recipe/392.patch --- recipe/392.patch | 406 ----------------------------------------------- 1 file changed, 406 deletions(-) delete mode 100644 recipe/392.patch diff --git a/recipe/392.patch b/recipe/392.patch deleted file mode 100644 index c5cc2ed..0000000 --- a/recipe/392.patch +++ /dev/null @@ -1,406 +0,0 @@ -From b9302c375d63829ff2630a284990472da71dcbf0 Mon Sep 17 00:00:00 2001 -From: Silvio Traversaro -Date: Mon, 2 Oct 2023 12:21:10 +0200 -Subject: [PATCH] Fix cross-compilation support for gz-msg10 - -Signed-off-by: Silvio Traversaro ---- - CMakeLists.txt | 55 +++++++++++++++++++++++------------- - cmake/gz_msgs_factory.cmake | 10 +++++-- - cmake/gz_msgs_generate.cmake | 41 +++++++++++++++++++++++++-- - cmake/gz_msgs_protoc.cmake | 19 +++++++++++-- - core/CMakeLists.txt | 13 ++++++++- - gz-msgs-extras.cmake.in | 15 +++++++++- - 6 files changed, 124 insertions(+), 29 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b3133776..e1af90f8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -25,34 +25,49 @@ gz_configure_project(VERSION_SUFFIX - #============================================================================ - - # Cross-compilation related options --# In a cross-compilation scenario, it is possible that the gz_msgs_gen -+# In a cross-compilation scenario, it is possible that the -+# ${PROJECT_NAME}_protoc_plugin - # generator compiled for the target machine cannot be used to generate --# the C++ code corresponding to the .proto definition. For this scenario, --# the following two options can be used as follows. -+# the C++ code corresponding to the .proto definition. -+# Similarly, it is possible that Python3::Interpreter and protobuf::protoc -+# found via find_package are not executable that can be run during the build. -+# To avoid, that the following options can be used as follows. - # First of all, gz-msgs is compiled targeting the host machine, and in the --# build targeting the host, the INSTALL_GZ_MSGS_GEN_EXECUTABLE option is --# enabled: --# > cmake -DINSTALL_GZ_MSGS_GEN_EXECUTABLE:BOOL=ON .. --# ensuring that the gz_msgs_gen is installed in --# /bin/gz_msgs_gen . Then, the same version of gz-msgs -+# build targeting the host, ensuring that the ${PROJECT_NAME}_protoc_plugin -+# is installed in /bin/${PROJECT_NAME}_protoc_plugin . -+# Then, the same version of gz-msgs - # can be cross-compiled, and in the cross-compilation build the location of the --# host gz_msgs_gen is specified via the GZ_MSGS_GEN_EXECUTABLE --# CMake cache variable: --# > cmake -GZ_MSGS_GEN_EXECUTABLE=/bin/gz_msgs_gen .. -+# host gz_msgs_gen is specified via the GZ_MSGS_GEN_EXECUTABLE CMake option. -+# Similarly to gz-msgs, also a copy of protoc and of the Python interpreter need -+# to be installed in the host at /bin, and they can be passed -+# to the build appropriate CMake options: -+# > cmake -Dgz-msgs_PROTO_GENERATOR_PLUGIN=gz-msgs_protoc_plugin -+# > -Dgz-msgs_PROTOC_EXECUTABLE=/bin/protoc -+# > -Dgz-msgs_PYTHON_INTERPRETER=/bin/python -+# > .. -+# In case the gz-msgs CMake functions are used also in downstream projects, -+# the same variables can be passed when configuring the downsream projects. - --option( -- INSTALL_GZ_MSGS_GEN_EXECUTABLE -- "Install the gz_msgs_gen executable." -- OFF) -+set( -+ ${PROJECT_NAME}_PROTO_GENERATOR_PLUGIN -+ "${PROJECT_NAME}_protoc_plugin" -+ CACHE STRING -+ "gz_msgs_gen executable used in the gz-msgs CMake functions.") -+mark_as_advanced(${PROJECT_NAME}_PROTO_GENERATOR_PLUGIN) - --mark_as_advanced(INSTALL_GZ_MSGS_GEN_EXECUTABLE) -+set( -+ ${PROJECT_NAME}_PROTOC_EXECUTABLE -+ protobuf::protoc -+ CACHE STRING -+ "protoc target or executable used in the gz-msgs CMake functions.") -+mark_as_advanced(${PROJECT_NAME}_PROTOC_EXECUTABLE) - - set( -- GZ_MSGS_GEN_EXECUTABLE -- "$" -+ ${PROJECT_NAME}_PYTHON_INTERPRETER -+ Python3::Interpreter - CACHE STRING -- "gz_msgs_gen executable used in the gz_msgs_protoc CMake function.") --mark_as_advanced(GZ_MSGS_GEN_EXECUTABLE) -+ "python target or executable used in the gz-msgs CMake functions.") -+mark_as_advanced(${PROJECT_NAME}_PYTHON_INTERPRETER) - - # Python interfaces vars - option(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION -diff --git a/cmake/gz_msgs_factory.cmake b/cmake/gz_msgs_factory.cmake -index b86b1b4f..2af59ffa 100644 ---- a/cmake/gz_msgs_factory.cmake -+++ b/cmake/gz_msgs_factory.cmake -@@ -6,7 +6,7 @@ - # One value arguments: - # FACTORY_GEN_SCRIPT - Location of the factory generator script - # PROTO_PACKAGE - Protobuf package the file belongs to (e.g. "gz.msgs") --# PROTOC_EXEC - Path to protoc -+# PYTHON_INTERPRETER - Target or path to the Python interpreter to use to execute the generator script - # OUTPUT_CPP_DIR - Path where C++ files are saved - # OUTPUT_CPP_HH_VAR - A CMake variable name containing a list that the C++ headers should be appended to - # OUTPUT_CPP_CC_VAR - A Cmake variable name containing a list that the C++ sources should be appended to -@@ -18,6 +18,7 @@ function(gz_msgs_factory) - set(oneValueArgs - FACTORY_GEN_SCRIPT - PROTO_PACKAGE -+ PYTHON_INTERPRETER - OUTPUT_CPP_DIR - OUTPUT_CPP_HH_VAR - OUTPUT_CPP_CC_VAR) -@@ -25,6 +26,11 @@ function(gz_msgs_factory) - - cmake_parse_arguments(gz_msgs_factory "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - -+ # Default values for optional parameters -+ if (NOT DEFINED gz_msgs_factory_PYTHON_INTERPRETER) -+ set(gz_msgs_factory_PYTHON_INTERPRETER Python3::Interpreter) -+ endif() -+ - _gz_msgs_proto_pkg_to_path(${gz_msgs_factory_PROTO_PACKAGE} proto_package_dir) - - set(output_header "${gz_msgs_factory_OUTPUT_CPP_DIR}/${proto_package_dir}/MessageTypes.hh") -@@ -57,7 +63,7 @@ function(gz_msgs_factory) - - add_custom_command( - OUTPUT ${output_files} -- COMMAND Python3::Interpreter -+ COMMAND ${gz_msgs_factory_PYTHON_INTERPRETER} - ARGS ${gz_msgs_factory_FACTORY_GEN_SCRIPT} ${GENERATE_ARGS} - DEPENDS - ${depends_index} -diff --git a/cmake/gz_msgs_generate.cmake b/cmake/gz_msgs_generate.cmake -index 679b9cae..5fc0cf3d 100644 ---- a/cmake/gz_msgs_generate.cmake -+++ b/cmake/gz_msgs_generate.cmake -@@ -2,6 +2,7 @@ - # The implementation of gz_msgs_generate_messages - # Options: - # One value arguments: -+# PYTHON_INTERPRETER - Target or path to the python interpreter used - # PROTO_PACKAGE - Protobuf package the file belongs to (e.g. "gz.msgs") - # MSGS_GEN_SCRIPT - Location of the messge generator script - # GZ_PROTOC_PLUGIN - Location of the gazebo generator plugin -@@ -20,6 +21,8 @@ function(gz_msgs_generate_messages_impl) - set(options "") - set(oneValueArgs - # Inputs -+ PYTHON_INTERPRETER -+ PROTOC_EXEC - PROTO_PACKAGE MSGS_GEN_SCRIPT GZ_PROTOC_PLUGIN FACTORY_GEN_SCRIPT PROTO_PATH - DEPENDENCY_DESCRIPTIONS - DLLEXPORT_DECL -@@ -33,6 +36,15 @@ function(gz_msgs_generate_messages_impl) - set(multiValueArgs INPUT_PROTOS) - - cmake_parse_arguments(generate_messages "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) -+ -+ # Default values for optional parameters -+ if (NOT DEFINED generate_messages_PYTHON_INTERPRETER) -+ set(generate_messages_PYTHON_INTERPRETER Python3::Interpreter) -+ endif() -+ if (NOT DEFINED generate_messages_PROTOC_EXEC) -+ set(generate_messages_PROTOC_EXEC protobuf::protoc) -+ endif() -+ - _gz_msgs_proto_pkg_to_string(${generate_messages_PROTO_PACKAGE} gen_dir) - _gz_msgs_proto_pkg_to_path(${generate_messages_PROTO_PACKAGE} proto_package_dir) - set(output_directory ${generate_messages_OUTPUT_DIRECTORY}) -@@ -42,6 +54,8 @@ function(gz_msgs_generate_messages_impl) - - foreach(proto_file ${generate_messages_INPUT_PROTOS}) - gz_msgs_protoc( -+ PYTHON_INTERPRETER -+ ${generate_messages_PYTHON_INTERPRETER} - MSGS_GEN_SCRIPT - ${generate_messages_MSGS_GEN_SCRIPT} - PROTO_PACKAGE -@@ -49,7 +63,7 @@ function(gz_msgs_generate_messages_impl) - INPUT_PROTO - ${proto_file} - PROTOC_EXEC -- protobuf::protoc -+ ${generate_messages_PROTOC_EXEC} - GZ_PROTOC_PLUGIN - ${generate_messages_GZ_PROTOC_PLUGIN} - PROTO_PATH -@@ -81,6 +95,8 @@ function(gz_msgs_generate_messages_impl) - endforeach() - - gz_msgs_factory( -+ PYTHON_INTERPRETER -+ ${generate_messages_PYTHON_INTERPRETER} - FACTORY_GEN_SCRIPT - ${generate_messages_FACTORY_GEN_SCRIPT} - PROTO_PACKAGE -@@ -130,6 +146,7 @@ endfunction() - ################################################## - # Options: - # One value arguments: -+# PROTOC_EXEC - protoc target or executable to use - # PROTO_PATH - Base directory of the proto files - # DEPENDENCY_DESCRIPTIONS - Variable containing all depedency description files - # OUTPUT_DIRECTORY - Directory of output gz_desc file -@@ -140,6 +157,7 @@ function(gz_msgs_generate_desc_impl) - set(options "") - set(oneValueArgs - # Inputs -+ PROTOC_EXEC - PROTO_PATH - DEPENDENCY_DESCRIPTIONS - OUTPUT_DIRECTORY -@@ -148,6 +166,10 @@ function(gz_msgs_generate_desc_impl) - - cmake_parse_arguments(generate_messages "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - -+ if (NOT DEFINED generate_messages_PROTOC_EXEC) -+ set(generate_messages_PROTOC_EXEC protobuf::protoc) -+ endif() -+ - set(ARGS) - list(APPEND ARGS -I${generate_messages_PROTO_PATH}) - list(APPEND ARGS --descriptor_set_out=${generate_messages_OUTPUT_FILENAME}) -@@ -161,7 +183,7 @@ function(gz_msgs_generate_desc_impl) - - add_custom_command( - OUTPUT ${generate_messages_OUTPUT_FILENAME} -- COMMAND protobuf::protoc -+ COMMAND ${generate_messages_PROTOC_EXEC} - ARGS ${ARGS} - DEPENDS ${generate_messages_INPUT_PROTOS} - COMMENT "Generating descriptor set" -@@ -175,6 +197,8 @@ endfunction() - # TARGET - Target (static library) to create - # PROTO_PACKAGE - Protobuf package the file belongs to (e.g. "gz.msgs") - # MSGS_GEN_SCRIPT - Location of the messge generator script -+# PYTHON_INTERPRETER - Target or path to the python interpreter used -+# PROTOC_EXEC - Protoc target or executable to use - # GZ_PROTOC_PLUGIN - Location of the gazebo generator plugin - # FACTORY_GEN_SCRIPT - Location of the factory generator script - # MSGS_LIB - gz-msgs library to link to -@@ -186,7 +210,7 @@ endfunction() - # that depend on gz-msgs - function(gz_msgs_generate_messages_lib) - set(options "") -- set(oneValueArgs TARGET PROTO_PACKAGE MSGS_GEN_SCRIPT GZ_PROTOC_PLUGIN FACTORY_GEN_SCRIPT MSGS_LIB PROTO_PATH) -+ set(oneValueArgs TARGET PROTO_PACKAGE MSGS_GEN_SCRIPT PYTHON_INTERPRETER PROTOC_EXEC GZ_PROTOC_PLUGIN FACTORY_GEN_SCRIPT MSGS_LIB PROTO_PATH) - set(multiValueArgs INPUT_PROTOS DEPENDENCIES) - - cmake_parse_arguments(generate_messages "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) -@@ -205,9 +229,19 @@ function(gz_msgs_generate_messages_lib) - list(APPEND depends_msgs_desc ${msgs_desc_file}) - endforeach() - -+ # Default values for optional parameters -+ if (NOT DEFINED generate_messages_PYTHON_INTERPRETER) -+ set(generate_messages_PYTHON_INTERPRETER Python3::Interpreter) -+ endif() -+ if (NOT DEFINED generate_messages_PROTOC_EXEC) -+ set(generate_messages_PROTOC_EXEC protobuf::protoc) -+ endif() -+ - gz_msgs_generate_messages_impl( - PROTO_PACKAGE ${generate_messages_PROTO_PACKAGE} - MSGS_GEN_SCRIPT ${generate_messages_MSGS_GEN_SCRIPT} -+ PYTHON_INTERPRETER ${generate_messages_PYTHON_INTERPRETER} -+ PROTOC_EXEC ${generate_messages_PROTOC_EXEC} - GZ_PROTOC_PLUGIN ${generate_messages_GZ_PROTOC_PLUGIN} - FACTORY_GEN_SCRIPT ${generate_messages_FACTORY_GEN_SCRIPT} - PROTO_PATH ${generate_messages_PROTO_PATH} -@@ -221,6 +255,7 @@ function(gz_msgs_generate_messages_lib) - ) - - gz_msgs_generate_desc_impl( -+ PROTOC_EXEC ${generate_messages_PROTOC_EXEC} - INPUT_PROTOS ${generate_messages_INPUT_PROTOS} - PROTO_PATH ${generate_messages_PROTO_PATH} - DEPENDENCY_DESCRIPTIONS ${depends_msgs_desc} -diff --git a/cmake/gz_msgs_protoc.cmake b/cmake/gz_msgs_protoc.cmake -index 077e266c..863d6b64 100644 ---- a/cmake/gz_msgs_protoc.cmake -+++ b/cmake/gz_msgs_protoc.cmake -@@ -4,6 +4,7 @@ - # GENERATE_CPP - generates c++ code for the message if specified - # GENERATE_PYTHON - generates python code for the message if specified - # One value arguments: -+# PYTHON_INTERPRETER - Target or path to the Python interpreter to use to run generation scripts - # MSGS_GEN_SCRIPT - Path to the message generation python script - # PROTO_PACKAGE - Protobuf package the file belongs to (e.g. "gz.msgs") - # PROTOC_EXEC - Path to protoc -@@ -22,6 +23,7 @@ - function(gz_msgs_protoc) - set(options GENERATE_CPP GENERATE_PYTHON) - set(oneValueArgs -+ PYTHON_INTERPRETER - MSGS_GEN_SCRIPT - PROTO_PACKAGE - PROTOC_EXEC -@@ -38,6 +40,13 @@ function(gz_msgs_protoc) - - cmake_parse_arguments(gz_msgs_protoc "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - -+ if (NOT DEFINED gz_msgs_protoc_PYTHON_INTERPRETER) -+ set(gz_msgs_protoc_PYTHON_INTERPRETER Python3::Interpreter) -+ endif() -+ if (NOT DEFINED gz_msgs_protoc_PROTOC_EXEC) -+ set(gz_msgs_protoc_PROTOC_EXEC protobuf::protoc) -+ endif() -+ - get_filename_component(ABS_FIL ${gz_msgs_protoc_INPUT_PROTO} ABSOLUTE) - get_filename_component(FIL_WE ${gz_msgs_protoc_INPUT_PROTO} NAME_WE) - -@@ -85,8 +94,14 @@ function(gz_msgs_protoc) - set(${gz_msgs_protoc_OUTPUT_PYTHON_VAR} ${${gz_msgs_protoc_OUTPUT_PYTHON_VAR}} PARENT_SCOPE) - endif() - -+ if(TARGET ${gz_msgs_protoc_PROTOC_EXEC}) -+ set(gz_msgs_protoc_PROTOC_EXEC_FILE_ABS_PATH "$") -+ else() -+ set(gz_msgs_protoc_PROTOC_EXEC_FILE_ABS_PATH ${gz_msgs_protoc_PROTOC_EXEC}) -+ endif() -+ - set(GENERATE_ARGS -- --protoc-exec "$" -+ --protoc-exec "${gz_msgs_protoc_PROTOC_EXEC_FILE_ABS_PATH}" - --gz-generator-bin "${gz_msgs_protoc_GZ_PROTOC_PLUGIN}" - --proto-path "${gz_msgs_protoc_PROTO_PATH}" - --input-path "${ABS_FIL}" -@@ -118,7 +133,7 @@ function(gz_msgs_protoc) - - add_custom_command( - OUTPUT ${output_files} -- COMMAND Python3::Interpreter -+ COMMAND ${gz_msgs_protoc_PYTHON_INTERPRETER} - ARGS ${gz_msgs_protoc_MSGS_GEN_SCRIPT} ${GENERATE_ARGS} - DEPENDS - ${ABS_FIL} -diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt -index 2bbe9114..3cc7fad8 100644 ---- a/core/CMakeLists.txt -+++ b/core/CMakeLists.txt -@@ -26,13 +26,23 @@ include(${PROJECT_SOURCE_DIR}/cmake/gz_msgs_generate.cmake) - include(${PROJECT_SOURCE_DIR}/cmake/gz_msgs_protoc.cmake) - include(${PROJECT_SOURCE_DIR}/cmake/gz_msgs_string_utils.cmake) - -+if(TARGET ${${PROJECT_NAME}_PROTO_GENERATOR_PLUGIN}) -+ set(${PROJECT_NAME}_PROTO_GENERATOR_PLUGIN_FILE $) -+else() -+ set(${PROJECT_NAME}_PROTO_GENERATOR_PLUGIN_FILE ${${PROJECT_NAME}_PROTO_GENERATOR_PLUGIN}) -+endif() -+ - gz_msgs_generate_messages_impl( - MSGS_GEN_SCRIPT - ${PROJECT_SOURCE_DIR}/tools/gz_msgs_generate.py - FACTORY_GEN_SCRIPT - ${PROJECT_SOURCE_DIR}/tools/gz_msgs_generate_factory.py -+ PYTHON_INTERPRETER -+ ${${PROJECT_NAME}_PYTHON_INTERPRETER} -+ PROTOC_EXEC -+ ${${PROJECT_NAME}_PROTOC_EXECUTABLE} - GZ_PROTOC_PLUGIN -- $ -+ ${${PROJECT_NAME}_PROTO_GENERATOR_PLUGIN_FILE} - INPUT_PROTOS - ${proto_files} - DLLEXPORT_DECL -@@ -54,6 +64,7 @@ gz_msgs_generate_messages_impl( - ) - - gz_msgs_generate_desc_impl( -+ PROTOC_EXEC ${${PROJECT_NAME}_PROTOC_EXECUTABLE} - INPUT_PROTOS ${proto_files} - PROTO_PATH ${PROJECT_SOURCE_DIR}/proto - DEPENDENCY_DESCRIPTIONS ${depends_msgs_desc} -diff --git a/gz-msgs-extras.cmake.in b/gz-msgs-extras.cmake.in -index 914f779a..40d6c913 100644 ---- a/gz-msgs-extras.cmake.in -+++ b/gz-msgs-extras.cmake.in -@@ -28,7 +28,16 @@ set(PROTO_SCRIPT_NAME "@PROJECT_NAME@_generate.py") - set(FACTORY_SCRIPT_NAME "@PROJECT_NAME@_generate_factory.py") - - set(@PROJECT_NAME@_PROTO_PATH ${@PROJECT_NAME@_INSTALL_PATH}/share/protos) --set(@PROJECT_NAME@_PROTO_GENERATOR_PLUGIN ${@PROJECT_NAME@_INSTALL_PATH}/bin/${PROTOC_NAME}) -+# Provide support to override generator executable used during cross-compilation -+if(NOT DEFINED @PROJECT_NAME@_PROTO_GENERATOR_PLUGIN) -+ set(@PROJECT_NAME@_PROTO_GENERATOR_PLUGIN ${@PROJECT_NAME@_INSTALL_PATH}/bin/${PROTOC_NAME}) -+endif() -+if(NOT DEFINED @PROJECT_NAME@_PROTOC_EXECUTABLE) -+ set(@PROJECT_NAME@_PROTOC_EXECUTABLE protobuf::protoc) -+endif() -+if(NOT DEFINED @PROJECT_NAME@_PYTHON_INTERPRETER) -+ set(@PROJECT_NAME@_PYTHON_INTERPRETER Python3::Interpreter) -+endif() - set(@PROJECT_NAME@_PROTO_GENERATOR_SCRIPT ${@PROJECT_NAME@_INSTALL_PATH}/bin/${PROTO_SCRIPT_NAME}) - set(@PROJECT_NAME@_FACTORY_GENERATOR_SCRIPT ${@PROJECT_NAME@_INSTALL_PATH}/bin/${FACTORY_SCRIPT_NAME}) - -@@ -64,6 +73,10 @@ function(gz_msgs_generate_messages) - - cmake_parse_arguments(generate_messages "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - gz_msgs_generate_messages_lib( -+ PYTHON_INTERPRETER -+ ${@PROJECT_NAME@_PYTHON_INTERPRETER} -+ PROTOC_EXEC -+ ${@PROJECT_NAME@_PROTOC_EXECUTABLE} - MSGS_GEN_SCRIPT - ${@PROJECT_NAME@_PROTO_GENERATOR_SCRIPT} - FACTORY_GEN_SCRIPT From 16d31988467bf69e4d6a6a06051855f15cb3db4a Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 27 Sep 2024 14:41:39 +0200 Subject: [PATCH 08/10] Delete recipe/393.patch --- recipe/393.patch | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 recipe/393.patch diff --git a/recipe/393.patch b/recipe/393.patch deleted file mode 100644 index e53e738..0000000 --- a/recipe/393.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e2cc2ab7deb53a9f7e151bad1bd4bb32d4cb18cf Mon Sep 17 00:00:00 2001 -From: Silvio Traversaro -Date: Wed, 4 Oct 2023 13:32:49 +0200 -Subject: [PATCH] Do not redefine GZ_PYTHON_INSTALL_PATH if it is already - defined - -Signed-off-by: Silvio Traversaro ---- - CMakeLists.txt | 18 ++++++++++-------- - 1 file changed, 10 insertions(+), 8 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b3133776..a6c5c418 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -108,16 +108,18 @@ endif() - # Find Python - find_package(Python3 REQUIRED COMPONENTS Interpreter) - --if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION) -- if(USE_DIST_PACKAGES_FOR_PYTHON) -- string(REPLACE "site-packages" "dist-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITELIB}) -+if(NOT GZ_PYTHON_INSTALL_PATH) -+ if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION) -+ if(USE_DIST_PACKAGES_FOR_PYTHON) -+ string(REPLACE "site-packages" "dist-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITELIB}) -+ else() -+ # Python3_SITELIB might use dist-packages in some platforms -+ string(REPLACE "dist-packages" "site-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITELIB}) -+ endif() - else() -- # Python3_SITELIB might use dist-packages in some platforms -- string(REPLACE "dist-packages" "site-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITELIB}) -+ # If not a system installation, respect local paths -+ set(GZ_PYTHON_INSTALL_PATH ${GZ_LIB_INSTALL_DIR}/python) - endif() --else() -- # If not a system installation, respect local paths -- set(GZ_PYTHON_INSTALL_PATH ${GZ_LIB_INSTALL_DIR}/python) - endif() - #============================================================================ - # Configure the build From a011805d9caaa1ef8c87de5bfdf894a61dc7f5f6 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 27 Sep 2024 14:41:48 +0200 Subject: [PATCH 09/10] Delete recipe/394.patch --- recipe/394.patch | 60 ------------------------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 recipe/394.patch diff --git a/recipe/394.patch b/recipe/394.patch deleted file mode 100644 index d5fa3f1..0000000 --- a/recipe/394.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 75c00d73a19b6d841db8dbce003b19b771b9adc7 Mon Sep 17 00:00:00 2001 -From: Silvio Traversaro -Date: Sat, 7 Oct 2023 16:51:18 +0200 -Subject: [PATCH] Ensure that tests pass fine with GZ_RELOCATABLE_INSTALL - option enabled - ---- - core/CMakeLists.txt | 2 ++ - test/integration/CMakeLists.txt | 3 ++- - test/performance/CMakeLists.txt | 3 ++- - test/regression/CMakeLists.txt | 3 ++- - 4 files changed, 8 insertions(+), 3 deletions(-) - -diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt -index 2bbe9114..d9a5bb74 100644 ---- a/core/CMakeLists.txt -+++ b/core/CMakeLists.txt -@@ -129,6 +129,8 @@ gz_build_tests(TYPE UNIT - ${gtest_sources} - LIB_DEPS - TINYXML2::TINYXML2 -+ ENVIRONMENT -+ GZ_MSG_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} - ) - - add_subdirectory(include/gz/msgs) -diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt -index 817c9a2a..f0c85448 100644 ---- a/test/integration/CMakeLists.txt -+++ b/test/integration/CMakeLists.txt -@@ -4,7 +4,8 @@ if (NOT HAVE_GZ_TOOLS) - list(REMOVE_ITEM tests gz_TEST.cc) - endif() - --gz_build_tests(TYPE INTEGRATION SOURCES ${tests} TEST_LIST test_targets) -+gz_build_tests(TYPE INTEGRATION SOURCES ${tests} TEST_LIST test_targets -+ ENVIRONMENT GZ_MSG_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}) - - foreach(test ${test_targets}) - target_link_libraries(${test} ${PROJECT_LIBRARY_TARGET_NAME}) -diff --git a/test/performance/CMakeLists.txt b/test/performance/CMakeLists.txt -index 0a11145c..a6a1be44 100644 ---- a/test/performance/CMakeLists.txt -+++ b/test/performance/CMakeLists.txt -@@ -1,3 +1,4 @@ - gz_get_sources(tests) - --gz_build_tests(TYPE PERFORMANCE SOURCES ${tests}) -+gz_build_tests(TYPE PERFORMANCE SOURCES ${tests} -+ ENVIRONMENT GZ_MSG_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}) -diff --git a/test/regression/CMakeLists.txt b/test/regression/CMakeLists.txt -index 762a0520..134ea124 100644 ---- a/test/regression/CMakeLists.txt -+++ b/test/regression/CMakeLists.txt -@@ -1,3 +1,4 @@ - gz_get_sources(tests) - --gz_build_tests(TYPE REGRESSION SOURCES ${tests}) -+gz_build_tests(TYPE REGRESSION SOURCES ${tests} -+ ENVIRONMENT GZ_MSG_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}) From 632b236cedf87f38a9622d4326a973441cbfdc5b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 27 Sep 2024 14:42:51 +0200 Subject: [PATCH 10/10] Update for gz-msgs11 --- recipe/build_cxx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/build_cxx.sh b/recipe/build_cxx.sh index 4d73edb..8a2e547 100644 --- a/recipe/build_cxx.sh +++ b/recipe/build_cxx.sh @@ -33,7 +33,7 @@ mkdir build_cxx cd build_cxx if [[ "${CONDA_BUILD_CROSS_COMPILATION}" == "1" ]]; then - export CMAKE_ARGS="${CMAKE_ARGS} -Dgz-msgs10_PYTHON_INTERPRETER=$BUILD_PREFIX/bin/python -Dgz-msgs10_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc -Dgz-msgs10_PROTO_GENERATOR_PLUGIN=$BUILD_PREFIX/bin/gz-msgs10_protoc_plugin" + export CMAKE_ARGS="${CMAKE_ARGS} -Dgz-msgs11_PYTHON_INTERPRETER=$BUILD_PREFIX/bin/python -Dgz-msgs11_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc -Dgz-msgs11_PROTO_GENERATOR_PLUGIN=$BUILD_PREFIX/bin/gz-msgs11_protoc_plugin" fi # Set Python install dir to wrong directory to ensure Python files