aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/embed/signature_bootstrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/libshiboken/embed/signature_bootstrap.py')
-rw-r--r--sources/shiboken2/libshiboken/embed/signature_bootstrap.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sources/shiboken2/libshiboken/embed/signature_bootstrap.py b/sources/shiboken2/libshiboken/embed/signature_bootstrap.py
index eb182d8c4..dd8df2b63 100644
--- a/sources/shiboken2/libshiboken/embed/signature_bootstrap.py
+++ b/sources/shiboken2/libshiboken/embed/signature_bootstrap.py
@@ -73,7 +73,7 @@ def bootstrap():
if recursion_trap:
# we are probably called from outside, already
print("Recursion occurred in Bootstrap. Did you start by hand? Then it's ok.")
- print("But you should trigger start by 'type.__signature__', only!")
+ print("But you should trigger start by '_init_pyside_extension()', only!")
recursion_trap += 1
@contextmanager
@@ -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"