Skip to content

Commit

Permalink
Prefer generator expression in VCRuntimeRedist
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 3, 2024
1 parent 1a9d873 commit 2629280
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setuptools/msvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,11 +1406,11 @@ def VCRuntimeRedist(self):
)

# vcruntime path
for prefix, crt_dir in itertools.product(prefixes, crt_dirs):
path = join(prefix, arch_subdir, crt_dir, vcruntime)
if isfile(path):
return path
return None
candidate_paths = (
join(prefix, arch_subdir, crt_dir, vcruntime)
for (prefix, crt_dir) in itertools.product(prefixes, crt_dirs)
)
return next(filter(isfile, candidate_paths), None)

def return_env(self, exists=True):
"""
Expand Down

0 comments on commit 2629280

Please sign in to comment.