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