File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ def load():
2929 if _LOADED :
3030 return
3131
32- from .find_libpython import linked_libpython
3332 from os .path import join , dirname
3433
3534 if _RUNTIME is None :
@@ -38,21 +37,11 @@ def load():
3837 set_default_runtime ()
3938
4039 dll_path = join (dirname (__file__ ), "runtime" , "Python.Runtime.dll" )
41- libpython = linked_libpython ()
42-
43- if libpython and _FFI is None and sys .platform != "win32" :
44- # Load and leak libpython handle s.t. the .NET runtime doesn't dlcloses
45- # it
46- import posix
47-
48- import cffi
49- _FFI = cffi .FFI ()
50- _FFI .dlopen (libpython , posix .RTLD_NODELETE | posix .RTLD_LOCAL )
51-
40+
5241 _LOADER_ASSEMBLY = _RUNTIME .get_assembly (dll_path )
5342
5443 func = _LOADER_ASSEMBLY ["Python.Runtime.Loader.Initialize" ]
55- if func (f" { libpython or '' } " .encode ("utf8" )) != 0 :
44+ if func ('' .encode ("utf8" )) != 0 :
5645 raise RuntimeError ("Failed to initialize Python.Runtime.dll" )
5746
5847 import atexit
You can’t perform that action at this time.
0 commit comments