diff options
Diffstat (limited to 'lua/mason-core/installer/managers/pypi.lua')
| -rw-r--r-- | lua/mason-core/installer/managers/pypi.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/mason-core/installer/managers/pypi.lua b/lua/mason-core/installer/managers/pypi.lua index 8dab25d9..f60a8ede 100644 --- a/lua/mason-core/installer/managers/pypi.lua +++ b/lua/mason-core/installer/managers/pypi.lua @@ -85,8 +85,10 @@ local function create_venv(pkg) -- 2. Resolve suitable versioned python3 installation (python3.12, python3.11, etc.). local versioned_candidates = {} if supported_python_versions ~= nil then - log.fmt_debug("Finding versioned candidates for %s", supported_python_versions) - versioned_candidates = get_versioned_candidates(supported_python_versions) + if stock_target and not pep440_check_version(tostring(stock_target.version), supported_python_versions) then + log.fmt_debug("Finding versioned candidates for %s", supported_python_versions) + versioned_candidates = get_versioned_candidates(supported_python_versions) + end end local target = resolve_python3(versioned_candidates) or stock_target |
