mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-01 01:12:20 +00:00
Make lib iteration platform-specific (#5406)
This commit is contained in:
parent
6587fb844a
commit
979049b2a6
3 changed files with 21 additions and 8 deletions
|
@ -140,7 +140,7 @@ fn find_python_search_paths<Host: host::Host>(config: &Config, host: &Host) -> V
|
|||
if let Some(venv) = config.venv.as_ref() {
|
||||
let mut found_paths = vec![];
|
||||
|
||||
for lib_name in ["lib", "Lib", "lib64"] {
|
||||
for lib_name in host.python_platform().lib_names() {
|
||||
let lib_path = venv_path.join(venv).join(lib_name);
|
||||
if let Some(site_packages_path) = find_site_packages_path(&lib_path, None) {
|
||||
// Add paths from any `.pth` files in each of the `site-packages` directories.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue