diff options
Diffstat (limited to 'sources/shiboken2/libshiboken/embed/signature_bootstrap.py')
-rw-r--r-- | sources/shiboken2/libshiboken/embed/signature_bootstrap.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/shiboken2/libshiboken/embed/signature_bootstrap.py b/sources/shiboken2/libshiboken/embed/signature_bootstrap.py index b7d9d2793..dd8df2b63 100644 --- a/sources/shiboken2/libshiboken/embed/signature_bootstrap.py +++ b/sources/shiboken2/libshiboken/embed/signature_bootstrap.py @@ -110,8 +110,11 @@ def bootstrap(): rp = os.path.realpath(os.path.dirname(root.__file__)) # This can be the shiboken2 directory or the binary module, so search. look_for = os.path.join("files.dir", "shibokensupport", "signature", "loader.py") - while len(rp) > 3 and not os.path.exists(os.path.join(rp, look_for)): - rp = os.path.abspath(os.path.join(rp, "..")) + while not os.path.exists(os.path.join(rp, look_for)): + dir = os.path.dirname(rp) + if dir == rp: # Hit root, '/', 'C:\', '\\server\share' + break + rp = dir # Here we decide if we work embedded or not. embedding_var = "pyside_uses_embedding" |