Skip to content

Commit

Permalink
Merge branch '1.x' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Sep 22, 2021
2 parents e693636 + 7ebf00a commit 668031b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 7 additions & 1 deletion reprozip/reprozip/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ def python(files, input_files, **kwargs):
for i in range(len(input_files)):
lst = []
for path in input_files[i]:
if path.suffix in ('.py', '.pyc'):
if (
path.suffix in ('.py', '.pyc')
or (
'site-packages' in path.parts
and path.suffix == '.pth'
)
):
logger.info("Removing input %s", path)
else:
lst.append(path)
Expand Down
12 changes: 9 additions & 3 deletions reprozip/reprozip/tracer/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@ def get_files(conn):
# Adds symbolic links as read files
for filename in find_all_links(r_name.parent if r_mode & FILE_LINK
else r_name, False):
if filename not in files:
try:
f = files[filename]
except KeyError:
f = TracedFile(filename)
f.read(run)
files[f.path] = f
f.read(run)
# Go to final target
if not r_mode & FILE_LINK:
r_name = r_name.resolve()
Expand All @@ -175,7 +177,11 @@ def get_files(conn):
files[fp.path] = fp

# Identifies input files
if r_name.is_file() and r_name not in executed:
if (
not r_mode & FILE_LINK
and r_name.is_file()
and r_name not in executed
):
access_files[-1].add(f)
cur.close()

Expand Down

0 comments on commit 668031b

Please sign in to comment.