From 7969644284ae0a1d09b3ab14a7a68f65c79e7976 Mon Sep 17 00:00:00 2001 From: Andrei Sabalenka Date: Thu, 22 Aug 2024 22:12:30 +0300 Subject: [PATCH] Qbs: Add option to specify custom Python pkg-config name (#4039) I am Gentoo maintainer of Tiled. In Gentoo, there may be many Python versions installed at the same time for compatibility reasons, and each version has separate name in pkg-config. For example, for Python 3.12 it would be named python-3.12-embed, so running pkg-config for python-embed will fail. Adding this option so it's possible to specify the correct name from build script. --- src/plugins/python/python.qbs | 2 +- tiled.qbs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/python/python.qbs b/src/plugins/python/python.qbs index f1c959d3ed..abe9403f00 100644 --- a/src/plugins/python/python.qbs +++ b/src/plugins/python/python.qbs @@ -22,7 +22,7 @@ TiledPlugin { Probes.PkgConfigProbe { id: pkgConfigPython3 - name: "python3-embed" + name: project.pythonPkgConfigName minVersion: "3.8" } diff --git a/tiled.qbs b/tiled.qbs index c8d5018d41..fb54d9ba13 100644 --- a/tiled.qbs +++ b/tiled.qbs @@ -18,6 +18,7 @@ Project { property bool sentry: false property bool dbus: true property string openSslPath: Environment.getEnv("OPENSSL_PATH") + property string pythonPkgConfigName: "python3-embed" references: [ "dist/archive.qbs",