fspacker package

Subpackages

Submodules

fspacker.cli module

应用客户端命令行接口.

fspacker.cli.build(*, archive: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9b439d0>] = False, debug: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9b43b10>] = False, gui: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9b43c50>] = False, offline: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9b43d90>] = False, rebuild: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9b43ed0>] = False, recursive: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9bf0050>] = True, simplify: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9bf0190>] = True, use_tk: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9bf02d0>] = False, name: str = <typer.models.ArgumentInfo object>) None[源代码]

构建项目命令.

fspacker.cli.version() None[源代码]
fspacker.cli.run(name: str = <typer.models.ArgumentInfo object>, *, debug: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9bf1310>] = False) None[源代码]

运行项目命令.

fspacker.cli.clean(directory: ~typing.Annotated[~pathlib.Path | None, <typer.models.ArgumentInfo object at 0x7c26d9bf1590>] = None, *, debug: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9bf16d0>] = False, recursive: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7c26d9bf1810>] = True) None[源代码]

清理项目命令.

fspacker.cli.main() None[源代码]

fspacker.exceptions module

exception fspacker.exceptions.ProjectParseError[源代码]

基类:Exception

项目解析错误.

exception fspacker.exceptions.ProjectPackError[源代码]

基类:Exception

项目打包错误.

exception fspacker.exceptions.RunExecutableError[源代码]

基类:Exception

运行错误.

exception fspacker.exceptions.ResourceNotFoundError[源代码]

基类:Exception

资源错误.

fspacker.settings module

fspacker.settings.get_settings() Settings[源代码]

获取设置.

返回:

设置对象

返回类型:

Settings

fspacker.simplifiers module

提供库打包精简配置功能.

fspacker.simplifiers.get_simplify_options(name: str) SimplifierOption | None[源代码]

获取库打包精简配置.

参数:

name (str) -- 库名称

返回:

库打包精简配置

返回类型:

SimplifierOption

fspacker.trackers module

class fspacker.trackers.PerformanceTracker[源代码]

基类:object

性能分析器.

global_start_time = 31747.177857898
function_times: dict[str, float] | None = {}
total_time = 0.0
lock = <unlocked _thread.lock object>
classmethod initialize() None[源代码]

初始化性能分析.

classmethod update_total_time() None[源代码]

Update the total execution time.

classmethod finalize() None[源代码]

Finalize the performance tracking and log the results.

fspacker.trackers.perf_tracker(func: Callable[[P], R]) Callable[[P], R][源代码]

性能分析装饰器.

参数:

func -- 被装饰的函数.

返回:

装饰后的函数.

Module contents