From ba85d7c371516a7ce52e0aa6a1627ec659e3eebf Mon Sep 17 00:00:00 2001 From: Wolfgang Merkt Date: Sun, 26 May 2024 17:19:41 +0100 Subject: [PATCH] [exotica_python] Fail nicely when pip installed trimesh isnt available pip keys cannot be used for release on the buildfarm, hence we fail with a warning when trimesh cannot be found. Also comments the key from package.xml to make release builds possible. --- exotica_python/package.xml | 8 ++++++-- exotica_python/test/test_mesh.py | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/exotica_python/package.xml b/exotica_python/package.xml index c0b091c72..786500da8 100644 --- a/exotica_python/package.xml +++ b/exotica_python/package.xml @@ -20,6 +20,10 @@ python3-pyassimp python3-tk python3-rospkg - python-trimesh-pip - python3-trimesh-pip + + diff --git a/exotica_python/test/test_mesh.py b/exotica_python/test/test_mesh.py index f7034d5c4..1996427f7 100644 --- a/exotica_python/test/test_mesh.py +++ b/exotica_python/test/test_mesh.py @@ -1,7 +1,12 @@ import unittest import pyexotica as exo -import trimesh +try: + import trimesh +except ImportError: + import warnings + warnings.warn("trimesh not found, skipping test") + exit() def validate_mesh(mesh): print(mesh, mesh.vertex_count, mesh.triangle_count)