CLoader
A general loader for C++ extensions to python, based off of the kind of thing that I have had to do multiple times
__init__(self, lib_name, lib_dir=None, load_path=None, src_ext='src', libs_ext='libs', description='An extension module', version='1.0.0', include_dirs=None, runtime_dirs=None, linked_libs=None, macros=None, extra_link_args=None, extra_compile_args=None, extra_objects=None, source_files=None, build_script=None, requires_make=True, out_dir=None, cleanup_build=True, recompile=False):
load(self):
find_extension(self):
Tries to find the extension in the top-level directory
:returns
:_
compile_extension(self):
Compiles and loads a C++ extension
:returns
:_
@property
src_dir(self):
@property
lib_lib_dir(self):
get_extension(self):
Gets the Extension module to be compiled
:returns
:_
configure_make_command(self, make_file):
custom_make(self, make_file, make_dir):
A way to call a custom make file either for building the helper lib or for building the proper lib
make_file
:Any
make_dir
:Any
:returns
:_
make_required_libs(self, library_types=('.so', '.pyd', '.dll')):
Makes any libs required by the current one
:returns
:_
build_lib(self):
locate_library(libname, roots, extensions, library_types=('.so', '.pyd', '.dll')):
Tries to locate the library file (if it exists)
:returns
:_
locate_lib(self, name=None, roots=None, extensions=None, library_types=('.so', '.pyd', '.dll')):
Tries to locate the build library file (if it exists)
:returns
:_
cleanup(self):