-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] distutils.ccompiler.CCompiler.has_function does not quote provided includes anymore #3820
Comments
Yeah, this was clearly an error on my part. I view |
Should I send a PR to fix this? |
@fweimer-rh, would it be possible to add quotes if the argument does not start with |
I believe that a PR to pypa/distutils mentioning this bug in setuptools should be the way to go. |
I would prefer to fix just this bug, it's an obsolete feature anyway because the headers won't work for function that take any parameters (and most functions do). Sorry for messing this up. |
Arguably, this is a historic wart in the interface, and subconsciously fixed it in commit 56a5b33 ("distutils.ccompiler: Make has_function work with more C99 compilers"). But it's clearly not a backwards-compatible change, so it's wrong and has to be reverted. Fixes pypa/setuptools#3820.
Arguably, this is a historic wart in the interface, which is why I subconsciously fixed it in commit 56a5b33 ("distutils.ccompiler: Make has_function work with more C99 compilers"). But it's clearly not a backwards-compatible change, so it's wrong and has to be reverted. Fixes pypa/setuptools#3820.
setuptools version
67.2.0
Python version
3.x
OS
Linux (but presumably applicable to all)
Additional environment information
No response
Description
As of 56a5b33 (setuptools 67.2.0), the
distutils.ccompiler.CCompiler.has_function
in thesetuptools
-provideddistutils
ceased to quote the providedincludes
in the generated test C file (here).Therefore, the compilation of the generated test C file always fails.
Expected behavior
The provided
includes
should be quoted (as before the change) to retain compatibility with older code using this function.How to Reproduce
Output
With
setuptools 67.2.0
:With
setuptools 67.1.0
:The text was updated successfully, but these errors were encountered: