Skip to content

Commit

Permalink
cffi: call distutils.sysconfig.customize_compiler()
Browse files Browse the repository at this point in the history
Closes #103.
  • Loading branch information
indygreg committed Jun 13, 2020
1 parent 6f83534 commit fde84bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 10 additions & 2 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,22 @@ Other Actions Not Blocking Release
0.14.0 (not yet released)
=========================

Bug Fixes
---------

* Some internal fields of C structs are now explicitly initialized.
(Possible fix for #105.)
* The ``make_cffi.py`` script used to build the CFFI bindings now
calls ``distutils.sysconfig.customize_compiler()`` so compiler
customizations (such as honoring the ``CC`` environment variable)
are performed. Patch by @Arfrever. (#103)

Changes
-------

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

0.13.0 (released 2019-12-28)
============================
Expand Down
5 changes: 5 additions & 0 deletions make_cffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import cffi
import distutils.ccompiler
import distutils.sysconfig
import os
import re
import subprocess
Expand Down Expand Up @@ -76,6 +77,10 @@
if hasattr(compiler, "initialize"):
compiler.initialize()

# This performs platform specific customizations, including honoring
# environment variables like CC.
distutils.sysconfig.customize_compiler(compiler)

# Distutils doesn't set compiler.preprocessor, so invoke the preprocessor
# manually.
if compiler.compiler_type == "unix":
Expand Down

0 comments on commit fde84bf

Please sign in to comment.