From 0ff88ea97b8c504c88ea2ee38d5ec2d96fe45b2e Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Thu, 21 Jun 2018 15:39:10 -0700 Subject: [PATCH] break install-time import dep --- tools/odrive/__init__.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/odrive/__init__.py b/tools/odrive/__init__.py index 6b373112..f962cc9d 100644 --- a/tools/odrive/__init__.py +++ b/tools/odrive/__init__.py @@ -5,9 +5,14 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname( os.path.dirname(os.path.realpath(__file__)))), "Firmware", "fibre", "python")) -import fibre -find_any = fibre.find_any -find_all = fibre.find_all +# Syntactic sugar to make usage more intuative. +# Try/pass used to break install-time dep issues +try: + import fibre + find_any = fibre.find_any + find_all = fibre.find_all +except: + pass # Standard convention is to add a __version__ attribute to the package from .version import get_version_str