modify: version: 0.2.0
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ requires = ["hatchling"]
|
||||
|
||||
[project]
|
||||
name = "chongming-cli"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
description = "chongming 命令脚本集合:构建打包 / 进程插件打包 / 插件脚手架 / 模型生成"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
+22
-20
@@ -313,8 +313,9 @@ def _stage_pyinstaller(config: Config) -> tuple[str, str]:
|
||||
"PyInstaller",
|
||||
"--onefile",
|
||||
"--noconfirm",
|
||||
"--optimize",
|
||||
"2",
|
||||
"--exclude-module", "tkinter",
|
||||
"--optimize=2",
|
||||
# "2",
|
||||
"--name",
|
||||
"chongming",
|
||||
"--distpath",
|
||||
@@ -323,7 +324,7 @@ def _stage_pyinstaller(config: Config) -> tuple[str, str]:
|
||||
"./build_temp",
|
||||
"--specpath",
|
||||
"./specs",
|
||||
"--clean",
|
||||
"--clean"
|
||||
]
|
||||
if not is_windows:
|
||||
cmd.append("--strip")
|
||||
@@ -363,25 +364,25 @@ def _stage_nuitka(config: Config) -> tuple[str, str]:
|
||||
"windows" if is_windows else "linux", []
|
||||
)
|
||||
|
||||
packages = [
|
||||
"module_bank",
|
||||
"sqlite_vfs",
|
||||
"fastapi",
|
||||
"uvicorn",
|
||||
"gunicorn",
|
||||
"diskcache",
|
||||
"chongming_cache",
|
||||
"chongming_cache.backends",
|
||||
"chongming_cache.backends.disk",
|
||||
"apscheduler",
|
||||
"tomli",
|
||||
"typing_extensions",
|
||||
]
|
||||
# packages = [
|
||||
# "module_bank",
|
||||
# "sqlite_vfs",
|
||||
# "fastapi",
|
||||
# "uvicorn",
|
||||
# "gunicorn",
|
||||
# "diskcache",
|
||||
# "chongming_cache",
|
||||
# "chongming_cache.backends",
|
||||
# "chongming_cache.backends.disk",
|
||||
# "tomli",
|
||||
# "typing_extensions",
|
||||
# ]
|
||||
|
||||
cmd = [
|
||||
sys.executable,
|
||||
"-m",
|
||||
"nuitka",
|
||||
"--clang",
|
||||
"--standalone",
|
||||
"--onefile",
|
||||
"--follow-imports",
|
||||
@@ -392,16 +393,17 @@ def _stage_nuitka(config: Config) -> tuple[str, str]:
|
||||
"--pgo-c",
|
||||
"--pgo-python",
|
||||
"--disable-plugin=tk-inter",
|
||||
"--enable-plugin=numpy",
|
||||
"--output-dir=.",
|
||||
"--output-filename=chongming",
|
||||
"main.py",
|
||||
"--jobs=4",
|
||||
]
|
||||
# export LDFLAGS="-fuse-ld=lld"
|
||||
# export LDFLAGS="-fuse-ld=lld-20"
|
||||
if shutil.which("upx"):
|
||||
cmd.append("--enable-plugin=upx")
|
||||
for pkg in packages:
|
||||
cmd.append(f"--include-package={pkg}")
|
||||
# # for pkg in packages:
|
||||
# cmd.append(f"--include-package={pkg}")
|
||||
for mod in list(base_imports) + extra:
|
||||
cmd.append(f"--include-module={mod}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user