From 8d2daaf7b18f94a42dae04df7e495ae08e24683e Mon Sep 17 00:00:00 2001 From: auphelia Date: Mon, 14 Oct 2024 13:50:26 +0100 Subject: [PATCH] [pyxsi] Make pyxsi import optional to allow GHA to work without installation --- src/finn/util/pyxsi_rpcclient.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/finn/util/pyxsi_rpcclient.py b/src/finn/util/pyxsi_rpcclient.py index 650e7a263..29cb07722 100644 --- a/src/finn/util/pyxsi_rpcclient.py +++ b/src/finn/util/pyxsi_rpcclient.py @@ -27,13 +27,17 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import os -import pyxsi_utils import subprocess import xmlrpc.client from time import sleep from finn.util.basic import get_finn_root, get_vivado_root +try: + import pyxsi_utils +except ModuleNotFoundError: + pyxsi_utils = None + def compile_sim_obj(top_module_name, source_list, sim_out_dir): # compile_sim_obj does not require special envvar settings and is safe to call