aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_scripts/main.py126
-rw-r--r--build_scripts/platforms/linux.py1
-rw-r--r--build_scripts/qtinfo.py128
-rw-r--r--build_scripts/utils.py116
-rw-r--r--sources/pyside2/CMakeLists.txt2
-rw-r--r--sources/pyside2/PySide2/QtScxml/CMakeLists.txt60
-rw-r--r--sources/pyside2/PySide2/QtScxml/typesystem_scxml.xml71
-rw-r--r--sources/pyside2/PySide2/support/signature/PSF-3.6.2.txt43
-rw-r--r--sources/pyside2/PySide2/support/signature/qt_attribution.json5
-rw-r--r--sources/pyside2/doc/_templates/index.html120
-rw-r--r--sources/pyside2/doc/conf.py.in2
-rw-r--r--sources/pyside2/doc/index.rst3
-rw-r--r--sources/pyside2/doc/qtmodules/pyside-qtscxml.qdocconf.in3
-rw-r--r--sources/pyside2/tests/QtScxml/CMakeLists.txt1
-rw-r--r--sources/pyside2/tests/QtScxml/test_dynamic.py53
-rw-r--r--sources/pyside2/tests/QtScxml/trafficlight.scxml89
-rw-r--r--sources/shiboken2/CMakeLists.txt4
-rw-r--r--testing/runner.py18
18 files changed, 524 insertions, 321 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index b22249abb..26fc191c5 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -74,7 +74,7 @@ def get_package_version():
return final_version
# Buildable extensions.
-containedModules = ['shiboken2', 'pyside2', 'pyside2-tools']
+contained_modules = ['shiboken2', 'pyside2', 'pyside2-tools']
# Git submodules: ["submodule_name",
# "location_relative_to_sources_folder"]
@@ -122,7 +122,7 @@ except ImportError:
pass
from .qtinfo import QtInfo
-from .utils import rmtree, detectClang, copyfile, copydir, run_process_output, run_process
+from .utils import rmtree, detect_clang, copyfile, copydir, run_process_output, run_process
from .utils import update_env_path, init_msvc_env, filter_match, macos_fix_rpaths_for_library
from .platforms.unix import prepare_packages_posix
from .platforms.windows_desktop import prepare_packages_win32
@@ -148,7 +148,7 @@ def check_allowed_python_version():
check_allowed_python_version()
-qtSrcDir = ''
+qt_src_dir = ''
# This is used automatically by distutils.command.install object, to
# specify final installation location.
@@ -225,9 +225,9 @@ def is_debug_python():
# Return a prefix suitable for the _install/_build directory
def prefix():
- virtualEnvName = os.environ.get('VIRTUAL_ENV', None)
- if virtualEnvName is not None:
- name = os.path.basename(virtualEnvName)
+ virtual_env_name = os.environ.get('VIRTUAL_ENV', None)
+ if virtual_env_name is not None:
+ name = os.path.basename(virtual_env_name)
else:
name = "pyside"
name += str(sys.version_info[0])
@@ -238,14 +238,14 @@ def prefix():
return name
# Initialize, pull and checkout submodules
-def prepareSubModules():
+def prepare_sub_modules():
print("Initializing submodules for PySide2 version: {}".format(
get_package_version()))
submodules_dir = os.path.join(setup_script_dir, "sources")
# Create list of [name, desired branch, absolute path, desired
# branch] and determine whether all submodules are present
- needInitSubModules = False
+ need_init_sub_modules = False
for m in submodules:
module_name = m[0]
@@ -253,10 +253,10 @@ def prepareSubModules():
module_dir = os.path.join(submodules_dir, module_dir, module_name)
# Check for non-empty directory (repository checked out)
if not os.listdir(module_dir):
- needInitSubModules = True
+ need_init_sub_modules = True
break
- if needInitSubModules:
+ if need_init_sub_modules:
git_update_cmd = ["git", "submodule", "update", "--init"]
if run_process(git_update_cmd) != 0:
m = ("Failed to initialize the git submodules: "
@@ -294,10 +294,10 @@ def get_qt_version():
return qt_version
-def prepareBuild():
+def prepare_build():
if (os.path.isdir(".git") and not OPTION_IGNOREGIT and
not OPTION_ONLYPACKAGE and not OPTION_REUSE_BUILD):
- prepareSubModules()
+ prepare_sub_modules()
# Clean up temp and package folders
for n in [pyside_package_dir_name, "build"]:
d = os.path.join(setup_script_dir, n)
@@ -317,17 +317,17 @@ def prepareBuild():
os.makedirs(pkg_dir)
# locate Qt sources for the documentation
if OPTION_QT_SRC is None:
- installPrefix = qtinfo.prefix_dir
- if installPrefix:
- global qtSrcDir
+ install_prefix = qtinfo.prefix_dir
+ if install_prefix:
+ global qt_src_dir
# In-source, developer build
- if installPrefix.endswith("qtbase"):
- qtSrcDir = installPrefix
+ if install_prefix.endswith("qtbase"):
+ qt_src_dir = install_prefix
else: # SDK: Use 'Src' directory
- qtSrcDir = os.path.join(os.path.dirname(installPrefix),
+ qt_src_dir = os.path.join(os.path.dirname(install_prefix),
'Src', 'qtbase')
-class pyside_install(_install):
+class PysideInstall(_install):
def __init__(self, *args, **kwargs):
_install.__init__(self, *args, **kwargs)
@@ -352,7 +352,7 @@ class pyside_install(_install):
_install.run(self)
log.info('*** Install completed')
-class pyside_develop(_develop):
+class PysideDevelop(_develop):
def __init__(self, *args, **kwargs):
_develop.__init__(self, *args, **kwargs)
@@ -361,7 +361,7 @@ class pyside_develop(_develop):
self.run_command("build")
_develop.run(self)
-class pyside_bdist_egg(_bdist_egg):
+class PysideBdistEgg(_bdist_egg):
def __init__(self, *args, **kwargs):
_bdist_egg.__init__(self, *args, **kwargs)
@@ -370,7 +370,7 @@ class pyside_bdist_egg(_bdist_egg):
self.run_command("build")
_bdist_egg.run(self)
-class pyside_build_ext(_build_ext):
+class PysideBuildExt(_build_ext):
def __init__(self, *args, **kwargs):
_build_ext.__init__(self, *args, **kwargs)
@@ -379,7 +379,7 @@ class pyside_build_ext(_build_ext):
pass
if wheel_module_exists:
- class pyside_build_wheel(_bdist_wheel):
+ class PysideBuildWheel(_bdist_wheel):
def __init__(self, *args, **kwargs):
_bdist_wheel.__init__(self, *args, **kwargs)
@@ -405,13 +405,13 @@ if wheel_module_exists:
# Override the platform name to contain the correct
# minimum deployment target.
# This is used in the final wheel name.
- self.plat_name = pyside_build.macos_plat_name()
+ self.plat_name = PysideBuild.macos_plat_name()
_bdist_wheel.finalize_options(self)
# pyside_build_py and pyside_install_lib are reimplemented to preserve
# symlinks when distutils / setuptools copy files to various
# directories through the different build stages.
-class pyside_build_py(_build_py):
+class PysideBuildPy(_build_py):
def __init__(self, *args, **kwargs):
_build_py.__init__(self, *args, **kwargs)
@@ -427,7 +427,7 @@ class pyside_build_py(_build_py):
# Using our own copyfile makes sure to preserve symlinks.
copyfile(srcfile, target)
-class pyside_install_lib(_install_lib):
+class PysideInstallLib(_install_lib):
def __init__(self, *args, **kwargs):
_install_lib.__init__(self, *args, **kwargs)
@@ -448,7 +448,7 @@ class pyside_install_lib(_install_lib):
return
return outfiles
-class pyside_build(_build):
+class PysideBuild(_build):
def __init__(self, *args, **kwargs):
_build.__init__(self, *args, **kwargs)
@@ -456,7 +456,7 @@ class pyside_build(_build):
def finalize_options(self):
os_name_backup = os.name
if sys.platform == 'darwin':
- self.plat_name = pyside_build.macos_plat_name()
+ self.plat_name = PysideBuild.macos_plat_name()
# This is a hack to circumvent the dubious check in
# distutils.commands.build -> finalize_options, which only
# allows setting the plat_name for windows NT.
@@ -489,7 +489,7 @@ class pyside_build(_build):
self.build_tests = False
def run(self):
- prepareBuild()
+ prepare_build()
platform_arch = platform.architecture()[0]
log.info("Python architecture is {}".format(platform_arch))
@@ -567,17 +567,17 @@ class pyside_build(_build):
else:
py_include_dir = os.path.join(py_prefix,
"include/python{}".format(py_version))
- dbgPostfix = ""
+ dbg_postfix = ""
if build_type == "Debug":
- dbgPostfix = "_d"
+ dbg_postfix = "_d"
if sys.platform == "win32":
if OPTION_MAKESPEC == "mingw":
static_lib_name = "libpython{}{}.a".format(
- py_version.replace(".", ""), dbgPostfix)
+ py_version.replace(".", ""), dbg_postfix)
py_library = os.path.join(py_libdir, static_lib_name)
else:
python_lib_name = "python{}{}.lib".format(
- py_version.replace(".", ""), dbgPostfix)
+ py_version.replace(".", ""), dbg_postfix)
py_library = os.path.join(py_libdir, python_lib_name)
else:
lib_exts = ['.so']
@@ -593,13 +593,13 @@ class pyside_build(_build):
# static library as last gasp
lib_exts.append('.a')
- if sys.version_info[0] == 2 and dbgPostfix:
+ if sys.version_info[0] == 2 and dbg_postfix:
# For Python2 add a duplicate set of extensions
- # combined with the dbgPostfix, so we test for both the
+ # combined with the dbg_postfix, so we test for both the
# debug version of the lib and the normal one.
# This allows a debug PySide2 to be built with a
# non-debug Python.
- lib_exts = [dbgPostfix + e for e in lib_exts] + lib_exts
+ lib_exts = [dbg_postfix + e for e in lib_exts] + lib_exts
python_library_found = False
libs_tried = []
@@ -669,24 +669,24 @@ class pyside_build(_build):
qt_version = get_qt_version()
# Update the PATH environment variable
- additionalPaths = [py_scripts_dir, qt_dir]
+ additional_paths = [py_scripts_dir, qt_dir]
# Add Clang to path for Windows.
# Revisit once Clang is bundled with Qt.
if (sys.platform == "win32" and
LooseVersion(self.qtinfo.version) >= LooseVersion("5.7.0")):
- clangDir = detectClang()
- if clangDir[0]:
- clangBinDir = os.path.join(clangDir[0], 'bin')
+ clang_dir = detect_clang()
+ if clang_dir[0]:
+ clangBinDir = os.path.join(clang_dir[0], 'bin')
if not clangBinDir in os.environ.get('PATH'):
log.info("Adding {} as detected by {} to PATH".format(
- clangBinDir, clangDir[1]))
- additionalPaths.append(clangBinDir)
+ clangBinDir, clang_dir[1]))
+ additional_paths.append(clangBinDir)
else:
raise DistutilsSetupError("Failed to detect Clang when checking "
"LLVM_INSTALL_DIR, CLANG_INSTALL_DIR, llvm-config")
- update_env_path(additionalPaths)
+ update_env_path(additional_paths)
build_name = "py{}-qt{}-{}-{}".format(py_version, qt_version,
platform.architecture()[0], build_type.lower())
@@ -784,7 +784,7 @@ class pyside_build(_build):
log.info("OpenSSL dll directory: {}".format(OPTION_OPENSSL))
if sys.platform == 'darwin':
pyside_macos_deployment_target = (
- pyside_build.macos_pyside_min_deployment_target()
+ PysideBuild.macos_pyside_min_deployment_target()
)
log.info("MACOSX_DEPLOYMENT_TARGET set to: {}".format(
pyside_macos_deployment_target))
@@ -803,7 +803,7 @@ class pyside_build(_build):
if not OPTION_ONLYPACKAGE:
# Build extensions
- for ext in containedModules:
+ for ext in contained_modules:
self.build_extension(ext)
if OPTION_BUILDTESTS:
@@ -854,7 +854,7 @@ class pyside_build(_build):
Otherwise use the maximum of the above mentioned two values.
"""
python_target = get_config_var('MACOSX_DEPLOYMENT_TARGET') or None
- qt_target = pyside_build.macos_qt_min_deployment_target()
+ qt_target = PysideBuild.macos_qt_min_deployment_target()
setup_target = OPTION_MACOS_DEPLOYMENT_TARGET
qt_target_split = [int(x) for x in qt_target.split('.')]
@@ -889,7 +889,7 @@ class pyside_build(_build):
@staticmethod
@memoize
def macos_plat_name():
- deployment_target = pyside_build.macos_pyside_min_deployment_target()
+ deployment_target = PysideBuild.macos_pyside_min_deployment_target()
# Example triple "macosx-10.12-x86_64".
plat = get_platform().split("-")
plat_name = "{}-{}-{}".format(plat[0], deployment_target, plat[2])
@@ -959,14 +959,14 @@ class pyside_build(_build):
cmake_cmd.append("-DPYTHON_INCLUDE_DIR={}".format(self.py_include_dir))
cmake_cmd.append("-DPYTHON_LIBRARY={}".format(self.py_library))
if OPTION_MODULE_SUBSET:
- moduleSubSet = ''
+ module_sub_set = ''
for m in OPTION_MODULE_SUBSET.split(','):
if m.startswith('Qt'):
m = m[2:]
- if moduleSubSet:
- moduleSubSet += ';'
- moduleSubSet += m
- cmake_cmd.append("-DMODULES={}".format(moduleSubSet))
+ if module_sub_set:
+ module_sub_set += ';'
+ module_sub_set += m
+ cmake_cmd.append("-DMODULES={}".format(module_sub_set))
if OPTION_SKIP_MODULES:
skip_modules = ''
for m in OPTION_SKIP_MODULES.split(','):
@@ -977,7 +977,7 @@ class pyside_build(_build):
skip_modules += m
cmake_cmd.append("-DSKIP_MODULES={}".format(skip_modules))
# Add source location for generating documentation
- cmake_src_dir = OPTION_QT_SRC if OPTION_QT_SRC else qtSrcDir
+ cmake_src_dir = OPTION_QT_SRC if OPTION_QT_SRC else qt_src_dir
cmake_cmd.append("-DQT_SRC_DIR={}".format(cmake_src_dir))
log.info("Qt Source dir: {}".format(cmake_src_dir))
@@ -1066,7 +1066,7 @@ class pyside_build(_build):
# Doing so could break the detected clang include paths
# for example.
deployment_target = \
- pyside_build.macos_pyside_min_deployment_target()
+ PysideBuild.macos_pyside_min_deployment_target()
cmake_cmd.append("-DCMAKE_OSX_DEPLOYMENT_TARGET={}".format(
deployment_target))
os.environ['MACOSX_DEPLOYMENT_TARGET'] = deployment_target
@@ -1148,7 +1148,7 @@ class pyside_build(_build):
os.chdir(self.script_dir)
if sys.platform == "win32":
- vars['dbgPostfix'] = OPTION_DEBUG and "_d" or ""
+ vars['dbg_postfix'] = OPTION_DEBUG and "_d" or ""
return prepare_packages_win32(self, vars)
else:
return prepare_packages_posix(self, vars)
@@ -1300,13 +1300,13 @@ except IOError:
cmd_class_dict = {
- 'build': pyside_build,
- 'build_py': pyside_build_py,
- 'build_ext': pyside_build_ext,
- 'bdist_egg': pyside_bdist_egg,
- 'develop': pyside_develop,
- 'install': pyside_install,
- 'install_lib': pyside_install_lib
+ 'build': PysideBuild,
+ 'build_py': PysideBuildPy,
+ 'build_ext': PysideBuildExt,
+ 'bdist_egg': PysideBdistEgg,
+ 'develop': PysideDevelop,
+ 'install': PysideInstall,
+ 'install_lib': PysideInstallLib
}
if wheel_module_exists:
- cmd_class_dict['bdist_wheel'] = pyside_build_wheel
+ cmd_class_dict['bdist_wheel'] = PysideBuildWheel
diff --git a/build_scripts/platforms/linux.py b/build_scripts/platforms/linux.py
index 7eb8a217b..bdeb2b66e 100644
--- a/build_scripts/platforms/linux.py
+++ b/build_scripts/platforms/linux.py
@@ -94,6 +94,7 @@ def prepare_standalone_package_linux(self, executables, vars):
filter=None,
force=False,
recursive=True,
+ ignore=["*.so.debug"],
vars=vars)
# <qt>/translations/* -> <setup>/PySide2/Qt/translations
diff --git a/build_scripts/qtinfo.py b/build_scripts/qtinfo.py
index e22bc2dbc..fbe8e68ad 100644
--- a/build_scripts/qtinfo.py
+++ b/build_scripts/qtinfo.py
@@ -54,73 +54,73 @@ class QtInfo(object):
# Dict to cache mkspecs variables.
self._mkspecs_dict = {}
# Initialize the properties.
- self._initProperties()
+ self._init_properties()
- def getQMakeCommand(self):
+ def get_qmake_command(self):
qmake_command_string = self._qmake_command[0]
for entry in self._qmake_command[1:]:
qmake_command_string += " {}".format(entry)
return qmake_command_string
- def getVersion(self):
- return self.getProperty("QT_VERSION")
+ def get_version(self):
+ return self.get_property("QT_VERSION")
- def getBinsPath(self):
- return self.getProperty("QT_INSTALL_BINS")
+ def get_bins_path(self):
+ return self.get_property("QT_INSTALL_BINS")
- def getLibsPath(self):
- return self.getProperty("QT_INSTALL_LIBS")
+ def get_libs_path(self):
+ return self.get_property("QT_INSTALL_LIBS")
- def getLibsExecsPath(self):
- return self.getProperty("QT_INSTALL_LIBEXECS")
+ def get_libs_execs_path(self):
+ return self.get_property("QT_INSTALL_LIBEXECS")
- def getPluginsPath(self):
- return self.getProperty("QT_INSTALL_PLUGINS")
+ def get_plugins_path(self):
+ return self.get_property("QT_INSTALL_PLUGINS")
- def getPrefixPath(self):
- return self.getProperty("QT_INSTALL_PREFIX")
+ def get_prefix_path(self):
+ return self.get_property("QT_INSTALL_PREFIX")
- def getImportsPath(self):
- return self.getProperty("QT_INSTALL_IMPORTS")
+ def get_imports_path(self):
+ return self.get_property("QT_INSTALL_IMPORTS")
- def getTranslationsPath(self):
- return self.getProperty("QT_INSTALL_TRANSLATIONS")
+ def get_translations_path(self):
+ return self.get_property("QT_INSTALL_TRANSLATIONS")
- def getHeadersPath(self):
- return self.getProperty("QT_INSTALL_HEADERS")
+ def get_headers_path(self):
+ return self.get_property("QT_INSTALL_HEADERS")
- def getDocsPath(self):
- return self.getProperty("QT_INSTALL_DOCS")
+ def get_docs_path(self):
+ return self.get_property("QT_INSTALL_DOCS")
- def getQmlPath(self):
- return self.getProperty("QT_INSTALL_QML")
+ def get_qml_path(self):
+ return self.get_property("QT_INSTALL_QML")
- def getMacOSMinDeploymentTarget(self):
+ def get_macos_deployment_target(self):
""" Return value is a macOS version or None. """
- return self.getProperty("QMAKE_MACOSX_DEPLOYMENT_TARGET")
+ return self.get_property("QMAKE_MACOSX_DEPLOYMENT_TARGET")
- def getBuildType(self):
+ def get_build_type(self):
"""
Return value is either debug, release, debug_release, or None.
"""
- return self.getProperty("BUILD_TYPE")
+ return self.get_property("BUILD_TYPE")
- def getSrcDir(self):
+ def get_src_dir(self):
""" Return path to Qt src dir or None.. """
- return self.getProperty("QT_INSTALL_PREFIX/src")
+ return self.get_property("QT_INSTALL_PREFIX/src")
- def getProperty(self, prop_name):
+ def get_property(self, prop_name):
if prop_name not in self._query_dict:
return None
return self._query_dict[prop_name]
- def getProperties(self):
+ def get_properties(self):
return self._query_dict
- def getMkspecsVariables(self):
+ def get_mkspecs_variables(self):
return self._mkspecs_dict
- def _getQMakeOutput(self, args_list = []):
+ def _get_qmake_output(self, args_list = []):
cmd = self._qmake_command + args_list
proc = subprocess.Popen(cmd, stdout = subprocess.PIPE, shell=False)
output = proc.communicate()[0]
@@ -133,7 +133,7 @@ class QtInfo(object):
output = output.strip()
return output
- def _parseQueryProperties(self, process_output):
+ def _parse_query_properties(self, process_output):
props = {}
if not process_output:
return props
@@ -144,11 +144,11 @@ class QtInfo(object):
props[key] = value
return props
- def _getQueryProperties(self):
- output = self._getQMakeOutput(['-query'])
- self._query_dict = self._parseQueryProperties(output)
+ def _get_query_properties(self):
+ output = self._get_qmake_output(['-query'])
+ self._query_dict = self._parse_query_properties(output)
- def _parseQtBuildType(self):
+ def _parse_qt_build_type(self):
key = 'QT_CONFIG'
if key not in self._mkspecs_dict:
return None
@@ -169,15 +169,15 @@ class QtInfo(object):
return None
- def _getOtherProperties(self):
+ def _get_other_properties(self):
# Get the src property separately, because it is not returned by
# qmake unless explicitly specified.
key = 'QT_INSTALL_PREFIX/src'
- result = self._getQMakeOutput(['-query', key])
+ result = self._get_qmake_output(['-query', key])
self._query_dict[key] = result
# Get mkspecs variables and cache them.
- self._getQMakeMkspecsVariables()
+ self._get_qmake_mkspecs_variables()
# Get macOS minimum deployment target.
key = 'QMAKE_MACOSX_DEPLOYMENT_TARGET'
@@ -186,22 +186,22 @@ class QtInfo(object):
# Figure out how Qt was built:
# debug mode, release mode, or both.
- build_type = self._parseQtBuildType()
+ build_type = self._parse_qt_build_type()
if build_type:
self._query_dict['BUILD_TYPE'] = build_type
- def _initProperties(self):
- self._getQueryProperties()
- self._getOtherProperties()
+ def _init_properties(self):
+ self._get_query_properties()
+ self._get_other_properties()
- def _getQMakeMkspecsVariables(self):
+ def _get_qmake_mkspecs_variables(self):
# Create empty temporary qmake project file.
temp_file_name = 'qmake_fake_empty_project.txt'
open(temp_file_name, 'a').close()
# Query qmake for all of its mkspecs variables.
- qmakeOutput = self._getQMakeOutput(['-E', temp_file_name])
- lines = [s.strip() for s in qmakeOutput.splitlines()]
+ qmake_output = self._get_qmake_output(['-E', temp_file_name])
+ lines = [s.strip() for s in qmake_output.splitlines()]
pattern = re.compile(r"^(.+?)=(.+?)$")
for line in lines:
found = pattern.search(line)
@@ -220,18 +220,18 @@ class QtInfo(object):
if os.path.exists(temp_file_name):
os.remove(temp_file_name)
- version = property(getVersion)
- bins_dir = property(getBinsPath)
- libs_dir = property(getLibsPath)
- lib_execs_dir = property(getLibsExecsPath)
- plugins_dir = property(getPluginsPath)
- prefix_dir = property(getPrefixPath)
- qmake_command = property(getQMakeCommand)
- imports_dir = property(getImportsPath)
- translations_dir = property(getTranslationsPath)
- headers_dir = property(getHeadersPath)
- docs_dir = property(getDocsPath)
- qml_dir = property(getQmlPath)
- macos_min_deployment_target = property(getMacOSMinDeploymentTarget)
- build_type = property(getBuildType)
- src_dir = property(getSrcDir)
+ version = property(get_version)
+ bins_dir = property(get_bins_path)
+ libs_dir = property(get_libs_path)
+ lib_execs_dir = property(get_libs_execs_path)
+ plugins_dir = property(get_plugins_path)
+ prefix_dir = property(get_prefix_path)
+ qmake_command = property(get_qmake_command)
+ imports_dir = property(get_imports_path)
+ translations_dir = property(get_translations_path)
+ headers_dir = property(get_headers_path)
+ docs_dir = property(get_docs_path)
+ qml_dir = property(get_qml_path)
+ macos_min_deployment_target = property(get_macos_deployment_target)
+ build_type = property(get_build_type)
+ src_dir = property(get_src_dir)
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index 2dffd345c..cca93d09f 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -293,27 +293,27 @@ def copyfile(src, dst, force=True, vars=None, force_copy_symlink=False,
make_file_writable_by_owner(dst)
else:
- linkTargetPath = os.path.realpath(src)
- if os.path.dirname(linkTargetPath) == os.path.dirname(src):
- linkTarget = os.path.basename(linkTargetPath)
- linkName = os.path.basename(src)
- currentDirectory = os.getcwd()
+ link_target_path = os.path.realpath(src)
+ if os.path.dirname(link_target_path) == os.path.dirname(src):
+ link_target = os.path.basename(link_target_path)
+ link_name = os.path.basename(src)
+ current_directory = os.getcwd()
try:
- targetDir = dst if os.path.isdir(dst) else os.path.dirname(dst)
- os.chdir(targetDir)
- if os.path.exists(linkName):
- os.remove(linkName)
- log.info("Symlinking {} -> {} in {}.".format(linkName,
- linkTarget, targetDir))
- os.symlink(linkTarget, linkName)
+ target_dir = dst if os.path.isdir(dst) else os.path.dirname(dst)
+ os.chdir(target_dir)
+ if os.path.exists(link_name):
+ os.remove(link_name)
+ log.info("Symlinking {} -> {} in {}.".format(link_name,
+ link_target, target_dir))
+ os.symlink(link_target, link_name)
except OSError:
- log.error("{} -> {}: Error creating symlink".format(linkName,
- linkTarget))
+ log.error("{} -> {}: Error creating symlink".format(link_name,
+ link_target))
finally:
- os.chdir(currentDirectory)
+ os.chdir(current_directory)
else:
log.error("{} -> {}: Can only create symlinks within the same "
- "directory".format(src, linkTargetPath))
+ "directory".format(src, link_target_path))
return dst
@@ -410,36 +410,36 @@ def make_file_writable_by_owner(path):
os.chmod(path, current_permissions | stat.S_IWUSR)
def rmtree(dirname, ignore=False):
- def handleRemoveReadonly(func, path, exc):
+ def handle_remove_readonly(func, path, exc):
excvalue = exc[1]
if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES:
os.chmod(path, stat.S_IRWXU| stat.S_IRWXG| stat.S_IRWXO) # 0777
func(path)
else:
raise
- shutil.rmtree(dirname, ignore_errors=ignore, onerror=handleRemoveReadonly)
+ shutil.rmtree(dirname, ignore_errors=ignore, onerror=handle_remove_readonly)
def run_process_output(args, initial_env=None):
if initial_env is None:
initial_env = os.environ
- stdOut = subprocess.Popen(args, env = initial_env, universal_newlines = 1,
+ std_out = subprocess.Popen(args, env = initial_env, universal_newlines = 1,
stdout=subprocess.PIPE).stdout
result = []
- for rawLine in stdOut.readlines():
- line = rawLine if sys.version_info >= (3,) else rawLine.decode('utf-8')
+ for raw_line in std_out.readlines():
+ line = raw_line if sys.version_info >= (3,) else raw_line.decode('utf-8')
result.append(line.rstrip())
return result
def run_process(args, initial_env=None):
- def _log(buffer, checkNewLine=False):
- endsWithNewLine = False
+ def _log(buffer, check_new_line=False):
+ ends_with_new_line = False
if buffer.endswith('\n'):
- endsWithNewLine = True
- if checkNewLine and buffer.find('\n') == -1:
+ ends_with_new_line = True
+ if check_new_line and buffer.find('\n') == -1:
return buffer
lines = buffer.splitlines()
buffer = ''
- if checkNewLine and not endsWithNewLine:
+ if check_new_line and not ends_with_new_line:
buffer = lines[-1]
lines = lines[:-1]
for line in lines:
@@ -742,7 +742,7 @@ def macos_add_qt_rpath(library_path, qt_lib_dir,
rpath=qt_lib_dir, library_path=library_path))
# Find an executable specified by a glob pattern ('foo*') in the OS path
-def findGlobInPath(pattern):
+def find_glob_in_path(pattern):
result = []
if sys.platform == 'win32':
pattern += '.exe'
@@ -752,47 +752,47 @@ def findGlobInPath(pattern):
result.append(match)
return result
-# Locate the most recent version of llvmConfig in the path.
-def findLlvmConfig():
- versionRe = re.compile('(\d+)\.(\d+)\.(\d+)')
+# Locate the most recent version of llvm_config in the path.
+def find_llvm_config():
+ version_re = re.compile('(\d+)\.(\d+)\.(\d+)')
result = None
- lastVersionString = '000000'
- for llvmConfig in findGlobInPath('llvm-config*'):
+ last_version_string = '000000'
+ for llvm_config in find_glob_in_path('llvm-config*'):
try:
- output = run_process_output([llvmConfig, '--version'])
+ output = run_process_output([llvm_config, '--version'])
if output:
- match = versionRe.match(output[0])
+ match = version_re.match(output[0])
if match:
- versionString = '%02d%02d%02d' % (int(match.group(1)),
+ version_string = '%02d%02d%02d' % (int(match.group(1)),
int(match.group(2)), int(match.group(3)))
- if (versionString > lastVersionString):
- result = llvmConfig
- lastVersionString = versionString
+ if (version_string > last_version_string):
+ result = llvm_config
+ last_version_string = version_string
except OSError:
pass
return result
# Add Clang to path for Windows for the shiboken ApiExtractor tests.
# Revisit once Clang is bundled with Qt.
-def detectClang():
+def detect_clang():
source = 'LLVM_INSTALL_DIR'
- clangDir = os.environ.get(source, None)
- if not clangDir:
+ clang_dir = os.environ.get(source, None)
+ if not clang_dir:
source = 'CLANG_INSTALL_DIR'
- clangDir = os.environ.get(source, None)
- if not clangDir:
- source = findLlvmConfig()
+ clang_dir = os.environ.get(source, None)
+ if not clang_dir:
+ source = find_llvm_config()
try:
if source is not None:
output = run_process_output([source, '--prefix'])
if output:
- clangDir = output[0]
+ clang_dir = output[0]
except OSError:
pass
- if clangDir:
+ if clang_dir:
arch = '64' if sys.maxsize > 2**31-1 else '32'
- clangDir = clangDir.replace('_ARCH_', arch)
- return (clangDir, source)
+ clang_dir = clang_dir.replace('_ARCH_', arch)
+ return (clang_dir, source)
def download_and_extract_7z(fileurl, target):
""" Downloads 7z file from fileurl and extract to target """
@@ -983,35 +983,35 @@ def copy_icu_libs(destination_lib_dir):
copyfile(path, destination, force_copy_symlink=True)
# Patch the ICU libraries to contain the $ORIGIN rpath
# value, so that only the local package libraries are used.
- linuxSetRPaths(destination, '$ORIGIN')
+ linux_set_rpaths(destination, '$ORIGIN')
# Patch the QtCore library to find the copied over ICU libraries
# (if necessary).
log.info("Checking if QtCore library needs a new rpath to make it "
"work with ICU libs.")
- rpaths = linuxGetRPaths(qt_core_library_path)
- if not rpaths or not rpathsHasOrigin(rpaths):
+ rpaths = linux_get_rpaths(qt_core_library_path)
+ if not rpaths or not rpaths_has_origin(rpaths):
log.info('Patching QtCore library to contain $ORIGIN rpath.')
rpaths.insert(0, '$ORIGIN')
new_rpaths_string = ":".join(rpaths)
- linuxSetRPaths(qt_core_library_path, new_rpaths_string)
+ linux_set_rpaths(qt_core_library_path, new_rpaths_string)
-def linuxSetRPaths(executable_path, rpath_string):
+def linux_set_rpaths(executable_path, rpath_string):
""" Patches the `executable_path` with a new rpath string. """
- if not hasattr(linuxSetRPaths, "patchelf_path"):
+ if not hasattr(linux_set_rpaths, "patchelf_path"):
script_dir = os.getcwd()
patchelf_path = os.path.join(script_dir, "patchelf")
- setattr(linuxSetRPaths, "patchelf_path", patchelf_path)
+ setattr(linux_set_rpaths, "patchelf_path", patchelf_path)
- cmd = [linuxSetRPaths.patchelf_path, '--set-rpath',
+ cmd = [linux_set_rpaths.patchelf_path, '--set-rpath',
rpath_string, executable_path]
if run_process(cmd) != 0:
raise RuntimeError("Error patching rpath in {}".format(
executable_path))
-def linuxGetRPaths(executable_path):
+def linux_get_rpaths(executable_path):
"""
Returns a list of run path values embedded in the executable or just
an empty list.
@@ -1039,7 +1039,7 @@ def linuxGetRPaths(executable_path):
return rpaths
-def rpathsHasOrigin(rpaths):
+def rpaths_has_origin(rpaths):
"""
Return True if the specified list of rpaths has an "$ORIGIN" value
(aka current dir).
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index d4150c93b..77382480d 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -331,7 +331,7 @@ if(APPLE)
endif()
# Collect all optional modules.
-set(ALL_OPTIONAL_MODULES Xml XmlPatterns Help Multimedia MultimediaWidgets OpenGL Positioning Location Qml Quick QuickWidgets Script ScriptTools Sensors TextToSpeech Charts Svg DataVisualization)
+set(ALL_OPTIONAL_MODULES Xml XmlPatterns Help Multimedia MultimediaWidgets OpenGL Positioning Location Qml Quick QuickWidgets Scxml Script ScriptTools Sensors TextToSpeech Charts Svg DataVisualization)
find_package(Qt5UiTools)
if(Qt5UiTools_FOUND)
list(APPEND ALL_OPTIONAL_MODULES UiTools)
diff --git a/sources/pyside2/PySide2/QtScxml/CMakeLists.txt b/sources/pyside2/PySide2/QtScxml/CMakeLists.txt
new file mode 100644
index 000000000..0a75ffce6
--- /dev/null
+++ b/sources/pyside2/PySide2/QtScxml/CMakeLists.txt
@@ -0,0 +1,60 @@
+project(QtScxml)
+
+set(QtScxml_OPTIONAL_SRC )
+set(QtScxml_DROPPED_ENTRIES )
+
+set(QtScxml_SRC
+${QtScxml_GEN_DIR}/qscxmlcompiler_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlcompiler_loader_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlevent_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmldynamicscxmlservicefactory_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlinvokableservice_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlinvokableservicefactory_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlstaticscxmlservicefactory_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlstatemachine_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmltabledata_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlerror_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_assignmentinfo_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_evaluatorinfo_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_foreachinfo_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_invokeinfo_wrapper.cpp
+${QtScxml_GEN_DIR}/qscxmlexecutablecontent_parameterinfo_wrapper.cpp
+# module is always needed
+${QtScxml_GEN_DIR}/qtscxml_module_wrapper.cpp
+)
+
+if (Qt5Scxml_VERSION VERSION_EQUAL 5.12.0 OR Qt5Scxml_VERSION VERSION_GREATER 5.12.0)
+ list(APPEND QtScxml_SRC
+ ${QtScxml_GEN_DIR}/qscxmldatamodel_wrapper.cpp
+ ${QtScxml_GEN_DIR}/qscxmldatamodel_foreachloopbody_wrapper.cpp
+ ${QtScxml_GEN_DIR}/qscxmlecmascriptdatamodel_wrapper.cpp
+ ${QtScxml_GEN_DIR}/qscxmlcppdatamodel_wrapper.cpp
+ ${QtScxml_GEN_DIR}/qscxmlnulldatamodel_wrapper.cpp)
+endif()
+
+set(QtScxml_include_dirs ${QtScxml_SOURCE_DIR}
+ ${QtScxml_BINARY_DIR}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Scxml_INCLUDE_DIRS}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${SHIBOKEN_PYTHON_INCLUDE_DIR}
+ ${QtCore_GEN_DIR})
+
+set(QtScxml_libraries pyside2
+ ${SHIBOKEN_PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${Qt5Scxml_LIBRARIES})
+
+set(QtScxml_deps QtCore)
+
+create_pyside_module(QtScxml
+ QtScxml_include_dirs
+ QtScxml_libraries
+ QtScxml_deps
+ QtScxml_SOURCE_DIR
+ QtScxml_SRC
+ ""
+ ""
+ QtScxml_DROPPED_ENTRIES)
diff --git a/sources/pyside2/PySide2/QtScxml/typesystem_scxml.xml b/sources/pyside2/PySide2/QtScxml/typesystem_scxml.xml
new file mode 100644
index 000000000..67a0cc4b7
--- /dev/null
+++ b/sources/pyside2/PySide2/QtScxml/typesystem_scxml.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="PySide2.QtScxml">
+ <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
+ <object-type name="QScxmlCompiler">
+ <object-type name="Loader"/>
+ </object-type>
+ <object-type name="QScxmlCppDataModel" since="5.12"/>
+ <object-type name="QScxmlEvent">
+ <enum-type name="EventType"/>
+ </object-type>
+ <object-type name="QScxmlDynamicScxmlServiceFactory"/>
+ <object-type name="QScxmlInvokableService"/>
+ <object-type name="QScxmlInvokableServiceFactory"/>
+ <object-type name="QScxmlStaticScxmlServiceFactory"/>
+ <object-type name="QScxmlStateMachine"/>
+ <object-type name="QScxmlTableData"/>
+ <object-type name="QScxmlDataModel" since="5.12">
+ <!-- Needs to have exports fixed -->
+ <interface-type name="ForeachLoopBody" since="5.12"/>
+ </object-type>
+ <object-type name="QScxmlEcmaScriptDataModel" since="5.12"/>
+ <value-type name="QScxmlError"/>
+ <namespace-type name="QScxmlExecutableContent">
+ <value-type name="AssignmentInfo"/>
+ <value-type name="EvaluatorInfo"/>
+ <value-type name="ForeachInfo"/>
+ <value-type name="InvokeInfo"/>
+ <value-type name="ParameterInfo"/>
+ </namespace-type>
+ <object-type name="QScxmlNullDataModel" since="5.12"/>
+</typesystem>
diff --git a/sources/pyside2/PySide2/support/signature/PSF-3.6.2.txt b/sources/pyside2/PySide2/support/signature/PSF-3.6.2.txt
new file mode 100644
index 000000000..bbd5311be
--- /dev/null
+++ b/sources/pyside2/PySide2/support/signature/PSF-3.6.2.txt
@@ -0,0 +1,43 @@
+PSF LICENSE AGREEMENT FOR PYTHON 3.6.2
+
+1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and
+ the Individual or Organization ("Licensee") accessing and otherwise using Python
+ 3.6.2 software in source or binary form and its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, PSF hereby
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
+ analyze, test, perform and/or display publicly, prepare derivative works,
+ distribute, and otherwise use Python 3.6.2 alone or in any derivative
+ version, provided, however, that PSF's License Agreement and PSF's notice of
+ copyright, i.e., "Copyright © 2001-2017 Python Software Foundation; All Rights
+ Reserved" are retained in Python 3.6.2 alone or in any derivative version
+ prepared by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on or
+ incorporates Python 3.6.2 or any part thereof, and wants to make the
+ derivative work available to others as provided herein, then Licensee hereby
+ agrees to include in any such work a brief summary of the changes made to Python
+ 3.6.2.
+
+4. PSF is making Python 3.6.2 available to Licensee on an "AS IS" basis.
+ PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF
+ EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
+ USE OF PYTHON 3.6.2 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 3.6.2
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
+ MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 3.6.2, OR ANY DERIVATIVE
+ THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material breach of
+ its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any relationship
+ of agency, partnership, or joint venture between PSF and Licensee. This License
+ Agreement does not grant permission to use PSF trademarks or trade name in a
+ trademark sense to endorse or promote products or services of Licensee, or any
+ third party.
+
+8. By copying, installing or otherwise using Python 3.6.2, Licensee agrees
+ to be bound by the terms and conditions of this License Agreement.
diff --git a/sources/pyside2/PySide2/support/signature/qt_attribution.json b/sources/pyside2/PySide2/support/signature/qt_attribution.json
index 331b3e814..c1f335d60 100644
--- a/sources/pyside2/PySide2/support/signature/qt_attribution.json
+++ b/sources/pyside2/PySide2/support/signature/qt_attribution.json
@@ -6,7 +6,8 @@
"Description": "Qt for Python is an add-on for Python. The signature packages of PySide uses certain copied and adapted source files (inspect.py, backport_inspect.py, typing27.py, typing36.py). See the folder sources/pyside2/PySide2/support/signature .",
"Homepage": "http://www.python.org/",
"Version": "3.6.5",
- "License": "PSF LICENSE AGREEMENT FOR PYTHON 3.6.5",
- "LicenseFile": "backport_inspect.py",
+ "LicenseId": "Python-2.0",
+ "License": "Python License 2.0",
+ "LicenseFile": "PSF-3.6.2.txt",
"Copyright": "© Copyright 2001-2018, Python Software Foundation."
}
diff --git a/sources/pyside2/doc/_templates/index.html b/sources/pyside2/doc/_templates/index.html
deleted file mode 100644
index 901ddc496..000000000
--- a/sources/pyside2/doc/_templates/index.html
+++ /dev/null
@@ -1,120 +0,0 @@
-{% extends "layout.html" %}
-{% set title = 'Overview' %}
-{% block body %}
-<div class="section">
- <h1>PySide {{ version }} Reference</h1>
-
- <p><a href="http://www.qt.io/">Qt</a> is a complete cross-platform software framework.
- PySide aims to provide Python developers access to the Qt libraries in the most natural way.</p>
-
- <p>PySide is built using the Shiboken binding generator.</p>
-
- <h2>Notes</h2>
-
- <h3>About 0 vs None</h3>
-
- <p>The PySide class reference documentation is automatically generated from the original
- Qt documentation for C++, some parts were tuned to fit the Python world. However, it's not
- possible to rewrite all Qt docs as it would require a really huge effort, so if the
- documentation says you can use 0 on an QObject argument, interpret it as None.</p>
-
- <h3>About keyword arguments</h3>
-
- <p>Only optional arguments can be used as keyword arguments.</p>
-
- <h2>Modules</h2>
-
- <table class="contentstable" align="center" ><tr>
- <td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/Qt3DAnimation/index") }}">Qt3DAnimation</a><br/>
- <span class="linkdescr">provides a set of prebuilt elements to help you get started with Qt 3D</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/Qt3DCore/index") }}">Qt3DCore</a><br/>
- <span class="linkdescr">contains functionality to support near-realtime simulation systems</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/Qt3DExtras/index") }}">Qt3DExtras</a><br/>
- <span class="linkdescr"> provides a set of prebuilt elements to help you get started with Qt 3D</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/Qt3DInput/index") }}">Qt3DInput</a><br/>
- <span class="linkdescr"></span>provides classes for handling user input in applications using Qt3D</p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/Qt3DLogic/index") }}">Qt3DLogic</a><br/>
- <span class="linkdescr">enables synchronizing frames with the Qt 3D backend</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/Qt3DRender/index") }}">Qt3DRender</a><br/>
- <span class="linkdescr"></span>contains functionality to support 2D and 3D rendering using Qt 3D</p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtAxContainer/index") }}">QtAxContainer</a><br/>
- <span class="linkdescr">provides QAxObject and QAxWidget which act as
- containers for COM objects and ActiveX controls</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtCharts/index") }}">QtCharts</a><br/>
- <span class="linkdescr">provides a set of easy to use chart components</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtConcurrent/index") }}">QtConcurrent</a><br/>
- <span class="linkdescr">provides high-level APIs that make it possible
- to write multi-threaded programs without using low-level threading
- primitives such as mutexes, read-write locks, wait conditions, or semaphores</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtCore/index") }}">QtCore</a><br/>
- <span class="linkdescr">core non-GUI functionality</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtDataVisualization/index") }}">QtDataVisualization</a><br/>
- <span class="linkdescr">provides a way to visualize data in 3D as bar, scatter, and surface graphs</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtGui/index") }}">QtGui</a><br/>
- <span class="linkdescr">extends QtCore with GUI functionality.</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtMacExtras/index") }}">QtMacExtras</a><br/>
- <span class="linkdescr">provides classes and functions specific to
- macOS and iOS operating systems</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtHelp/index") }}">QtHelp</a><br/>
- <span class="linkdescr">provides classes for integrating online documentation in applications</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtMultimedia/index") }}">QtMultimedia</a><br/>
- <span class="linkdescr">provides low-level multimedia functionality</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtMultimediaWidgets/index") }}">QtMultimediaWidgets</a><br/>
- <span class="linkdescr">provides the widget-based multimedia API</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtNetwork/index") }}">QtNetwork</a><br/>
- <span class="linkdescr">offers classes that allow you to write TCP/IP clients and servers</span></p>
- </td>
- <td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtOpenGL/index") }}">QtOpenGL</a><br/>
- <span class="linkdescr">offers classes that make it easy to use OpenGL in Qt applications</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtPrintSupport/index") }}">QtPrintSupport</a><br/>
- <span class="linkdescr">provides cross-platform support for printing</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtQml/index") }}">QtQml</a><br/>
- <span class="linkdescr">Python API for Qt QML</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtQuick/index") }}">QtQuick</a><br/>
- <span class="linkdescr">provides classes for embedding Qt Quick in Qt applications</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtQuickWidgets/index") }}">QtQuickWidgets</a><br/>
- <span class="linkdescr">provides the QQuickWidget class for embedding Qt Quick in widget-based applications</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtTextToSpeech/index") }}">QtTextToSpeech</a><br/>
- <span class="linkdescr">provides C++ API to access text-to-speech engines</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtSql/index") }}">QtSql</a><br/>
- <span class="linkdescr">helps you provide seamless database integration to your Qt applications</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtSvg/index") }}">QtSvg</a><br/>
- <span class="linkdescr">provides classes for displaying the contents of SVG files</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtTest/index") }}">QtTest</a><br/>
- <span class="linkdescr">provides classes for unit testing Qt applications and libraries</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtUiTools/index") }}">QtUiTools</a><br/>
- <span class="linkdescr">provides classes to handle forms created with Qt Designer</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtWebChannel/index") }}">QtWebChannel</a><br/>
- <span class="linkdescr">enables peer-to-peer communication between a server and a client
- (HTML/JavaScript or QML application)</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtWebSockets/index") }}">QtWebSockets</a><br/>
- <span class="linkdescr"></span>provides interfaces that enable Qt applications
- to act as a server that can process WebSocket requests, or a client that
- can consume data received from the server, or both</p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtWidgets/index") }}">QtWidgets</a><br/>
- <span class="linkdescr">extends Qt GUI with C++ widget functionality.</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtWinExtras/index") }}">QtWinExtras</a><br/>
- <span class="linkdescr">provides classes and functions for using some Windows APIs in a Qt way</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtX11Extras/index") }}">QtX11Extras</a><br/>
- <span class="linkdescr">provides information about the X display configuration</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtXml/index") }}">QtXml</a><br/>
- <span class="linkdescr">provides a stream reader and writer for XML documents</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("PySide2/QtXmlPatterns/index") }}">QtXmlPatterns</a><br/>
- <span class="linkdescr">provides support for XPath, XQuery, XSLT and XML Schema validation</span></p>
- </td></tr>
- </table>
-
- <h2>Tutorials and examples</h2>
-
- <p>A collection of <a href="{{ pathto("tutorials/index") }}">tutorials</a> and "walkthrough" guides are provided with PySide to help new users get started with PySide development. These documents were ported from C++ to Python and cover a range of topics, from basic use of widgets to step-by-step <a href="{{ pathto("tutorials/index") }}">tutorials</a> that show how an application is put together.</p>
-
- <h2>Other stuff</h2>
-
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="pysideapi2.html">PySide API 2</a></li>
- <li class="toctree-l1"><a class="reference internal" href="pysideversion.html">Getting PySide and Qt version</a></li>
- </ul>
-</div>
-{% endblock %}
diff --git a/sources/pyside2/doc/conf.py.in b/sources/pyside2/doc/conf.py.in
index e5fc80fb7..26d99c7ed 100644
--- a/sources/pyside2/doc/conf.py.in
+++ b/sources/pyside2/doc/conf.py.in
@@ -167,4 +167,4 @@ html_show_sourcelink = False
# Link to the shiboken2 sphinx project to enable linking
# between the two projects.
-intersphinx_mapping = {'shiboken2': ('@CMAKE_BINARY_DIR@/../shiboken2/doc/html','@CMAKE_BINARY_DIR@/../shiboken2/doc/html/objects.inv')}
+intersphinx_mapping = {'shiboken2': ('../../../shiboken2/doc/html','../../../shiboken2/doc/html/objects.inv')}
diff --git a/sources/pyside2/doc/index.rst b/sources/pyside2/doc/index.rst
index 26bfe998f..efc3ea2fa 100644
--- a/sources/pyside2/doc/index.rst
+++ b/sources/pyside2/doc/index.rst
@@ -94,7 +94,8 @@ Qt Modules
Helps you create viable mapping solutions using the data available from some of the popular location services.
* - `Qt Sensors <PySide2/QtSensors/index.html>`_
Provides access to sensor hardware via QML and Python interfaces and a motion gesture recognition API for devices.
- -
+ - `Qt Scxml <PySide2/QtScxml/index.html>`_
+ Provides classes to create and use state machines from SCXML files.
|project| also comes with the
:doc:`Shiboken2 <shiboken2:contents>` generator that outputs C++ code
diff --git a/sources/pyside2/doc/qtmodules/pyside-qtscxml.qdocconf.in b/sources/pyside2/doc/qtmodules/pyside-qtscxml.qdocconf.in
new file mode 100644
index 000000000..30b61a785
--- /dev/null
+++ b/sources/pyside2/doc/qtmodules/pyside-qtscxml.qdocconf.in
@@ -0,0 +1,3 @@
+include(@QT_SRC_DIR@/../qtscxml/src/scxml/doc/qtscxml.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtscxml/src/scxml/doc
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside2/tests/QtScxml/CMakeLists.txt b/sources/pyside2/tests/QtScxml/CMakeLists.txt
new file mode 100644
index 000000000..dde186697
--- /dev/null
+++ b/sources/pyside2/tests/QtScxml/CMakeLists.txt
@@ -0,0 +1 @@
+PYSIDE_TEST(test_dynamic.py)
diff --git a/sources/pyside2/tests/QtScxml/test_dynamic.py b/sources/pyside2/tests/QtScxml/test_dynamic.py
new file mode 100644
index 000000000..1bae534ac
--- /dev/null
+++ b/sources/pyside2/tests/QtScxml/test_dynamic.py
@@ -0,0 +1,53 @@
+#############################################################################
+##
+## Copyright (C) 2018 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the test suite of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os
+import unittest
+
+from helper import TimedQApplication
+from PySide2.QtCore import QObject, SIGNAL
+from PySide2.QtScxml import QScxmlStateMachine
+
+class testDynamicStateMachine(TimedQApplication):
+ def setUp(self):
+ super(testDynamicStateMachine, self).setUp()
+ filePath = os.path.join(os.path.dirname(__file__), 'trafficlight.scxml')
+ self.assertTrue(os.path.exists(filePath))
+ self._machine = QScxmlStateMachine.fromFile(filePath)
+ self._machine.reachedStableState.connect(self._reachedStable())
+ self.assertTrue(not self._machine.parseErrors())
+ self.assertTrue(self._machine)
+
+ def _reachedStable(self):
+ self.app.quit()
+
+ def test(self):
+ self._machine.start()
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/sources/pyside2/tests/QtScxml/trafficlight.scxml b/sources/pyside2/tests/QtScxml/trafficlight.scxml
new file mode 100644
index 000000000..1b0fb6e9a
--- /dev/null
+++ b/sources/pyside2/tests/QtScxml/trafficlight.scxml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of Qt for Python.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<scxml
+ xmlns="http://www.w3.org/2005/07/scxml"
+ xmlns:qt="http://theqtcompany.com/scxml/2015/06/"
+ version="1.0"
+ name="TrafficLightStateMachine"
+ initial="working"
+>
+ <state id="working" initial="yellow">
+ <state id="red">
+ <onentry>
+ <send event="startGoingGreen" delay="3s"/>
+ </onentry>
+ <transition event="startGoingGreen" target="redGoingGreen"/>
+ </state>
+
+ <state id="yellow" initial="greenGoingRed">
+ <state id="redGoingGreen">
+ <onentry>
+ <send event="goGreen" delay="1s"/>
+ </onentry>
+ <transition event="goGreen" target="green"/>
+ </state>
+
+ <state id="greenGoingRed">
+ <onentry>
+ <send event="goRed" delay="1s"/>
+ </onentry>
+ <transition event="goRed" target="red"/>
+ </state>
+ </state>
+
+ <state id="green">
+ <onentry>
+ <send event="startGoingRed" delay="3s"/>
+ </onentry>
+ <transition event="startGoingRed" target="greenGoingRed"/>
+ </state>
+
+ <transition event="smash" target="broken"/>
+ </state>
+
+ <state id="broken" initial="blinking">
+ <state id="blinking">
+ <onentry>
+ <send event="unblink" delay="1s"/>
+ </onentry>
+ <transition event="unblink" target="unblinking"/>
+ </state>
+
+ <state id="unblinking">
+ <onentry>
+ <send event="blink" delay="1s"/>
+ </onentry>
+ <transition event="blink" target="blinking"/>
+ </state>
+
+ <transition event="repair" target="working"/>
+ </state>
+</scxml>
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
index 0a2920e4f..60ab7878f 100644
--- a/sources/shiboken2/CMakeLists.txt
+++ b/sources/shiboken2/CMakeLists.txt
@@ -44,8 +44,8 @@ macro(get_llvm_config)
import os
import sys
sys.path.append(os.path.realpath(os.path.join('${CMAKE_CURRENT_LIST_DIR}', '..', '..')))
- from build_scripts.utils import findLlvmConfig
- llvmConfig = findLlvmConfig()
+ from build_scripts.utils import find_llvm_config
+ llvmConfig = find_llvm_config()
if llvmConfig:
print(llvmConfig)
"
diff --git a/testing/runner.py b/testing/runner.py
index 945e32469..3c99df71c 100644
--- a/testing/runner.py
+++ b/testing/runner.py
@@ -61,7 +61,7 @@ this_dir = os.path.dirname(this_file)
build_scripts_dir = os.path.abspath(os.path.join(this_dir, '../build_scripts'))
sys.path.append(build_scripts_dir)
-from utils import detectClang
+from utils import detect_clang
class TestRunner(object):
def __init__(self, log_entry, project, index):
@@ -74,19 +74,19 @@ class TestRunner(object):
else:
self.logfile = os.path.join(log_dir, project + ".log")
os.environ['CTEST_OUTPUT_ON_FAILURE'] = '1'
- self._setupClang()
+ self._setup_clang()
self._setup()
- def _setupClang(self):
+ def _setup_clang(self):
if sys.platform != "win32":
return
- clangDir = detectClang()
- if clangDir[0]:
- clangBinDir = os.path.join(clangDir[0], 'bin')
+ clang_dir = detect_clang()
+ if clang_dir[0]:
+ clang_bin_dir = os.path.join(clang_dir[0], 'bin')
path = os.environ.get('PATH')
- if not clangBinDir in path:
- os.environ['PATH'] = clangBinDir + os.pathsep + path
- print("Adding %s as detected by %s to PATH" % (clangBinDir, clangDir[1]))
+ if not clang_bin_dir in path:
+ os.environ['PATH'] = clang_bin_dir + os.pathsep + path
+ print("Adding %s as detected by %s to PATH" % (clang_bin_dir, clang_dir[1]))
def _find_ctest(self):
"""