diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2023-02-20 09:48:14 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2023-02-20 09:48:14 -0500 |
commit | d8094338c9b83d0d69eb2c47ae2fde7f11f45717 (patch) | |
tree | 54abaebba6c1aebc845d387ad8ba9b7f0c7c15b9 | |
parent | abd6dbb6dde4e6933061e3491acf331a7cd16658 (diff) | |
parent | 4435cec31b8eb5712aa8bf993bea3f07051c24d8 (diff) | |
download | python-setuptools-git-d8094338c9b83d0d69eb2c47ae2fde7f11f45717.tar.gz |
Merge https://github.com/pypa/distutils into distutils-4435cec3
-rw-r--r-- | setuptools/_distutils/ccompiler.py | 2 | ||||
-rw-r--r-- | setuptools/_distutils/tests/test_ccompiler.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/_distutils/ccompiler.py b/setuptools/_distutils/ccompiler.py index f4a8a897..1818fce9 100644 --- a/setuptools/_distutils/ccompiler.py +++ b/setuptools/_distutils/ccompiler.py @@ -860,7 +860,7 @@ class CCompiler: f = os.fdopen(fd, "w") try: for incl in includes: - f.write("""#include %s\n""" % incl) + f.write("""#include "%s"\n""" % incl) if not includes: # Use "char func(void);" as the prototype to follow # what autoconf does. This prototype does not match diff --git a/setuptools/_distutils/tests/test_ccompiler.py b/setuptools/_distutils/tests/test_ccompiler.py index 88497d25..49691d4b 100644 --- a/setuptools/_distutils/tests/test_ccompiler.py +++ b/setuptools/_distutils/tests/test_ccompiler.py @@ -66,15 +66,15 @@ def test_has_function_prototype(): assert compiler.has_function('exit') with pytest.deprecated_call(match='includes is deprecated'): # abort() is a valid expression with the <stdlib.h> prototype. - assert compiler.has_function('abort', includes=['<stdlib.h>']) + assert compiler.has_function('abort', includes=['stdlib.h']) with pytest.deprecated_call(match='includes is deprecated'): # But exit() is not valid with the actual prototype in scope. - assert not compiler.has_function('exit', includes=['<stdlib.h>']) + assert not compiler.has_function('exit', includes=['stdlib.h']) # And setuptools_does_not_exist is not declared or defined at all. assert not compiler.has_function('setuptools_does_not_exist') with pytest.deprecated_call(match='includes is deprecated'): assert not compiler.has_function( - 'setuptools_does_not_exist', includes=['<stdio.h>'] + 'setuptools_does_not_exist', includes=['stdio.h'] ) |