Skip to content

Commit

Permalink
Don't check if dir starts with python
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmehta24 committed Dec 18, 2024
1 parent 25d033b commit 0ed1b91
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/venvstacks/stacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,12 +1389,11 @@ def _ensure_portability(self) -> None:
# Wrapper and activation scripts are not used on deployment targets,
# so drop them entirely rather than making them portable
for item in self.executables_path.iterdir():
if not item.name.lower().startswith("python"):
if item.is_dir():
shutil.rmtree(item)
elif not item.name.lower().startswith("python"):
print(f" Dropping potentially non-portable file {str(item)!r}")
if item.is_dir():
shutil.rmtree(item)
else:
item.unlink()
item.unlink()
# Symlinks within the build folder should be relative
# Symlinks outside the build folder shouldn't exist
build_path = self.build_path
Expand Down

0 comments on commit 0ed1b91

Please sign in to comment.