Merge branch 'master' into mliappy3

This commit is contained in:
Richard Berger
2020-12-18 09:16:44 -05:00
115 changed files with 1866 additions and 1632 deletions

View File

@ -67,7 +67,15 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp)
#endif
Py_Initialize();
PyEval_InitThreads();
// only needed for Python 2.x and Python 3 < 3.7
// With Python 3.7 this function is now called by Py_Initialize()
// Deprecated since version 3.9, will be removed in version 3.11
#if PY_MAJOR_VERSION < 3 || PY_MINOR_VERSION < 7
if(!PyEval_ThreadsInitialized()) {
PyEval_InitThreads();
}
#endif
PyGILState_STATE gstate = PyGILState_Ensure();