diff options
| author | Florian Weimer <fweimer@redhat.com> | 2023-02-06 23:52:13 +0100 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2023-02-07 00:02:40 +0100 |
| commit | 7e751d33d42de2ce9bdb08dcd0a1bd5d5b85eed9 (patch) | |
| tree | ab7e9bb2692a7494dac11e458e48ab21866b82bf /distutils/ccompiler.py | |
| parent | 2f16327060394b21fadb6342ea83eec324512aaa (diff) | |
| download | python-setuptools-git-7e751d33d42de2ce9bdb08dcd0a1bd5d5b85eed9.tar.gz | |
distutils.ccompiler: Remove correct executable file on Windows
The previous code did not take into account the .exe file extension
on Windows.
Diffstat (limited to 'distutils/ccompiler.py')
| -rw-r--r-- | distutils/ccompiler.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/distutils/ccompiler.py b/distutils/ccompiler.py index 16147167..55f8a9ee 100644 --- a/distutils/ccompiler.py +++ b/distutils/ccompiler.py @@ -903,7 +903,9 @@ int main (int argc, char **argv) { except (LinkError, TypeError): return False else: - os.remove(os.path.join(self.output_dir or '', "a.out")) + os.remove( + self.executable_filename("a.out", output_dir=self.output_dir or '') + ) finally: for fn in objects: os.remove(fn) |
