diff options
| author | Jaime Resano <Jaime.Resano-Aisa@qt.io> | 2025-02-13 17:30:45 +0100 |
|---|---|---|
| committer | Jaime Resano <Jaime.RESANO-AISA@qt.io> | 2025-03-11 13:41:54 +0000 |
| commit | 2384da479caa9fe36e64d0f0f3f8f69fff06d6be (patch) | |
| tree | fbf5a92e524045c732486870bd768ef29ce00949 /src/plugins/python/pythonutils.cpp | |
| parent | 69b9d6cb82d6231151258f880e3c579b4c2d4522 (diff) | |
Add pyproject.toml support for Python projects
This patch adds support for the standard Python project configuration
file: pyproject.toml. It is intended to replace *.pyproject files.
Task-number: QTCREATORBUG-22492
Task-number: PYSIDE-2714
Change-Id: I783ee7b49be23c61b0a501ef9bbd722cc652ad14
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jaime Resano <Jaime.RESANO-AISA@qt.io>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
| -rw-r--r-- | src/plugins/python/pythonutils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 3cec49a2cd5..1bc72aed0f4 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -44,7 +44,8 @@ FilePath detectPython(const FilePath &documentPath) FilePaths dirs = Environment::systemEnvironment().path(); - if (project && project->mimeType() == Constants::C_PY_PROJECT_MIME_TYPE) { + if (project && (project->mimeType() == Constants::C_PY_PROJECT_MIME_TYPE + || project->mimeType() == Constants::C_PY_PROJECT_MIME_TYPE_TOML)) { if (auto bc = qobject_cast<PythonBuildConfiguration *>(project->activeBuildConfiguration())) return bc->python(); if (const std::optional<Interpreter> python = PythonKitAspect::python(project->activeKit())) @@ -248,4 +249,4 @@ QString pythonVersion(const FilePath &python) return QString(); } -} // Python::Internal +} // namespace Python::Internal |
