From 72858afaf3723d2b457498f216dc655061d3167a Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 26 Apr 2021 20:55:04 +0100 Subject: [PATCH] Fix `library_path` import This is needed (at least) when one customises the Python bindings installation directory using `PYTHON_LIB_INSTALL_DIR`. Since the `library_path` module will also be installed into the same directory as `stp.py`, this change should be safe to make even when one uses the default `PYTHON_LIB_INSTALL_DIR`. I moved this line up with the other imports because my linter was complaining about its location, but I don't mind moving it back to where it was originally. See #353 and #400. --- bindings/python/stp/stp.py.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bindings/python/stp/stp.py.in b/bindings/python/stp/stp.py.in index 61aef6df..2a42fa67 100644 --- a/bindings/python/stp/stp.py.in +++ b/bindings/python/stp/stp.py.in @@ -31,6 +31,7 @@ from ctypes import c_char_p, c_void_p, c_int32, c_uint32, c_uint64, c_ulong, c_b import inspect import os.path import sys +from stp.library_path import PATHS __all__ = [ 'Expr', 'Solver', 'stp', 'add', 'bitvec', 'bitvecs', 'check', 'model', @@ -42,8 +43,6 @@ Py3 = sys.version_info >= (3, 0, 0) if Py3: long = int -from library_path import PATHS - for path in PATHS: if not os.path.exists(path): continue