Skip to content

Commit fde84bf

Browse files
committed
cffi: call distutils.sysconfig.customize_compiler()
Closes #103.
1 parent 6f83534 commit fde84bf

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

NEWS.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,22 @@ Other Actions Not Blocking Release
7676
0.14.0 (not yet released)
7777
=========================
7878

79+
Bug Fixes
80+
---------
81+
82+
* Some internal fields of C structs are now explicitly initialized.
83+
(Possible fix for #105.)
84+
* The ``make_cffi.py`` script used to build the CFFI bindings now
85+
calls ``distutils.sysconfig.customize_compiler()`` so compiler
86+
customizations (such as honoring the ``CC`` environment variable)
87+
are performed. Patch by @Arfrever. (#103)
88+
7989
Changes
8090
-------
8191

8292
* Bundled zstandard library upgraded from 1.4.4 to 1.4.5.
8393
* ``setup.py`` is now executable.
8494
* Python code reformatted with black using 80 character line lengths.
85-
* Some internal fields of C structs are now explicitly initialized.
86-
(Possible fix for #105.)
8795

8896
0.13.0 (released 2019-12-28)
8997
============================

make_cffi.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import cffi
1010
import distutils.ccompiler
11+
import distutils.sysconfig
1112
import os
1213
import re
1314
import subprocess
@@ -76,6 +77,10 @@
7677
if hasattr(compiler, "initialize"):
7778
compiler.initialize()
7879

80+
# This performs platform specific customizations, including honoring
81+
# environment variables like CC.
82+
distutils.sysconfig.customize_compiler(compiler)
83+
7984
# Distutils doesn't set compiler.preprocessor, so invoke the preprocessor
8085
# manually.
8186
if compiler.compiler_type == "unix":

0 commit comments

Comments
 (0)