mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
Merge pull request #30199 from IlsooByun/cmake_ptyhon_var
build/ops: fix build fail related to PYTHON_EXECUTABLE variable Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
9e7ecf708a
@ -316,7 +316,7 @@
|
||||
/* Define if endian type is little endian */
|
||||
#cmakedefine CEPH_LITTLE_ENDIAN
|
||||
|
||||
#cmakedefine PYTHON_EXECUTABLE "@MGR_PYTHON_EXECUTABLE@"
|
||||
#cmakedefine MGR_PYTHON_EXECUTABLE "@MGR_PYTHON_EXECUTABLE@"
|
||||
|
||||
/* Define to 1 if you have the `getprogname' function. */
|
||||
#cmakedefine HAVE_GETPROGNAME 1
|
||||
|
@ -41,10 +41,10 @@ void PyModuleRegistry::init()
|
||||
// Set up global python interpreter
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#define WCHAR(s) L ## #s
|
||||
Py_SetProgramName(const_cast<wchar_t*>(WCHAR(PYTHON_EXECUTABLE)));
|
||||
Py_SetProgramName(const_cast<wchar_t*>(WCHAR(MGR_PYTHON_EXECUTABLE)));
|
||||
#undef WCHAR
|
||||
#else
|
||||
Py_SetProgramName(const_cast<char*>(PYTHON_EXECUTABLE));
|
||||
Py_SetProgramName(const_cast<char*>(MGR_PYTHON_EXECUTABLE));
|
||||
#endif
|
||||
// Add more modules
|
||||
if (g_conf().get_val<bool>("daemonize")) {
|
||||
|
Loading…
Reference in New Issue
Block a user