workaround hack for macOS
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user