aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/__init__.py.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-02-22 13:13:27 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-02-22 13:43:53 +0000
commit87e85c46052f849ba059eba1979092e66c57faad (patch)
treecc41acd2661c7d844265d17a680c501e57aa45c8 /sources/pyside2/PySide2/__init__.py.in
parent910759562818542c6e1f2d134d783807b45e09da (diff)
Remove _utils.py module from package
In Qt4 days, _utils.py was used to register a custom qt.conf file into the Qt Resource System, which contained a Prefix (and other locations like binaries / QML imports) so that QtCore can find the correct location of the QPA plugin, and all other requirements. The code was not adopted to work for Qt5, and was silently failing without doing anything. It is not needed anymore though, since the qt.conf registration is now done in C++ in libpyside shared library, since the commit e455d995be989cbdfef2bcd54fd7057a9b036b52 . Thus remove the _util.py file, and adjust __init__.py accordingly. Task-number: PYSIDE-600 Change-Id: I76e3ea442a6e9b9df4996e628ffffcc7384b7f82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
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: