workaround hack for macOS

This commit is contained in:
Axel Kohlmeyer
2023-12-14 17:59:18 -05:00
parent c4626e982f
commit 172238f4ca

View File

@ -79,7 +79,7 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp)
// Force the stdout and stderr streams to be unbuffered.
bool unbuffered = PYTHONUNBUFFERED != nullptr && strcmp(PYTHONUNBUFFERED, "1") == 0;
#if PY_VERSION_HEX >= 0x030800f0
#if (PY_VERSION_HEX >= 0x030800f0) && !defined(__APPLE__)
PyConfig config;
PyConfig_InitPythonConfig(&config);
config.buffered_stdio = !unbuffered;
@ -87,6 +87,8 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp)
// Python Global configuration variable
Py_UnbufferedStdioFlag = unbuffered;
#endif
#else
#warning Cannot force stdout and stderr to be unbuffered
#endif
#ifdef MLIAP_PYTHON