-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -2844,12 +2844,10 @@ SEXP main_process_python_info_unix() { | |||||||||||
return R_NilValue; | ||||||||||||
} | ||||||||||||
|
||||||||||||
|
||||||||||||
if (PyGILState_Ensure == NULL) | ||||||||||||
loadSymbol(pLib, "PyGILState_Ensure", (void**)&PyGILState_Ensure); | ||||||||||||
|
||||||||||||
if (PyGILState_Release == NULL) | ||||||||||||
if (PyGILState_Release == NULL) { | ||||||||||||
loadSymbol(pLib, "PyGILState_Release", (void**)&PyGILState_Release); | ||||||||||||
loadSymbol(pLib, "PyGILState_Ensure", (void**)&PyGILState_Ensure); | ||||||||||||
} | ||||||||||||
|
||||||||||||
GILScope scope; | ||||||||||||
|
||||||||||||
|
@@ -2930,6 +2928,19 @@ void py_initialize(const std::string& python, | |||||||||||
if (Py_IsInitialized()) { | ||||||||||||
// if R is embedded in a python environment, rpycall has to be loaded as a regular | ||||||||||||
// module. | ||||||||||||
|
||||||||||||
// We don't currently support running embedded on windows? | ||||||||||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
t-kalinowski
Author
Member
|
py_embedded <- !is.null(main_process_python_info()) |
and main_process_python_info()
always returns NULL
on Windows,
Lines 2807 to 2810 in 6592fa7
SEXP main_process_python_info_win32() { | |
// NYI | |
return R_NilValue; | |
} |
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
randy3k
Sep 16, 2024
Contributor
If I remember correctly, on windows, symbols are not loaded into the main process, they will to be loaded from the DLL directly via LoadLibraryEx.
As far as I can tell, the previous version v1.38 is compatible running embedded on windows.
See for example this test for rchitect (a package used by radian to initialize R) https://github.com/randy3k/rchitect/actions/runs/10399127851/job/28797737515