Support passing CFLAGS and LDFLAGS.

This commit is contained in:
Matt Clay 2019-06-04 21:54:54 -07:00
parent 7a4dc4b1b0
commit 58f6604efa
2 changed files with 12 additions and 1 deletions

View file

@ -489,6 +489,17 @@ def common_environment():
# export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES # export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
'OBJC_DISABLE_INITIALIZE_FORK_SAFETY', 'OBJC_DISABLE_INITIALIZE_FORK_SAFETY',
'ANSIBLE_KEEP_REMOTE_FILES', 'ANSIBLE_KEEP_REMOTE_FILES',
# MacOS Homebrew Compatibility
# https://cryptography.io/en/latest/installation/#building-cryptography-on-macos
# This may also be required to install pyyaml with libyaml support when installed in non-standard locations.
# Example configuration for brew on macOS:
# export LDFLAGS="-L$(brew --prefix openssl)/lib/ -L$(brew --prefix libyaml)/lib/"
# export CFLAGS="-I$(brew --prefix openssl)/include/ -I$(brew --prefix libyaml)/include/"
# However, this is not adequate for PyYAML 3.13, which is the latest version supported on Python 2.6.
# For that version the standard location must be used, or `pip install` must be invoked with additional options:
# --global-option=build_ext --global-option=-L{path_to_lib_dir}
'LDFLAGS',
'CFLAGS',
) )
env.update(pass_vars(required=required, optional=optional)) env.update(pass_vars(required=required, optional=optional))

View file

@ -5,7 +5,7 @@ minversion = 2.5.0
[testenv] [testenv]
changedir = {toxinidir}/../../ changedir = {toxinidir}/../../
commands = {posargs} commands = {posargs}
passenv = HOME LC_ALL SHIPPABLE* ANSIBLE_KEEP_REMOTE_FILES passenv = HOME LC_ALL SHIPPABLE* ANSIBLE_KEEP_REMOTE_FILES LDFLAGS CFLAGS
args_are_paths = False args_are_paths = False
deps = setuptools == 35.0.2 deps = setuptools == 35.0.2
wheel < 0.30.0 ; python_version < '2.7' wheel < 0.30.0 ; python_version < '2.7'