diff --git a/test/runner/lib/util.py b/test/runner/lib/util.py index 37348f9a448..1432fcb1225 100644 --- a/test/runner/lib/util.py +++ b/test/runner/lib/util.py @@ -489,6 +489,17 @@ def common_environment(): # export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES 'OBJC_DISABLE_INITIALIZE_FORK_SAFETY', '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)) diff --git a/test/runner/tox.ini b/test/runner/tox.ini index 84e01aae43c..cd2533fd22a 100644 --- a/test/runner/tox.ini +++ b/test/runner/tox.ini @@ -5,7 +5,7 @@ minversion = 2.5.0 [testenv] changedir = {toxinidir}/../../ 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 deps = setuptools == 35.0.2 wheel < 0.30.0 ; python_version < '2.7'