python fixes for win32

This commit is contained in:
Vitor Santos Costa
2017-06-13 13:34:17 +01:00
parent bba62ea6eb
commit d06dd49dd0
10 changed files with 130 additions and 108 deletions

View File

@@ -4,14 +4,23 @@ import ctypes
import glob
import os.path
import sys
import platform
global yap_lib_path
yap_lib_path = os.path.dirname(__file__)
def load( dll ):
dll = glob.glob(os.path.join(yap_lib_path,dll))[0]
dll = os.path.abspath(dll)
ctypes.CDLL(dll, mode=ctypes.RTLD_GLOBAL)
if platform.system() == 'Windows':
def load( dll ):
dll = glob.glob(os.path.join(yap_lib_path,dll))[0]
dll = os.path.abspath(dll)
ctypes.WinDLL(dll)
else:
def load( dll ):
dll = glob.glob(os.path.join(yap_lib_path,dll))[0]
dll = os.path.abspath(dll)
ctypes.CDLL(dll, mode=ctypes.RTLD_GLOBAL)
load('libYap*')
load('libgcc*')
load('libstdc*')
load('libsinpt*')
load('libgmp*')