aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/__init__.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/PySide2/__init__.py.in')
-rw-r--r--sources/pyside2/PySide2/__init__.py.in29
1 files changed, 9 insertions, 20 deletions
diff --git a/sources/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in
index 77390af46..92e52a81a 100644
--- a/sources/pyside2/PySide2/__init__.py.in
+++ b/sources/pyside2/PySide2/__init__.py.in
@@ -12,31 +12,20 @@ __version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@,
def _setupQtDirectories():
import sys
import os
- from . import _utils
- os.environ["PYSIDE_PACKAGE_DIR"] = os.path.abspath(os.path.dirname(__file__))
+ pyside_package_dir = os.path.abspath(os.path.dirname(__file__))
+ # Used by signature module.
+ os.environ["PYSIDE_PACKAGE_DIR"] = pyside_package_dir
- pysideDir = _utils.get_pyside_dir()
-
- # Register PySide qt.conf to override the built-in
- # configuration variables, if there is no default qt.conf in
- # executable folder
- prefix = pysideDir.replace('\\', '/')
- _utils.register_qt_conf(prefix=prefix,
- binaries=prefix,
- plugins=prefix+"/plugins",
- imports=prefix+"/imports",
- translations=prefix+"/translations")
-
- # On Windows add the PySide\openssl folder (if it exists) to the
- # PATH so the SSL DLLs can be found when Qt tries to dynamically
- # load them. Tell Qt to load them and then reset the PATH.
+ # On Windows add the PySide2\openssl folder (if it exists) to the
+ # PATH so that the SSL DLLs can be found when Qt tries to dynamically
+ # load them. Tell Qt to load them and then reset the PATH.
if sys.platform == 'win32':
- opensslDir = os.path.join(pysideDir, 'openssl')
- if os.path.exists(opensslDir):
+ openssl_dir = os.path.join(pyside_package_dir, 'openssl')
+ if os.path.exists(openssl_dir):
path = os.environ['PATH']
try:
- os.environ['PATH'] = opensslDir + os.pathsep + path
+ os.environ['PATH'] = os.path.join(openssl_dir, path)
try:
from . import QtNetwork
except ImportError: