Skip to content

Commit

Permalink
Filter Python .pth files
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Aug 12, 2021
1 parent aa28386 commit 0f9fd1d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion reprozip/reprozip/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ def python(files, input_files, **kwargs):
for i in irange(len(input_files)):
lst = []
for path in input_files[i]:
if path.ext in (b'.py', b'.pyc'):
if (
path.ext in (b'.py', b'.pyc')
or (
b'site-packages' in path.components
and path.ext == b'.pth'
)
):
logger.info("Removing input %s", path)
else:
lst.append(path)
Expand Down

0 comments on commit 0f9fd1d

Please sign in to comment.