File tree 2 files changed +17
-3
lines changed 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,14 @@ public static void InitializeLibrary()
151
151
{
152
152
if ( ! libraryLoaded )
153
153
{
154
- var _loader = Python . Runtime . Platform . LibraryLoader . Get ( Runtime . OperatingSystem ) ;
154
+ #if MONO_OSX
155
+ var os = Python . Runtime . Platform . OperatingSystemType . Darwin ;
156
+ #elif MONO_LINUX
157
+ var os = Python . Runtime . Platform . OperatingSystemType . Linux ;
158
+ #else
159
+ var os = Python . Runtime . Platform . OperatingSystemType . Windows ;
160
+ #endif
161
+ var _loader = Python . Runtime . Platform . LibraryLoader . Get ( os ) ;
155
162
_loader . Load ( Runtime . pythonlib , Runtime . dllDirectory ) ;
156
163
libraryLoaded = true ;
157
164
}
Original file line number Diff line number Diff line change @@ -318,9 +318,16 @@ internal static void Initialize(bool initSigs = false)
318
318
InitializePlatformData ( ) ;
319
319
320
320
IntPtr dllLocal = IntPtr . Zero ;
321
- var loader = LibraryLoader . Get ( OperatingSystem ) ;
322
321
323
- if ( ! ( OperatingSystem == OperatingSystemType . Windows ) )
322
+ #if MONO_OSX
323
+ var os = Python . Runtime . Platform . OperatingSystemType . Darwin ;
324
+ #elif MONO_LINUX
325
+ var os = Python . Runtime . Platform . OperatingSystemType . Linux ;
326
+ #else
327
+ var os = Python . Runtime . Platform . OperatingSystemType . Windows ;
328
+ #endif
329
+ var loader = LibraryLoader . Get ( os ) ;
330
+ if ( ! ( os == OperatingSystemType . Windows ) )
324
331
{
325
332
if ( _PythonDll != "__Internal" )
326
333
{
You can’t perform that action at this time.
0 commit comments