diff options
Diffstat (limited to 'setuptools/command/build_ext.py')
| -rw-r--r-- | setuptools/command/build_ext.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py index 7ad5a87a..cbfe3ec1 100644 --- a/setuptools/command/build_ext.py +++ b/setuptools/command/build_ext.py @@ -104,7 +104,8 @@ class build_ext(_build_ext): # Always copy, even if source is older than destination, to ensure # that the right extensions for the current Python/platform are # used. - self.copy_file(regular_file, inplace_file, level=self.verbose) + if os.path.exists(regular_file) or not ext.optional: + self.copy_file(regular_file, inplace_file, level=self.verbose) if ext._needs_stub: inplace_stub = self._get_equivalent_stub(ext, inplace_file) |
