first commit

This commit is contained in:
sjk
2025-12-19 22:36:48 +08:00
commit 6802624e59
185 changed files with 43430 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package service
import (
"path/filepath"
"runtime"
)
// getPythonPath 获取虚拟环境中的Python解释器路径(跨平台)
func getPythonPath(backendDir string) string {
if runtime.GOOS == "windows" {
// Windows: venv\Scripts\python.exe
return filepath.Join(backendDir, "venv", "Scripts", "python.exe")
}
// Linux/Mac: venv/bin/python
return filepath.Join(backendDir, "venv", "bin", "python")
}