Skip to content

make_cffi.py incorrectly finds compiler #103

@Arfrever

Description

@Arfrever

make_cffi.py incorrectly finds compiler:

  • It does not call customize_compiler() function, which would make code respect user-set CC environmental variable.
  • It uses compiler.executables["compiler"], which is only a class-default non-customized value. compiler.compiler should 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions