Skip to content

Commit a0a67c5

Browse files
committed
force require App Python for linux platform(release or not)
Signed-off-by: Jack Lau <[email protected]>
1 parent efa4270 commit a0a67c5

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/builder/src/ai_processing_page.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void AIProcessingPage::OnPageActivated() {
4646

4747
// Check if Python is installed for AI Processing
4848
// In Debug mode, skip installation dialog (assume developer has configured environment)
49-
#ifdef NDEBUG
49+
#if defined(NDEBUG) || defined(__linux__)
5050
// Release mode: check Python and offer installation
5151
PythonManager pythonManager;
5252

src/builder/src/python_manager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ PythonManager::PythonManager(QObject *parent)
7373
SetStatus(Status::NotInstalled, "Python installed but packages missing");
7474
}
7575
} else {
76-
#ifndef NDEBUG
77-
// Debug mode only: check if system Python 3.9 with required packages exists
76+
#if !defined(NDEBUG) && !defined(__linux__)
77+
// Debug mode on macOS/Windows only: check if system Python 3.9 exists
7878
// This allows developers to use their existing Python environment
7979
if (CheckSystemPython()) {
8080
SetStatus(Status::Installed, "Using system Python 3.9 with required packages");
8181
} else {
8282
SetStatus(Status::NotInstalled, "Python not installed");
8383
}
8484
#else
85-
// Release mode: Only use bundled Python, never fall back to system Python
85+
// Release mode OR Linux: Only use App Python, never fall back to system Python
8686
SetStatus(Status::NotInstalled, "Python not installed");
8787
#endif
8888
}

src/transcoder/src/transcoder_bmf.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ bool TranscoderBMF::setup_python_environment() {
9797
BMFLOG(BMF_WARNING) << "BMF_ROOT_PATH not set. Please set it in environment or CMake.";
9898
BMFLOG(BMF_WARNING) << "Example: export BMF_ROOT_PATH=/path/to/bmf";
9999
}
100-
100+
#ifndef __linux__
101101
return true; // Debug mode always succeeds (uses system Python)
102+
#endif
102103
#endif
103104

104105
// Release mode: Set up PYTHONPATH for bundled BMF libraries and external Python

0 commit comments

Comments
 (0)