This commit is contained in:
Vitor Santos Costa
2017-09-06 01:09:46 +01:00
parent a115024aee
commit abdc8a35f9
31 changed files with 579 additions and 815 deletions

View File

@@ -3,15 +3,25 @@ import os
import ctypes
import glob
import os.path
import platform
import sys
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)
load('libYap*')
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('libYap*')
if platform.system() == 'Apple':
load('libYAP+*')
load('libPy4YAP*')