Skip to content

Commit 69a660d

Browse files
committed
fixup pyside6 imoprt hack
1 parent 86e5731 commit 69a660d

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

qt/src/toga_qt/factory.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1+
# ruff: noqa: E402
2+
3+
import site
4+
import sys
5+
6+
7+
def import_pyside6():
8+
"""Temporarily break isolation to import system PySide6."""
9+
system_site = site.getsitepackages()
10+
print(system_site)
11+
old_path = sys.path.copy()
12+
sys.path.extend(system_site)
13+
import PySide6 # noqa
14+
15+
sys.path = old_path
16+
17+
18+
import_pyside6()
19+
120
from toga import NotImplementedWarning
221

3-
from . import (
4-
dialogs, # noqa
5-
initialization, # noqa: F401
6-
)
22+
from . import dialogs
723
from .app import App
824
from .command import Command
925
from .container import Container

0 commit comments

Comments
 (0)