__all__ = list("Qt" + body for body in "@all_module_shortnames@" .split(";")) __version__ = "@FINAL_PACKAGE_VERSION@" __version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_PRE_RELEASE_VERSION_TYPE@", "@BINDING_API_PRE_RELEASE_VERSION@") @PYSIDE_BUILD_DATE@ @PYSIDE_BUILD_COMMIT_DATE@ @PYSIDE_BUILD_COMMIT_HASH@ @PYSIDE_BUILD_COMMIT_HASH_DESCRIBED@ # Timestamp used for snapshot build, which is part of snapshot package version. @PYSIDE_SETUP_PY_PACKAGE_TIMESTAMP_ASSIGNMENT@ def _setupQtDirectories(): import sys import os pyside_package_dir = os.path.abspath(os.path.dirname(__file__)) # Used by signature module. os.environ["PYSIDE_PACKAGE_DIR"] = pyside_package_dir if sys.platform == 'win32': # PATH has to contain the package directory, otherwise plugins # won't be able to find their required Qt libraries (e.g. the # svg image plugin won't find Qt5Svg.dll). os.environ['PATH'] = pyside_package_dir + os.pathsep + os.environ['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. openssl_dir = os.path.join(pyside_package_dir, 'openssl') if os.path.exists(openssl_dir): path = os.environ['PATH'] try: os.environ['PATH'] = openssl_dir + os.pathsep + path try: from . import QtNetwork except ImportError: pass else: QtNetwork.QSslSocket.supportsSsl() finally: os.environ['PATH'] = path _setupQtDirectories()