-
-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Labels
Description
make_cffi.py incorrectly finds compiler:
- It does not call customize_compiler() function, which would make code respect user-set
CCenvironmental variable. - It uses
compiler.executables["compiler"], which is only a class-default non-customized value.compiler.compilershould be called instead.
Compare:
$ CC="x86_64-pc-linux-gnu-gcc" python -c 'import distutils.ccompiler; compiler = distutils.ccompiler.new_compiler(); print(compiler.executables["compiler"])'
['cc']
$ CC="x86_64-pc-linux-gnu-gcc" python -c 'import distutils.ccompiler; compiler = distutils.ccompiler.new_compiler(); distutils.sysconfig.customize_compiler(compiler); print(compiler.compiler)'
['x86_64-pc-linux-gnu-gcc']
Patch: make_cffi.patch.txt