Skip to content

Commit a7fe8c0

Browse files
authored
Merge pull request #317 from GeoNode/ISSUE_316
Poetry fails in GitHub CI
2 parents ccaf22c + 6a7cd3f commit a7fe8c0

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

pluginadmin.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -290,19 +290,19 @@ def _find_sip_files(sip_dir) -> typing.List[Path]:
290290

291291

292292
def _get_virtualenv_site_packages_dir() -> Path:
293-
venv_lib_root = Path(sys.executable).parents[1] / "lib"
294-
for item in [i for i in venv_lib_root.iterdir() if i.is_dir()]:
295-
if item.name.startswith("python"):
296-
python_lib_path = item
297-
break
298-
else:
299-
raise RuntimeError("Could not find site_packages_dir")
300-
site_packages_dir = python_lib_path / "site-packages"
301-
if site_packages_dir.is_dir():
302-
result = site_packages_dir
303-
else:
304-
raise RuntimeError(f"{site_packages_dir} does not exist")
305-
return result
293+
venv_root = Path(sys.executable).parents[1]
294+
295+
for lib_dir_name in ("lib", "lib64"):
296+
venv_lib_root = venv_root / lib_dir_name
297+
if not venv_lib_root.exists():
298+
continue
299+
for item in [i for i in venv_lib_root.iterdir() if i.is_dir()]:
300+
if item.name.startswith("python"):
301+
python_lib_path = item
302+
site_packages_dir = python_lib_path / "site-packages"
303+
if site_packages_dir.is_dir():
304+
return site_packages_dir
305+
raise RuntimeError("Could not find site_packages_dir (checked lib and lib64)")
306306

307307
def _get_author_names(authors):
308308
return [author.split("<")[0].strip() for author in authors]

0 commit comments

Comments
 (0)