Make lib iteration platform-specific (#5406)

This commit is contained in:
Charlie Marsh 2023-06-28 09:52:20 -04:00 committed by GitHub
parent 6587fb844a
commit 979049b2a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 8 deletions

View file

@ -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.