Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix MacOS builds when Python 3.11 is used

Dmitry Kazakovc82c9319fc41
diff --git a/packaging/macos/macos-deploy.py b/packaging/macos/macos-deploy.py
index d3815e80d7..73e723c8ba 100644
--- a/packaging/macos/macos-deploy.py
+++ b/packaging/macos/macos-deploy.py
@@ -262,7 +262,9 @@ def kritaStripPythonFramework(frameworkPath: pathlib.Path):
files_for_rm.append(frameworkPath.joinpath('Versions','Current', 'Resources','Python.app'))
for file in files_for_rm:
- if file.exists(follow_symlinks=False):
+ # TODO: change to `file.exists(follow_symlinks=False)` when
+ # Python 3.12 becomes the minimum version
+ if file.is_symlink() or file.exists():
if file.is_dir():
shutil.rmtree(file, ignore_errors=True)
else: