MCPcopy Index your code
hub / github.com/celer-pkg/celer / GetDefaultPythonVersion

Function GetDefaultPythonVersion

buildtools/setup_python.go:254–261  ·  view source on GitHub ↗

GetDefaultPythonVersion returns the default Python version for the current platform. - Windows: reads from buildtools/static TOML python tool definition (via GetDefaultPythonVersion from build_tools.go) - Linux/macOS: returns detected system python3 version.

()

Source from the content-addressed store, hash-verified

252// - Windows: reads from buildtools/static TOML python tool definition (via GetDefaultPythonVersion from build_tools.go)
253// - Linux/macOS: returns detected system python3 version.
254func GetDefaultPythonVersion() string {
255 // For Windows, delegate to build_tools implementation.
256 if runtime.GOOS == "windows" {
257 return getWindowsDefaultPythonVersion()
258 } else { // For Linux/macOS, detect system python3 version.
259 return python.GetSystemPythonVersion()
260 }
261}
262
263// isPackageInstalled checks if a Python package is already installed.
264// This avoids frequent PyPI requests that could lead to IP blocking.

Callers 5

writePythonVenvConfigMethod · 0.92
pip3InstallFunction · 0.85
setupPythonFunction · 0.85
shouldUseCondaFunction · 0.85

Calls 2

GetSystemPythonVersionFunction · 0.92

Tested by

no test coverage detected