diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-23 10:04:35 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-12-23 10:04:35 -0500 |
commit | d9de5582d21b62794bbdb39c0da11d711889c442 (patch) | |
tree | 4c8a2d97df5fa8069c9b556c9356038164ebb760 /setuptools/command/build_ext.py | |
parent | 8f8ff1d8c42f1aeb371134abd9a96e3f876e09be (diff) | |
download | external_python_setuptools-d9de5582d21b62794bbdb39c0da11d711889c442.tar.gz external_python_setuptools-d9de5582d21b62794bbdb39c0da11d711889c442.tar.bz2 external_python_setuptools-d9de5582d21b62794bbdb39c0da11d711889c442.zip |
Rewrite short-circuit for/if/else loop as any on generator expression.
Diffstat (limited to 'setuptools/command/build_ext.py')
-rw-r--r-- | setuptools/command/build_ext.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index b6eb89eb..dae9c81e 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -193,10 +193,7 @@ class build_ext(_build_ext): # XXX static-compiled version libnames = dict.fromkeys([lib._full_name for lib in self.shlibs]) pkg = '.'.join(ext._full_name.split('.')[:-1] + ['']) - for libname in ext.libraries: - if pkg + libname in libnames: - return True - return False + return any(pkg + libname in libnames for libname in ext.libraries) def get_outputs(self): outputs = _build_ext.get_outputs(self) |