Fix Windows build for PySide6 (illegal file names)

Building the `.msi` on Windows was failing in the `candle.exe` step due
to some files in the PySide6 library being too long (PySide6/examples)
or having illegal character (`+`) in their file names
(PySide6/qml/QtQuick).

Skipping copying these files to the `.msi` fixes the issue. Skipping
`examples/` should be of no impact since they're just examples and
skipping `qml/QtQuick` shouldn't cause issues because we don't use QML.

Reverts commit `bbbf822` and adapts it from PySide2 to PySide6.
This commit is contained in:
deeplow 2023-02-21 10:20:26 +00:00
parent 541fe7f382
commit fb85421db8
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -22,6 +22,15 @@ def build_data(dirname, dir_prefix, id_, name):
else:
id_prefix = id_
# Skip lib/PySide6/examples folder due to ilegal file names
if "\\build\\exe.win-amd64-3.10\\lib\\PySide6\\examples" in dirname:
continue
# Skip lib/PySide6/qml/QtQuick folder due to ilegal file names
# XXX Since we're not using Qml it should be no problem
if "\\build\\exe.win-amd64-3.10\\lib\\PySide6\\qml\\QtQuick" in dirname:
continue
id_value = f"{id_prefix}{basename.capitalize().replace('-', '_')}"
data["dirs"].append(
build_data(