This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nuttx-ntfc.git


The following commit(s) were added to refs/heads/main by this push:
     new 60ea802  packaging: make LZF coredump support optional
60ea802 is described below

commit 60ea802b0f862797810c3bf2b13214015314797f
Author: raiden00pl <[email protected]>
AuthorDate: Wed Sep 2 19:38:59 2026 +0200

    packaging: make LZF coredump support optional
    
    The lzf package only ships a source distribution and needs Python 
development
    headers to build. Normal NuttX CI runs do not use syslog coredumps.
    
    Move lzf to the coredump extra and import the syslog handler only when that
    backend is enabled.
    
    Signed-off-by: raiden00pl <[email protected]>
---
 pyproject.toml                            | 6 +++++-
 src/ntfc/debug/coredump/syslog_handler.py | 2 +-
 src/ntfc/debug/getdebug.py                | 3 ++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index f4fe325..9c6ddc7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -34,7 +34,6 @@ dependencies = [
          "pexpect",
          "psutil",
          "pyserial",
-         "lzf",
          "pytest",
          "pytest-dependency",
          "pytest-html",
@@ -54,6 +53,11 @@ keywords = [
   "ntfc",
 ]
 
+[project.optional-dependencies]
+coredump = [
+         "lzf",
+]
+
 [project.scripts]
 ntfc = "ntfc.cli.main:main"
 
diff --git a/src/ntfc/debug/coredump/syslog_handler.py 
b/src/ntfc/debug/coredump/syslog_handler.py
index 75cd73e..92ca249 100644
--- a/src/ntfc/debug/coredump/syslog_handler.py
+++ b/src/ntfc/debug/coredump/syslog_handler.py
@@ -25,7 +25,7 @@ import io
 import struct
 from typing import TYPE_CHECKING, Optional
 
-import lzf  # type: ignore[import-untyped]
+import lzf  # type: ignore
 
 from ntfc.debug.coredump.base import CoredumpHandler
 from ntfc.log.logger import logger
diff --git a/src/ntfc/debug/getdebug.py b/src/ntfc/debug/getdebug.py
index 095b024..faf02bc 100644
--- a/src/ntfc/debug/getdebug.py
+++ b/src/ntfc/debug/getdebug.py
@@ -27,7 +27,6 @@ from ntfc.debug.coredump.fastboot_handler import 
FastbootHandler
 from ntfc.debug.coredump.gdb_handler import GdbHandler
 from ntfc.debug.coredump.local_file_handler import LocalFileHandler
 from ntfc.debug.coredump.manager import CoredumpManager
-from ntfc.debug.coredump.syslog_handler import SyslogHandler
 from ntfc.debug.coredump.ymodem_handler import YmodemHandler
 from ntfc.debug.gdb.controller import GdbController
 from ntfc.lib.fastboot.controller import FastbootController
@@ -230,6 +229,8 @@ def _register_coredump_handlers(
         mgr.register(LocalFileHandler(cfg.local_file))
 
     if cfg.syslog.enable:
+        from ntfc.debug.coredump.syslog_handler import SyslogHandler
+
         mgr.register(SyslogHandler(product.core(0).device))
 
 

Reply via email to