From acfeb5db59d2f5e9a7f5c26e2018fb720479e6f9 Mon Sep 17 00:00:00 2001 From: Nicholas Lundgaard Date: Fri, 2 Sep 2022 17:19:57 -0500 Subject: [PATCH] Fix loading gerbv on Linux **Problem** On modern ubuntu, and probably many other Linux distributions, the `gerbv` DLL is *not* in `/usr/local/lib/`. For example, for me, it is at `/usr/lib/x86_64-linux-gnu/libgerbv.so.1`. This was hard-coded for some reason in 1288e132f753ce71472eb396a2e1aea6076add23, but the real fix for the problem was in ea39c5552febf6dfc050c91e4643b228a3912308, raising an exception when the library can't be identified. If it was identified, hardcoding the path is unlikely to help, and very likely to break things, as it does for me. This change makes the library load correctly on linux. --- pygerbv/gerbv.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pygerbv/gerbv.py b/pygerbv/gerbv.py index d95c5db..b2490a9 100644 --- a/pygerbv/gerbv.py +++ b/pygerbv/gerbv.py @@ -13,8 +13,6 @@ library_path = find_library('gerbv') if not library_path: raise ModuleNotFoundError -if platform.system() == 'Linux': - _libgerbv = CDLL('/usr/local/lib/' + library_path) else: _libgerbv = CDLL(library_path)