From 2f2d0b0ac8babde03669126602a51edc5d9bb0eb Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 13 May 2024 16:58:29 +0200 Subject: [PATCH 1/9] Create 1414.patch --- recipe/1414.patch | 366 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 366 insertions(+) create mode 100644 recipe/1414.patch diff --git a/recipe/1414.patch b/recipe/1414.patch new file mode 100644 index 0000000..0291b8b --- /dev/null +++ b/recipe/1414.patch @@ -0,0 +1,366 @@ +From 28a60f8d6db03db213265ee1dfb5a6eaf9c4f7c3 Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Mon, 13 May 2024 16:38:44 +0200 +Subject: [PATCH] Add optional binary relocatability + +Signed-off-by: Silvio Traversaro +--- + CMakeLists.txt | 7 ++ + include/sdf/InstallationDirectories.hh | 40 +++++++ + include/sdf/config.hh.in | 4 +- + src/CMakeLists.txt | 25 ++++ + src/InstallationDirectories.cc | 151 +++++++++++++++++++++++++ + src/SDF.cc | 15 ++- + test/integration/CMakeLists.txt | 1 + + test/performance/CMakeLists.txt | 5 +- + 8 files changed, 240 insertions(+), 8 deletions(-) + create mode 100644 include/sdf/InstallationDirectories.hh + create mode 100644 src/InstallationDirectories.cc + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f771a9c65..d91666603 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,6 +49,13 @@ if (BUILD_SDF) + # Find tinyxml2. + gz_find_package(TINYXML2 REQUIRED) + ++ ################################################# ++ # Find DL if doing relocatable installation ++ if (GZ_ENABLE_RELOCATABLE_INSTALL) ++ gz_find_package(DL REQUIRED) ++ endif() ++ ++ + ################################################ + # Find urdfdom parser. Logic: + # +diff --git a/include/sdf/InstallationDirectories.hh b/include/sdf/InstallationDirectories.hh +new file mode 100644 +index 000000000..be3b0c678 +--- /dev/null ++++ b/include/sdf/InstallationDirectories.hh +@@ -0,0 +1,40 @@ ++/* ++ * Copyright (C) 2024 Open Source Robotics Foundation ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ++ */ ++ ++#ifndef SDF_INSTALLATION_DIRECTORIES_HH_ ++#define SDF_INSTALLATION_DIRECTORIES_HH_ ++ ++#include ++ ++#include ++#include ++ ++namespace sdf ++{ ++ inline namespace SDF_VERSION_NAMESPACE { ++ ++ /// \brief getInstallPrefix return the install prefix of the library ++ /// i.e. CMAKE_INSTALL_PREFIX unless the library has been moved ++ SDFORMAT_VISIBLE std::string getInstallPrefix(); ++ ++ /// \brief getSharePath return the share directory used by sdformat ++ SDFORMAT_VISIBLE std::string getSharePath(); ++ ++ } ++} ++ ++#endif +diff --git a/include/sdf/config.hh.in b/include/sdf/config.hh.in +index 6a32cb8bc..456eb12cc 100644 +--- a/include/sdf/config.hh.in ++++ b/include/sdf/config.hh.in +@@ -48,11 +48,11 @@ + #cmakedefine SDFORMAT_DISABLE_CONSOLE_LOGFILE 1 + + #ifndef SDF_SHARE_PATH +-#define SDF_SHARE_PATH "${CMAKE_INSTALL_FULL_DATAROOTDIR}/" ++#define SDF_SHARE_PATH _Pragma ("GCC warning \"'SDF_SHARE_PATH' macro is deprecated, use sdf::getSharePath() function instead. \"") "${CMAKE_INSTALL_FULL_DATAROOTDIR}/" + #endif + + #ifndef SDF_VERSION_PATH +-#define SDF_VERSION_PATH "${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/${PROJECT_VERSION}" ++#define SDF_VERSION_PATH _Pragma ("GCC warning \"'SDF_VERSION_PATH' macro is deprecated and should not be used. \"") "${CMAKE_INSTALL_FULL_DATAROOTDIR}/sdformat${PROJECT_VERSION_MAJOR}/${PROJECT_VERSION}" + #endif + + #endif // #ifndef SDF_CONFIG_HH_ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index dfd569186..57dab8757 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -23,6 +23,24 @@ gz_create_core_library(SOURCES ${sources} + CXX_STANDARD 17 + LEGACY_PROJECT_PREFIX SDFormat + ) ++gz_add_get_install_prefix_impl(GET_INSTALL_PREFIX_FUNCTION sdf::getInstallPrefix ++ GET_INSTALL_PREFIX_HEADER sdf/InstallationDirectories.hh ++ OVERRIDE_INSTALL_PREFIX_ENV_VARIABLE SDF_INSTALL_PREFIX) ++ ++# CMAKE_INSTALL_DATAROOTDIR may be an absolute path, let's make sure to use the ++# relative version ++if(IS_ABSOLUTE "${CMAKE_INSTALL_DATAROOTDIR}") ++ file(RELATIVE_PATH CMAKE_INSTALL_RELATIVE_DATAROOTDIR "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_DATAROOTDIR}") ++else() ++ set(CMAKE_INSTALL_RELATIVE_DATAROOTDIR "${CMAKE_INSTALL_DATAROOTDIR}") ++endif() ++ ++set_property( ++ SOURCE InstallationDirectories.cc ++ PROPERTY COMPILE_DEFINITIONS ++ CMAKE_INSTALL_RELATIVE_DATAROOTDIR="${CMAKE_INSTALL_RELATIVE_DATAROOTDIR}" ++) ++ + + target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} + PUBLIC +@@ -91,6 +109,11 @@ if (BUILD_TESTING) + -DGZ_SDFORMAT_STATIC_DEFINE + ) + ++ if(WIN32) ++ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} ++ PRIVATE shlwapi) ++ endif() ++ + gz_build_tests( + TYPE UNIT + SOURCES ${gtest_sources} +@@ -99,6 +122,8 @@ if (BUILD_TESTING) + ${PROJECT_SOURCE_DIR}/test + LIB_DEPS + library_for_tests ++ ENVIRONMENT ++ SDF_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} + ) + + if (TARGET UNIT_gz_TEST) +diff --git a/src/InstallationDirectories.cc b/src/InstallationDirectories.cc +new file mode 100644 +index 000000000..167df10eb +--- /dev/null ++++ b/src/InstallationDirectories.cc +@@ -0,0 +1,151 @@ ++/* ++ * Copyright (C) 2024 Open Source Robotics Foundation ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ * ++*/ ++ ++#include ++ ++#include ++#include ++ ++#ifdef _WIN32 ++#include ++#endif ++ ++namespace sdf ++{ ++inline namespace SDF_VERSION_NAMESPACE { ++ ++// We locally import the gz::common::joinPaths function ++// See https://github.com/gazebosim/gz-physics/pull/507#discussion_r1186919267 ++// for more details ++ ++// Function imported from ++// https://github.com/gazebosim/gz-common/blob/ignition-common4_4.6.2/src/FilesystemBoost.cc#L507 ++#ifndef WIN32 ++static const char preferred_separator = '/'; ++#else // Windows ++static const char preferred_separator = '\\'; ++#endif ++const std::string separator(const std::string &_p) ++{ ++ return _p + preferred_separator; ++} ++ ++// Function imported from ++// https://github.com/gazebosim/gz-common/blob/ignition-common4_4.6.2/src/Filesystem.cc#L227 ++std::string checkWindowsPath(const std::string _path) ++{ ++ if (_path.empty()) ++ return _path; ++ ++ // Check if this is a http or https, if so change backslashes generated by ++ // jointPaths to '/' ++ if ((_path.size() > 7 && 0 == _path.compare(0, 7, "http://")) || ++ (_path.size() > 8 && 0 == _path.compare(0, 8, "https://"))) ++ { ++ return std::regex_replace(_path, std::regex(R"(\\)"), "/"); ++ } ++ ++ // This is a Windows path, convert all '/' into backslashes ++ std::string result = std::regex_replace(_path, std::regex(R"(/)"), "\\"); ++ std::string drive_letters; ++ ++ // only Windows contains absolute paths starting with drive letters ++ if (result.length() > 3 && 0 == result.compare(1, 2, ":\\")) ++ { ++ drive_letters = result.substr(0, 3); ++ result = result.substr(3); ++ } ++ result = drive_letters + std::regex_replace( ++ result, std::regex("[<>:\"|?*]"), ""); ++ return result; ++} ++ ++// Function imported from ++// https://github.com/gazebosim/gz-common/blob/ignition-common4_4.6.2/src/Filesystem.cc#L256 ++std::string joinPaths(const std::string &_path1, ++ const std::string &_path2) ++{ ++ ++ /// This function is used to avoid duplicated path separators at the ++ /// beginning/end of the string, and between the two paths being joined. ++ /// \param[in] _path This is the string to sanitize. ++ /// \param[in] _stripLeading True if the leading separator should be ++ /// removed. ++ auto sanitizeSlashes = [](const std::string &_path, ++ bool _stripLeading = false) ++ { ++ // Shortcut ++ if (_path.empty()) ++ return _path; ++ ++ std::string result = _path; ++ ++ // Use the appropriate character for each platform. ++#ifndef _WIN32 ++ char replacement = '/'; ++#else ++ char replacement = '\\'; ++#endif ++ ++ // Sanitize the start of the path. ++ size_t index = 0; ++ size_t leadingIndex = _stripLeading ? 0 : 1; ++ for (; index < result.length() && result[index] == replacement; ++index) ++ { ++ } ++ if (index > leadingIndex) ++ result.erase(leadingIndex, index-leadingIndex); ++ ++ // Sanitize the end of the path. ++ index = result.length()-1; ++ for (; index < result.length() && result[index] == replacement; --index) ++ { ++ } ++ index += 1; ++ if (index < result.length()-1) ++ result.erase(index+1); ++ return result; ++ }; ++ ++ std::string path; ++#ifndef _WIN32 ++ path = sanitizeSlashes(sanitizeSlashes(separator(_path1)) + ++ sanitizeSlashes(_path2, true)); ++#else // _WIN32 ++ std::string path1 = sanitizeSlashes(checkWindowsPath(_path1)); ++ std::string path2 = sanitizeSlashes(checkWindowsPath(_path2), true); ++ std::vector combined(path1.length() + path2.length() + 2); ++ if (::PathCombineA(combined.data(), path1.c_str(), path2.c_str()) != NULL) ++ { ++ path = sanitizeSlashes(checkWindowsPath(std::string(combined.data()))); ++ } ++ else ++ { ++ path = sanitizeSlashes(checkWindowsPath(separator(path1) + path2)); ++ } ++#endif // _WIN32 ++ return path; ++} ++ ++std::string getSharePath() ++{ ++ return sdf::joinPaths( ++ getInstallPrefix(), CMAKE_INSTALL_RELATIVE_DATAROOTDIR); ++} ++ ++} ++} +diff --git a/src/SDF.cc b/src/SDF.cc +index 7a43d0f9a..f3442d6c5 100644 +--- a/src/SDF.cc ++++ b/src/SDF.cc +@@ -28,6 +28,7 @@ + #include "sdf/Assert.hh" + #include "sdf/Console.hh" + #include "sdf/Filesystem.hh" ++#include "sdf/InstallationDirectories.hh" + #include "sdf/SDFImpl.hh" + #include "SDFImplPrivate.hh" + #include "sdf/sdf_config.h" +@@ -45,11 +46,15 @@ std::string SDF::version = SDF_VERSION; // NOLINT(runtime/string) + + std::string sdfSharePath() + { +-#ifdef SDF_SHARE_PATH +- if (std::string(SDF_SHARE_PATH) != "/") +- return SDF_SHARE_PATH; +-#endif +- return ""; ++ std::string sharePath = sdf::getSharePath(); ++ if (sharePath != "/") ++ { ++ return sharePath; ++ } ++ else ++ { ++ return ""; ++ } + } + + ///////////////////////////////////////////////// +diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt +index b7d846e95..e7e4b2c93 100644 +--- a/test/integration/CMakeLists.txt ++++ b/test/integration/CMakeLists.txt +@@ -77,6 +77,7 @@ endif() + gz_build_tests(TYPE ${TEST_TYPE} + SOURCES ${tests} + INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/test ++ ENVIRONMENT SDF_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} + ) + + +diff --git a/test/performance/CMakeLists.txt b/test/performance/CMakeLists.txt +index c809bf32e..fe3e17931 100644 +--- a/test/performance/CMakeLists.txt ++++ b/test/performance/CMakeLists.txt +@@ -4,4 +4,7 @@ set(tests + parser_urdf.cc + ) + +-gz_build_tests(TYPE ${TEST_TYPE} SOURCES ${tests} INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/test) ++gz_build_tests(TYPE ${TEST_TYPE} ++ SOURCES ${tests} ++ INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/test ++ ENVIRONMENT SDF_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}) From f8b6725cfd4f86278e2641f41e6c7a5f661bfafe Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 13 May 2024 17:04:18 +0200 Subject: [PATCH 2/9] Fix non-relocatability --- recipe/meta.yaml | 4 +++- recipe/sphere.sdf | 40 ++++++++++++++++++++++++++++++++++++++++ recipe/test_sdformat.py | 20 ++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 recipe/sphere.sdf create mode 100644 recipe/test_sdformat.py diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f170458..97eb13c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,9 +15,10 @@ source: patches: - standalone_bindings.patch - standalone_bindings_tests.patch + - 1414.patch build: - number: 0 + number: 1 outputs: @@ -84,6 +85,7 @@ outputs: test: commands: - pip check + - python test_sdformat.py requires: - pip imports: diff --git a/recipe/sphere.sdf b/recipe/sphere.sdf new file mode 100644 index 0000000..b0c6488 --- /dev/null +++ b/recipe/sphere.sdf @@ -0,0 +1,40 @@ + + + + + 0 1.5 0.5 0 0 0 + + + + 3 + 0 + 0 + 3 + 0 + 3 + + 3.0 + + + + + 0.5 + + + + + + + 0.5 + + + + 0 0 1 1 + 0 0 1 1 + 0 0 1 1 + + + + + + diff --git a/recipe/test_sdformat.py b/recipe/test_sdformat.py new file mode 100644 index 0000000..b8ac45e --- /dev/null +++ b/recipe/test_sdformat.py @@ -0,0 +1,20 @@ +import sdformat14 as sdf + +root = sdf.Root() +root.load("sphere2.sdf") + +for world_index in range(root.world_count()): + world = root.world_by_index(world_index) + print(world.name()) + for model_index in range(world.model_count()): + model = world.model_by_index(model_index) + print("\tModel: ", model.name()) + for link_index in range(model.link_count()): + link = model.link_by_index(link_index) + print("\t\tLink: ", link.name()) + for collision_index in range(link.collision_count()): + collision = link.collision_by_index(collision_index) + print("\t\t\tCollision: ", collision.name()) + for visual_index in range(link.collision_count()): + visual = link.visual_by_index(visual_index) + print("\t\t\tVisual: ", visual.name()) From 079fa7594912a05eac7011b577b0e62f93106376 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 13 May 2024 17:09:16 +0200 Subject: [PATCH 3/9] Enable GZ_ENABLE_RELOCATABLE_INSTALL option --- recipe/bld_cxx.bat | 1 + recipe/build_cxx.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/recipe/bld_cxx.bat b/recipe/bld_cxx.bat index 782e471..1e83ed9 100644 --- a/recipe/bld_cxx.bat +++ b/recipe/bld_cxx.bat @@ -16,6 +16,7 @@ cmake ^ -DUSE_INTERNAL_URDF=OFF ^ -DSKIP_usd=true ^ -DSKIP_PYBIND11:BOOL=ON ^ + -DGZ_ENABLE_RELOCATABLE_INSTALL:BOOL=ON ^ %SRC_DIR% if errorlevel 1 exit 1 diff --git a/recipe/build_cxx.sh b/recipe/build_cxx.sh index 01ca4b3..78f224f 100644 --- a/recipe/build_cxx.sh +++ b/recipe/build_cxx.sh @@ -23,6 +23,7 @@ cmake ${CMAKE_ARGS} .. \ -DBUILD_TESTING=$BUILD_TESTING \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DSKIP_PYBIND11:BOOL=ON \ + -DGZ_ENABLE_RELOCATABLE_INSTALL:BOOL=ON \ -DRUBY=$BUILD_PREFIX/bin/ruby cmake --build . --config Release -- -j$CPU_COUNT From 35576b63c6d1b9b156dd9f3cb240ab7b80918be4 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 15:13:59 +0000 Subject: [PATCH 4/9] MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.35.1, and conda-forge-pinning 2024.05.13.13.50.55 --- .azure-pipelines/azure-pipelines-osx.yml | 2 +- .ci_support/linux_64_.yaml | 6 ------ .ci_support/linux_aarch64_.yaml | 6 ------ .ci_support/linux_ppc64le_.yaml | 6 ------ .ci_support/osx_64_.yaml | 6 +----- .ci_support/osx_arm64_.yaml | 4 ---- .ci_support/win_64_.yaml | 2 -- 7 files changed, 2 insertions(+), 30 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 730a626..7708e23 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,7 +5,7 @@ jobs: - job: osx pool: - vmImage: macOS-11 + vmImage: macOS-12 strategy: matrix: osx_64_: diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index de68040..cca2ca6 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -2,10 +2,6 @@ c_compiler: - gcc c_compiler_version: - '12' -c_stdlib: -- sysroot -c_stdlib_version: -- '2.12' cdt_name: - cos6 channel_sources: @@ -40,5 +36,3 @@ urdfdom: zip_keys: - - c_compiler_version - cxx_compiler_version -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 4d18f21..3e05e96 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -4,10 +4,6 @@ c_compiler: - gcc c_compiler_version: - '12' -c_stdlib: -- sysroot -c_stdlib_version: -- '2.17' cdt_arch: - aarch64 cdt_name: @@ -44,5 +40,3 @@ urdfdom: zip_keys: - - c_compiler_version - cxx_compiler_version -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 9f1ac9e..1a5f08b 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -2,10 +2,6 @@ c_compiler: - gcc c_compiler_version: - '12' -c_stdlib: -- sysroot -c_stdlib_version: -- '2.17' cdt_name: - cos7 channel_sources: @@ -40,5 +36,3 @@ urdfdom: zip_keys: - - c_compiler_version - cxx_compiler_version -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 33d56de..5a3525c 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -1,13 +1,9 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' c_compiler: - clang c_compiler_version: - '16' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '10.9' channel_sources: - conda-forge channel_targets: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 9a24bd2..9b68edb 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -4,10 +4,6 @@ c_compiler: - clang c_compiler_version: - '16' -c_stdlib: -- macosx_deployment_target -c_stdlib_version: -- '11.0' channel_sources: - conda-forge channel_targets: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index c3e1bc9..05fd89e 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -1,7 +1,5 @@ c_compiler: - vs2019 -c_stdlib: -- vs channel_sources: - conda-forge channel_targets: From 1964f37027c9733474857f0fd7d57fe35a55452b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 13 May 2024 17:27:49 +0200 Subject: [PATCH 5/9] Update conda-forge.yml --- conda-forge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda-forge.yml b/conda-forge.yml index 49c6331..6ced38c 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -17,3 +17,4 @@ provider: linux_aarch64: default linux_ppc64le: default test: native_and_emulated +conda_build_tool: conda-build+classic From 5a6ac976aa0b6aee89a495c600497e69b7e62ef4 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 15:30:03 +0000 Subject: [PATCH 6/9] MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.35.1, and conda-forge-pinning 2024.05.13.13.50.55 --- .scripts/build_steps.sh | 2 +- .scripts/run_osx_build.sh | 2 +- .scripts/run_win_build.bat | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 899ba03..9018ffc 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -68,7 +68,7 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + CONDA_SOLVER=classic conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 07dff21..fb5d314 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -81,7 +81,7 @@ else EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi - conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ + CONDA_SOLVER=classic conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index 6d54697..66504f0 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -55,6 +55,7 @@ call :end_group :: Build the recipe echo Building recipe +set "CONDA_SOLVER=classic" conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% if !errorlevel! neq 0 exit /b !errorlevel! From ee31dbf4e8d5b66971f67d4d40372f2bb6c3584b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 13 May 2024 19:05:26 +0200 Subject: [PATCH 7/9] Update meta.yaml --- recipe/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 97eb13c..656a7b2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -83,6 +83,9 @@ outputs: - python - gz-math7-python test: + files: + - sphere.sdf + - test_sdformat.py commands: - pip check - python test_sdformat.py From 0a0b25b460652fa4f374be700ef157721842b999 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 13 May 2024 22:57:51 +0200 Subject: [PATCH 8/9] Fix test --- recipe/meta.yaml | 1 + recipe/test_sdformat.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 656a7b2..6603e4a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -77,6 +77,7 @@ outputs: - pybind11 - pybind11-abi - pytest + - libgz-math7 - gz-math7-python run: - {{ pin_subpackage(cxx_name, exact=True) }} diff --git a/recipe/test_sdformat.py b/recipe/test_sdformat.py index b8ac45e..e8aa0e7 100644 --- a/recipe/test_sdformat.py +++ b/recipe/test_sdformat.py @@ -1,7 +1,7 @@ import sdformat14 as sdf root = sdf.Root() -root.load("sphere2.sdf") +root.load("sphere.sdf") for world_index in range(root.world_count()): world = root.world_by_index(world_index) From 97890cd962d21930f9896fb0ccb2806d9f9ccc67 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 13 May 2024 23:03:53 +0200 Subject: [PATCH 9/9] Update meta.yaml --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6603e4a..bee27b3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -44,7 +44,7 @@ outputs: - libgz-utils2 - urdfdom - tinyxml2 - + - dlfcn-win32 # [win] test: commands: - test -f ${PREFIX}/include/gz/sdformat{{ version.split('.')[0] }}/sdf/sdf.hh # [not win]