diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-08-08 22:27:29 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-08-15 21:46:37 +0100 |
commit | 3f19ae7b18ae681fbd959e9099b70489053da874 (patch) | |
tree | a37a11e83643191cb1d56c056c87b75c08912fa5 /klippy/chelper/__init__.py | |
parent | d7a6aa81ef4506b7d4e10ddf09ee1662e0eebbd0 (diff) | |
download | kutter-3f19ae7b18ae681fbd959e9099b70489053da874.tar.gz kutter-3f19ae7b18ae681fbd959e9099b70489053da874.tar.xz kutter-3f19ae7b18ae681fbd959e9099b70489053da874.zip |
Use makefiles instead of auto-building
Diffstat (limited to 'klippy/chelper/__init__.py')
-rw-r--r-- | klippy/chelper/__init__.py | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py index 0a40dfeb..9bb2ebad 100644 --- a/klippy/chelper/__init__.py +++ b/klippy/chelper/__init__.py @@ -325,20 +325,11 @@ def logging_callback(msg): def get_ffi(): global FFI_main, FFI_lib, pyhelper_logging_callback if FFI_lib is None: - srcdir = os.path.dirname(os.path.realpath(__file__)) - srcfiles = get_abs_files(srcdir, SOURCE_FILES) - ofiles = get_abs_files(srcdir, OTHER_FILES) - destlib = get_abs_files(srcdir, [DEST_LIB])[0] - if check_build_code(srcfiles + ofiles + [__file__], destlib): - if check_gcc_option(SSE_FLAGS): - cmd = "%s %s %s" % (GCC_CMD, SSE_FLAGS, COMPILE_ARGS) - else: - cmd = "%s %s" % (GCC_CMD, COMPILE_ARGS) - logging.info("Building C code module %s", DEST_LIB) - do_build_code(cmd % (destlib, " ".join(srcfiles))) FFI_main = cffi.FFI() for d in defs_all: FFI_main.cdef(d) + srcdir = os.path.dirname(os.path.realpath(__file__)) + destlib = os.path.join(srcdir, "c_helper.so") FFI_lib = FFI_main.dlopen(destlib) # Setup error logging pyhelper_logging_callback = FFI_main.callback( @@ -362,13 +353,4 @@ HC_CMD = "sudo %s/hub-ctrl -h 0 -P 2 -p %d" def run_hub_ctrl(enable_power): srcdir = os.path.dirname(os.path.realpath(__file__)) hubdir = os.path.join(srcdir, HC_SOURCE_DIR) - srcfiles = get_abs_files(hubdir, HC_SOURCE_FILES) - destlib = get_abs_files(hubdir, [HC_TARGET])[0] - if check_build_code(srcfiles, destlib): - logging.info("Building C code module %s", HC_TARGET) - do_build_code(HC_COMPILE_CMD % (destlib, " ".join(srcfiles))) os.system(HC_CMD % (hubdir, enable_power)) - - -if __name__ == "__main__": - get_ffi() |