Skip to content

Commit 2518073

Browse files
Rename PySide2 to PySide6
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <[email protected]>
1 parent 6e3e7b9 commit 2518073

File tree

1,834 files changed

+2500
-2500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,834 files changed

+2500
-2500
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## PySide2
1+
## PySide6
22
/pyside*_build
33
/pyside*_install
44
/PySide

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ cmake_policy(VERSION 3.16)
33

44
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build Type")
55

6-
project(pyside2_super_project)
6+
project(pyside6_super_project)
77

88
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
99
message(FATAL_ERROR "In-source builds are not allowed.")
1010
endif()
1111

12-
# Used to prevent overriding message function in both shiboken6 and pyside2.
13-
set(is_pyside2_superproject_build 1)
12+
# Used to prevent overriding message function in both shiboken6 and pyside6.
13+
set(is_pyside6_superproject_build 1)
1414

1515
add_subdirectory(sources/shiboken6)
1616

1717
# Semi-hack to include exported shiboken variables.
1818
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/shiboken6/data")
19-
add_subdirectory(sources/pyside2)
19+
add_subdirectory(sources/pyside6)
2020

2121
add_subdirectory(sources/pyside-tools)
2222

23-
# Semi-hack to include exported pyside2 variables.
24-
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/pyside2/libpyside")
23+
# Semi-hack to include exported pyside6 variables.
24+
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/sources/pyside6/libpyside")

LICENSE.COMMERCIAL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ object code form only (“Redistributables”) under this Agreement:
895895
- The Licensed Software's QML (“Qt Quick”) launcher tool (“qmlscene” or
896896
“qmlviewer”)
897897
- The Licensed Software's installer framework
898-
- Qt for Python (PySide2)
898+
- Qt for Python (PySide6)
899899

900900
2. Parts of the Licensed Software that are not permitted for distribution
901901
include, but are not limited to:

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Qt For Python
22

3-
Qt For Python is the [Python Qt bindings project](http://wiki.qt.io/PySide2),
3+
Qt For Python is the [Python Qt bindings project](http://wiki.qt.io/PySide6),
44
providing access to the complete Qt framework as well as to generator tools for
55
rapidly generating bindings for any C++ libraries.
66

77
Shiboken is the generator used to build the bindings.
88

9-
See README.pyside2.md and README.shiboken6.md for details.
9+
See README.pyside6.md and README.shiboken6.md for details.
1010

1111
## Building
1212

@@ -21,7 +21,7 @@ The same setup.py script is used to build all the components of the project:
2121

2222
* shiboken6 (the supporting Python module)
2323
* shiboken6-generator (the bindings generation executable)
24-
* PySide2
24+
* PySide6
2525

2626
Preferably, a Qt (build) environment should be used to automatically pick up
2727
the associated `qmake`, but optionally one can specify the location of `qmake`
@@ -38,10 +38,10 @@ be built:
3838

3939
* `--build-type=shiboken6`, build/package only the python module
4040
* `--build-type=shiboken6-generator`, build/package the generator executable
41-
* `--build-type=pyside2`, build/package the PySide2 bindings.
41+
* `--build-type=pyside6`, build/package the PySide6 bindings.
4242
* `--build-type=all`, the implicit default to build all of the above
4343

44-
When building PySide2, optionally, one can specify the location of the
44+
When building PySide6, optionally, one can specify the location of the
4545
shiboken6 cmake config path if it is not on the current PATH with:
4646

4747
* `--shiboken-config-dir=/path/to/shiboken/cmake/config/dir`
@@ -55,18 +55,18 @@ directory path that contains the OpenSSL shared libraries `libeay32.dll` and
5555

5656
* `--openssl=C:\OpenSSL-Win64\bin`
5757

58-
This will make sure that the libraries are copied into the PySide2 package and
58+
This will make sure that the libraries are copied into the PySide6 package and
5959
are found by the QtNetwork module.
6060

6161
## Building Additional Options
6262

6363
On Linux and macOS you can use the option `--standalone` to embed Qt libraries
64-
into the PySide2 package. The option does not affect Windows, because it is
65-
used implicitly, i.e. all relevant DLLs have to be copied into the PySide2
64+
into the PySide6 package. The option does not affect Windows, because it is
65+
used implicitly, i.e. all relevant DLLs have to be copied into the PySide6
6666
package anyway, because there is no proper rpath support on the platform.
6767

6868
You can use the option `--rpath=/path/to/lib/path` to specify which rpath
69-
values should be embedded into the PySide2 modules and shared libraries. This
69+
values should be embedded into the PySide6 modules and shared libraries. This
7070
overrides the automatically generated values when the option is not specified.
7171

7272
You can use the option `--only-package` if you want to create more binary
@@ -75,13 +75,13 @@ every time:
7575

7676
e.g.:
7777

78-
* First, we create a bdist_wheel from a full PySide2 build:
78+
* First, we create a bdist_wheel from a full PySide6 build:
7979
```
8080
python setup.py bdist_wheel --qmake=c:\Qt\5.12\bin\qmake.exe
8181
--cmake=c:\tools\cmake\bin\cmake.exe
8282
--openssl=c:\libs\OpenSSL32bit\bin
8383
```
84-
* Then, we create a bdist_egg reusing the PySide2 build with option
84+
* Then, we create a bdist_egg reusing the PySide6 build with option
8585
`--only-package`:
8686
```
8787
python setup.py bdist_egg --only-package
@@ -91,7 +91,7 @@ e.g.:
9191
```
9292

9393
You can use the option `--qt-conf-prefix` to pass a path relative to the
94-
PySide2 installed package, which will be embedded into an auto-generated
94+
PySide6 installed package, which will be embedded into an auto-generated
9595
`qt.conf` registered in the Qt resource system. This path will serve as the
9696
PrefixPath for QLibraryInfo, thus allowing to choose where Qt plugins should be
9797
loaded from. This option overrides the usual prefix chosen by `--standalone`
@@ -172,7 +172,7 @@ OpenSSL.
172172
On Linux, official Qt builds will try to pick up the system OpenSSL library.
173173

174174
> **Note**: this means that Qt packages that directly link to the OpenSSL
175-
> shared libraries, are not currently compatible with standalone PySide2
175+
> shared libraries, are not currently compatible with standalone PySide6
176176
> packages.
177177
178178
#### macOS SDK:

README.pyside2.md renamed to README.pyside6.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# PySide2
1+
# PySide6
22

33
### Introduction
44

5-
PySide2 is the official Python module from the
5+
PySide6 is the official Python module from the
66
[Qt for Python project](http://wiki.qt.io/Qt_for_Python),
77
which provides access to the complete Qt 5.12+ framework.
88

@@ -15,15 +15,15 @@ design process. We welcome any contribution conforming to the
1515

1616
Since the release of the [Technical Preview](https://blog.qt.io/blog/2018/06/13/qt-python-5-11-released/)
1717
it is possible to install via `pip`, both from Qt's servers
18-
and [PyPi](https://pypi.org/project/PySide2/):
18+
and [PyPi](https://pypi.org/project/PySide6/):
1919

2020
```
21-
pip install PySide2
21+
pip install PySide6
2222
```
2323

2424
#### Dependencies
2525

26-
PySide2 versions following 5.12 use a C++ parser based on
26+
PySide6 versions following 5.12 use a C++ parser based on
2727
[Clang](http://clang.org/). The Clang library (C-bindings), version 6.0 or
2828
higher is required for building. Prebuilt versions of it can be downloaded from
2929
[download.qt.io](http://download.qt.io/development_releases/prebuilt/libclang/).
@@ -45,7 +45,7 @@ SET LLVM_INSTALL_DIR=%CD%\libclang
4545

4646
### Building from source
4747

48-
For building PySide2 from scratch, please read about
48+
For building PySide6 from scratch, please read about
4949
[getting started](https://wiki.qt.io/Qt_for_Python/GettingStarted).
5050
This process will include getting the code:
5151

@@ -68,7 +68,7 @@ in [our wiki](https://wiki.qt.io/Qt_for_Python/).
6868

6969
### Documentation and Bugs
7070

71-
You can find more information about the PySide2 module API in the
71+
You can find more information about the PySide6 module API in the
7272
[official Qt for Python documentation](https://doc.qt.io/qtforpython/).
7373

7474
If you come across any issue, please file a bug report at our
@@ -82,7 +82,7 @@ Check *#qt-pyside*, our official IRC channel on FreeNode, or contact us via our
8282

8383
### Licensing
8484

85-
PySide2 is available under both Open Source (LGPLv3/GPLv2) and commercial
85+
PySide6 is available under both Open Source (LGPLv3/GPLv2) and commercial
8686
license. Using PyPi is the recommended installation source, because the
8787
content of the wheels is valid for both cases. For more information, refer to
8888
the [Qt Licensing page](https://www.qt.io/licensing/).

build_history/blacklist.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
linux
5959
darwin
6060
win32
61-
# AttributeError: 'PySide2.QtQuick.QQuickItem' object has no attribute 'simpleFunction'
61+
# AttributeError: 'PySide6.QtQuick.QQuickItem' object has no attribute 'simpleFunction'
6262
[QtQml::bug_451]
6363
py2
6464
py3

build_scripts/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ def __init__(self):
5858
self.invocation_type = None
5959

6060
# The type of the top-level build.
61-
# all - build shiboken6 module, shiboken6-generator and PySide2
61+
# all - build shiboken6 module, shiboken6-generator and PySide6
6262
# modules
6363
# shiboken6 - build only shiboken6 module
6464
# shiboken6-generator - build only the shiboken6-generator
65-
# pyside2 - build only PySide2 modules
65+
# pyside6 - build only PySide6 modules
6666
self.build_type = None
6767

6868
# The internal build type, used for internal invocations of

build_scripts/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def __init__(self, *args, **kwargs):
419419
def install(self):
420420
"""
421421
Installs files from build/xxx directory into final
422-
site-packages/PySide2 directory.
422+
site-packages/PySide6 directory.
423423
"""
424424

425425
if os.path.isdir(self.build_dir):
@@ -1115,7 +1115,7 @@ def rpath_cmd(srcpath):
11151115

11161116
pyside_libs.extend(executables)
11171117

1118-
# Update rpath in PySide2 libs
1118+
# Update rpath in PySide6 libs
11191119
for srcname in pyside_libs:
11201120
srcpath = os.path.join(package_path, srcname)
11211121
if os.path.isdir(srcpath) or os.path.islink(srcpath):
@@ -1156,7 +1156,7 @@ def initialize_options(self):
11561156
raise DistutilsSetupError("Sphinx not found - aborting")
11571157
self.html_dir = "html"
11581158

1159-
# creating directories html/pyside2/shiboken6
1159+
# creating directories html/pyside6/shiboken6
11601160
try:
11611161
if not os.path.isdir(self.html_dir):
11621162
os.mkdir(self.html_dir)
@@ -1169,7 +1169,7 @@ def initialize_options(self):
11691169
os.mkdir(out_shiboken)
11701170
self.out_dir = out_shiboken
11711171
# We know that on the shiboken step, we already created the
1172-
# 'pyside2' directory
1172+
# 'pyside6' directory
11731173
elif self.name == PYSIDE:
11741174
self.out_dir = os.path.join(self.html_dir, PYSIDE)
11751175
except:

build_scripts/platforms/unix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,14 @@ def adjusted_lib_name(name, version):
175175
"{st_build_dir}/{st_package_name}/glue",
176176
vars=vars)
177177

178-
# <source>/pyside2/{st_package_name}/support/* ->
178+
# <source>/pyside6/{st_package_name}/support/* ->
179179
# <setup>/{st_package_name}/support/*
180180
copydir(
181181
f"{{build_dir}}/{PYSIDE}/{{st_package_name}}/support",
182182
"{st_build_dir}/{st_package_name}/support",
183183
vars=vars)
184184

185-
# <source>/pyside2/{st_package_name}/*.pyi ->
185+
# <source>/pyside6/{st_package_name}/*.pyi ->
186186
# <setup>/{st_package_name}/*.pyi
187187
copydir(
188188
f"{{build_dir}}/{PYSIDE}/{{st_package_name}}",

build_scripts/platforms/windows_desktop.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def prepare_packages_win32(self, vars):
140140
vars=vars)
141141

142142
if config.is_internal_pyside_build():
143-
# <build>/pyside2/{st_package_name}/*.pdb ->
143+
# <build>/pyside6/{st_package_name}/*.pdb ->
144144
# <setup>/{st_package_name}
145145
copydir(
146146
f"{{build_dir}}/{PYSIDE}/{{st_package_name}}",
@@ -186,14 +186,14 @@ def prepare_packages_win32(self, vars):
186186
"{st_build_dir}/{st_package_name}/glue",
187187
vars=vars)
188188

189-
# <source>/pyside2/{st_package_name}/support/* ->
189+
# <source>/pyside6/{st_package_name}/support/* ->
190190
# <setup>/{st_package_name}/support/*
191191
copydir(
192192
f"{{build_dir}}/{PYSIDE}/{{st_package_name}}/support",
193193
"{st_build_dir}/{st_package_name}/support",
194194
vars=vars)
195195

196-
# <source>/pyside2/{st_package_name}/*.pyi ->
196+
# <source>/pyside6/{st_package_name}/*.pyi ->
197197
# <setup>/{st_package_name}/*.pyi
198198
copydir(
199199
"{build_dir}/{PYSIDE}/{st_package_name}",
@@ -367,7 +367,7 @@ def qt_build_config_filter(patterns, file_name, file_full_path):
367367

368368
# In debug_and_release case, choosing which files to copy
369369
# is more difficult. We want to copy only the files that
370-
# match the PySide2 build type. So if PySide2 is built in
370+
# match the PySide6 build type. So if PySide6 is built in
371371
# debug mode, we want to copy only Qt debug libraries
372372
# (ending with "d.dll"). Or vice versa. The problem is that
373373
# some libraries have "d" as the last character of the

build_scripts/setup_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def run_setup(self):
129129
raise RuntimeError("Invalid '{}' option given to --build-type. "
130130
.format(config.build_type))
131131

132-
# Build everything: shiboken6, shiboken6-generator and PySide2.
132+
# Build everything: shiboken6, shiboken6-generator and PySide6.
133133
help_requested = '--help' in self.sub_argv or '-h' in self.sub_argv
134134
if help_requested:
135135
self.add_setup_internal_invocation(config.pyside_option_name)

build_scripts/versions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838
#############################################################################
3939

4040

41-
PYSIDE = 'pyside2'
42-
PYSIDE_MODULE = 'PySide2'
41+
PYSIDE = 'pyside6'
42+
PYSIDE_MODULE = 'PySide6'
4343
SHIBOKEN = 'shiboken6'

build_scripts/wheel_override.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def wheel_dist_name(self):
100100
# Slightly modified version of wheel's wheel_dist_name
101101
# method, to add the Qt version as well.
102102
# Example:
103-
# PySide2-5.6-5.6.4-cp27-cp27m-macosx_10_10_intel.whl
104-
# The PySide2 version is "5.6".
103+
# PySide6-5.6-5.6.4-cp27-cp27m-macosx_10_10_intel.whl
104+
# The PySide6 version is "5.6".
105105
# The Qt version built against is "5.6.4".
106106
wheel_version = "{}-{}".format(self._package_version, get_qt_version())
107107
components = (_safer_name(self.distribution.get_name()), wheel_version)

build_scripts/wheel_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def get_qt_version():
7979

8080
@memoize
8181
def get_package_version():
82-
""" Returns the version string for the PySide2 package. """
82+
""" Returns the version string for the PySide6 package. """
8383
setup_script_dir = os.getcwd()
8484
pyside_version_py = os.path.join(
8585
setup_script_dir, "sources", PYSIDE, "pyside_version.py")
@@ -112,7 +112,7 @@ def macos_qt_min_deployment_target():
112112
@memoize
113113
def macos_pyside_min_deployment_target():
114114
"""
115-
Compute and validate PySide2 MACOSX_DEPLOYMENT_TARGET value.
115+
Compute and validate PySide6 MACOSX_DEPLOYMENT_TARGET value.
116116
Candidate sources that are considered:
117117
- setup.py provided value
118118
- maximum value between minimum deployment target of the

coin_build_instructions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def is_snapshot_build():
9494
"""
9595
setup_script_dir = get_current_script_path()
9696
pyside_version_py = os.path.join(
97-
setup_script_dir, "sources", "pyside2", "pyside_version.py")
97+
setup_script_dir, "sources", "pyside6", "pyside_version.py")
9898
d = get_python_dict(pyside_version_py)
9999

100100
release_version_type = d['release_version_type']

examples/3d/simple3d.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
##
4040
#############################################################################
4141

42-
"""PySide2 port of the qt3d/simple-cpp example from Qt v5.x"""
42+
"""PySide6 port of the qt3d/simple-cpp example from Qt v5.x"""
4343

4444
import sys
45-
from PySide2.QtCore import(Property, QObject, QPropertyAnimation, Signal)
46-
from PySide2.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D)
47-
from PySide2.Qt3DCore import (Qt3DCore)
48-
from PySide2.Qt3DExtras import (Qt3DExtras)
45+
from PySide6.QtCore import(Property, QObject, QPropertyAnimation, Signal)
46+
from PySide6.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D)
47+
from PySide6.Qt3DCore import (Qt3DCore)
48+
from PySide6.Qt3DExtras import (Qt3DExtras)
4949

5050
class OrbitTransformController(QObject):
5151
def __init__(self, parent):

examples/axcontainer/axviewer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
##
4040
#############################################################################
4141

42-
"""PySide2 Active Qt Viewer example"""
42+
"""PySide6 Active Qt Viewer example"""
4343

4444
import sys
45-
from PySide2.QtAxContainer import QAxSelect, QAxWidget
46-
from PySide2.QtGui import QAction
47-
from PySide2.QtWidgets import (QApplication, QDialog,
45+
from PySide6.QtAxContainer import QAxSelect, QAxWidget
46+
from PySide6.QtGui import QAction
47+
from PySide6.QtWidgets import (QApplication, QDialog,
4848
QMainWindow, QMessageBox, QToolBar)
4949

5050
class MainWindow(QMainWindow):

0 commit comments

Comments
 (0)