diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-28 07:51:22 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-28 09:34:35 +0000 |
| commit | 2a2a0827fa54b2eeb48e0e2090dfc503492ef33e (patch) | |
| tree | 4311f7ad34ff98fabcbe4c34e59a970ae4ff4bcf /sources/pyside2/PySide2 | |
| parent | fb1c0f204e09ba29fa3d360d72231d4ed468c1e4 (diff) | |
Rename shiboken2 to shiboken6
Adapt CMake files, build scripts, tests and examples.
Task-number: PYSIDE-904
Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2')
| -rw-r--r-- | sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml | 2 | ||||
| -rw-r--r-- | sources/pyside2/PySide2/__init__.py.in | 30 | ||||
| -rw-r--r-- | sources/pyside2/PySide2/support/__init__.py | 2 | ||||
| -rw-r--r-- | sources/pyside2/PySide2/support/generate_pyi.py | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml b/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml index 31f0b8343..43ed7a60e 100644 --- a/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml +++ b/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml @@ -62,7 +62,7 @@ of the `.ui` file. (Remember that `duck punching virtual methods is an invitation for your own demise! - <https://doc.qt.io/qtforpython/shiboken2/wordsofadvice.html#duck-punching-and-virtual-methods>`_) + <https://doc.qt.io/qtforpython/shiboken6/wordsofadvice.html#duck-punching-and-virtual-methods>`_) Let's see an obvious example. If you want to create a new widget it's probable you'll end up overriding :class:`~PySide2.QtGui.QWidget`'s :meth:`~PySide2.QtGui.QWidget.paintEvent` method. diff --git a/sources/pyside2/PySide2/__init__.py.in b/sources/pyside2/PySide2/__init__.py.in index 035cdd636..89c47ae80 100644 --- a/sources/pyside2/PySide2/__init__.py.in +++ b/sources/pyside2/PySide2/__init__.py.in @@ -11,20 +11,20 @@ __version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @B def _additional_dll_directories(package_dir): - # Find shiboken2 relative to the package directory. + # Find shiboken6 relative to the package directory. root = os.path.dirname(package_dir) # Check for a flat .zip as deployed by cx_free(PYSIDE-1257) if root.endswith('.zip'): return [] - shiboken2 = os.path.join(root, 'shiboken2') - if os.path.isdir(shiboken2): # Standard case, only shiboken2 is needed - return [shiboken2] + shiboken6 = os.path.join(root, 'shiboken6') + if os.path.isdir(shiboken6): # Standard case, only shiboken6 is needed + return [shiboken6] # The below code is for the build process when generate_pyi.py # is executed in the build directory. We need libpyside and Qt in addition. - shiboken2 = os.path.join(os.path.dirname(root), 'shiboken2', 'libshiboken') - if not os.path.isdir(shiboken2): - raise ImportError(shiboken2 + ' does not exist') - result = [shiboken2, os.path.join(root, 'libpyside')] + shiboken6 = os.path.join(os.path.dirname(root), 'shiboken6', 'libshiboken') + if not os.path.isdir(shiboken6): + raise ImportError(shiboken6 + ' does not exist') + result = [shiboken6, os.path.join(root, 'libpyside')] for path in os.environ.get('PATH').split(';'): if path: if os.path.exists(os.path.join(path, 'qmake.exe')): @@ -34,13 +34,13 @@ def _additional_dll_directories(package_dir): def _setupQtDirectories(): - # On Windows we need to explicitly import the shiboken2 module so + # On Windows we need to explicitly import the shiboken6 module so # that the libshiboken.dll dependency is loaded by the time a # Qt module is imported. Otherwise due to PATH not containing - # the shiboken2 module path, the Qt module import would fail + # the shiboken6 module path, the Qt module import would fail # due to the missing libshiboken dll. # In addition, as of Python 3.8, the shiboken package directory - # must be added to the DLL search paths so that shiboken2.dll + # must be added to the DLL search paths so that shiboken6.dll # is found. # We need to do the same on Linux and macOS, because we do not # embed rpaths into the PySide2 libraries that would point to @@ -55,10 +55,10 @@ def _setupQtDirectories(): os.add_dll_directory(dir) try: - import shiboken2 + import shiboken6 except Exception: paths = ', '.join(sys.path) - print('PySide2/__init__.py: Unable to import shiboken2 from {}'.format(paths), + print('PySide2/__init__.py: Unable to import shiboken6 from {}'.format(paths), file=sys.stderr) raise @@ -73,9 +73,9 @@ def _setupQtDirectories(): PySide2/__init__.py: The `signature` module was not initialized. This libshiboken module was loaded from - "{shiboken2.__file__}". + "{shiboken6.__file__}". - Please make sure that this is the real shiboken2 binary and not just a folder. + Please make sure that this is the real shiboken6 binary and not just a folder. {stars} ''').format(stars=79*"*", **locals()), file=sys.stderr) raise diff --git a/sources/pyside2/PySide2/support/__init__.py b/sources/pyside2/PySide2/support/__init__.py index 8764fb5cb..996acb05a 100644 --- a/sources/pyside2/PySide2/support/__init__.py +++ b/sources/pyside2/PySide2/support/__init__.py @@ -37,6 +37,6 @@ ## ############################################################################# -from shiboken2 import VoidPtr +from shiboken6 import VoidPtr #eof diff --git a/sources/pyside2/PySide2/support/generate_pyi.py b/sources/pyside2/PySide2/support/generate_pyi.py index d71ee338e..6cca2ebbe 100644 --- a/sources/pyside2/PySide2/support/generate_pyi.py +++ b/sources/pyside2/PySide2/support/generate_pyi.py @@ -147,7 +147,7 @@ class Formatter(Writer): self.print() self.print("class Object(object): pass") self.print() - self.print("import shiboken2 as Shiboken") + self.print("import shiboken6 as Shiboken") self.print("Shiboken.Object = Object") self.print() # This line will be replaced by the missing imports postprocess. |
