def _get_site_packages_path()

in ptr.py [0:0]


def _get_site_packages_path(venv_path: Path) -> Optional[Path]:
    lib_path = venv_path / ("Lib" if WINDOWS else "lib")
    for apath in lib_path.iterdir():
        if apath.is_dir() and apath.match("python*"):
            return apath / "site-packages"
        if apath.is_dir() and apath.name == "site-packages":
            return apath

    LOG.error(f"Unable to find a python lib dir in {lib_path}")
    return None