Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37890212
en ru br
ALT Linux repos
S:6.0.0-alt1

Group :: Development/Python3
RPM: pymunk

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

"""This module contain functions used to load the chipmunk library"""
__version__ = "$Id: libload.py 0 2013-03-01 18:24:38Z frbrgeorge@gmail.com $"

# Actually this is QnD replacement to upstream's queer code

import ctypes, ctypes.util

def platform_specific_functions():
return {'library_loader' : ctypes.cdll, 'function_pointer' : ctypes.CFUNCTYPE}

def load_library(libname, debug_lib=True):
libfn = ctypes.util.find_library(libname)
if debug_lib:
print ("Loading [{0}]".format(libfn))
lib = platform_specific_functions()['library_loader'].LoadLibrary(libfn)
return lib
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin