Install library so into python module dir
We do the same a PySide and install the target library into the python module this. This way the bindings can work without need to export system paths.
This commit is contained in:
committed by
Sergio Martins
parent
dc1e5103e2
commit
1826d68841
@@ -10,9 +10,15 @@
|
||||
#
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
__all__ = ['KDDockWidgets']
|
||||
|
||||
def setupLibraryPath():
|
||||
package_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
if sys.platform == 'win32':
|
||||
os.add_dll_directory(package_dir)
|
||||
|
||||
# Preload PySide libraries to avoid missing libraries while loading KDDockWidgets
|
||||
try:
|
||||
from PySide@PYSIDE_MAJOR_VERSION@ import QtCore
|
||||
@@ -22,3 +28,5 @@ try:
|
||||
except Exception:
|
||||
print("Failed to load PySide")
|
||||
raise
|
||||
|
||||
setupLibraryPath()
|
||||
|
||||
Reference in New Issue
Block a user