From 7fe63f7e3e848af843baa909930c1a61dcc2fbdd Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 23 Dec 2014 10:06:35 -0500 Subject: Extract filtering of extensions that need stubs. --- setuptools/command/build_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setuptools/command/build_ext.py') diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index dae9c81e..5327a030 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -198,8 +198,8 @@ class build_ext(_build_ext): def get_outputs(self): outputs = _build_ext.get_outputs(self) optimize = self.get_finalized_command('build_py').optimize - for ext in self.extensions: - if ext._needs_stub: + ns_ext = (ext for ext in self.extensions if ext._needs_stub) + for ext in ns_ext: base = os.path.join(self.build_lib, *ext._full_name.split('.')) outputs.append(base + '.py') outputs.append(base + '.pyc') -- cgit v1.2.3