Skip to content

Commit

Permalink
Try to fix/workaround CI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jherland committed Sep 19, 2024
1 parent 30c5c8e commit de059c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fawltydeps/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def debug_print(msg: str) -> None:
if found:
return

elif bin_python.is_file(): # Assume POSIX
elif bin_python.is_file() or bin_python.is_symlink(): # Assume POSIX
debug_print(" - on posix, found bin/python")
if bin_python.is_symlink():
debug_print(f" and points to {bin_python.readlink()!r}")
Expand Down
4 changes: 3 additions & 1 deletion fawltydeps/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def __post_init__(self) -> None:
super().__post_init__()
assert self.path.is_dir() # noqa: S101, sanity check

bin_python = self.path.parent.parent.parent / "bin/python"

# Support Windows projects
if sys.platform.startswith("win"):
if (
Expand All @@ -163,7 +165,7 @@ def __post_init__(self) -> None:
# Support vitualenvs, poetry2nix envs, system-wide installs, etc.
elif (
self.path.match("lib/python?.*/site-packages")
and (self.path.parent.parent.parent / "bin/python").is_file()
and (bin_python.is_file() or bin_python.is_symlink())
):
return # all ok

Expand Down

0 comments on commit de059c7

Please sign in to comment.