summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2023-02-06 18:20:03 -0500
committerGitHub <noreply@github.com>2023-02-06 18:20:03 -0500
commit854862f228aa727b8ad88e1c432027767aff9db1 (patch)
tree72497c62cad9d70dd9d8ebf2869e47562aec78be
parent8fe7b5f2eee8a1eea501be3635e6e7af9553db6d (diff)
parent7e751d33d42de2ce9bdb08dcd0a1bd5d5b85eed9 (diff)
downloadpython-setuptools-git-854862f228aa727b8ad88e1c432027767aff9db1.tar.gz
Merge pull request #203 from fweimer-rh/ccompiler-windows
distutils.ccompiler: Remove correct executable file on Windows
-rw-r--r--distutils/ccompiler.py4
-rw-r--r--distutils/tests/test_ccompiler.py1
2 files changed, 3 insertions, 2 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)
diff --git a/distutils/tests/test_ccompiler.py b/distutils/tests/test_ccompiler.py
index aa4c7b35..c868a56b 100644
--- a/distutils/tests/test_ccompiler.py
+++ b/distutils/tests/test_ccompiler.py
@@ -55,7 +55,6 @@ def test_set_include_dirs(c_file):
compiler.compile(_make_strs([c_file]))
-@pytest.mark.xfail('platform.system() == "Windows"')
def test_has_function_prototype():
# Issue https://github.com/pypa/setuptools/issues/3648
# Test prototype-generating behavior.