modify: 网关拆为独立包 chongming-gateway(源码迁出到 utils/gateway,打包只留 plugins.mbank)
This commit is contained in:
+47
-38
@@ -1,36 +1,40 @@
|
||||
[build-system]
|
||||
build-backend = "hatchling.build"
|
||||
requires = ["hatchling"]
|
||||
|
||||
[project]
|
||||
# 应用/打包项目:本仓负责宿主骨架(public/)、内置插件集成(src/plugins)、构建配置与
|
||||
# 交付产物。网关本体是独立包 chongming-gateway(源码在 utils/gateway,独立仓库;
|
||||
# 发布到私有源后按版本依赖),本文件只声明宿主自己需要的依赖。
|
||||
dependencies = [
|
||||
"chongming-jwt",
|
||||
"chongming-request",
|
||||
"eclipse-zenoh",
|
||||
"fastapi[uvicorn]",
|
||||
"gunicorn",
|
||||
"granian[reload,uvloop]>=2.8.4",
|
||||
# —— 网关本体(私有源发布版;本地联调见下方 [tool.uv.sources] 注释)——
|
||||
"chongming-gateway",
|
||||
# —— public 骨架(exe 入口)自己的依赖 ——
|
||||
# "granian[reload,uvloop]>=2.8.4",
|
||||
# "gunicorn",
|
||||
# "httptools",
|
||||
"module-bank",
|
||||
# "uvicorn",
|
||||
"uvloop",
|
||||
# —— 共用 venv:内置插件 + 测试所需(dev 运行 inline 插件与打包共用同一 venv)——
|
||||
# 注:注释项由 chongming-gateway 传递引入,保留注释便于查看来源,需要时再显式声明
|
||||
"aiofiles",
|
||||
# "amqtt",
|
||||
"bytedance",
|
||||
# "chongming-auth",
|
||||
# "chongming-cache",
|
||||
# "chongming-jwt",
|
||||
"chongming-mqtt",
|
||||
"chongming-password",
|
||||
"chongming-request",
|
||||
"chongming-stream-manager",
|
||||
# "chongming-worker",
|
||||
# "eclipse-zenoh",
|
||||
# "fastapi",
|
||||
"openai",
|
||||
"python-multipart",
|
||||
"sqlite-vfs",
|
||||
# "sqlite-vfs",
|
||||
"tomli",
|
||||
"typing-extensions",
|
||||
"uvicorn",
|
||||
"volcengine-python-sdk[ark]",
|
||||
"chongming-password",
|
||||
"chongming-worker",
|
||||
"amqtt",
|
||||
"aiofiles",
|
||||
"chongming-stream-manager",
|
||||
"uvloop",
|
||||
"chongming-mqtt",
|
||||
"httptools",
|
||||
"bytedance",
|
||||
"chongming-cache",
|
||||
"chongming-auth",
|
||||
]
|
||||
description = "基于 modules-bank 的 fastapi 打包脚手架"
|
||||
description = "基于 modules-bank 的 fastapi 打包脚手架(宿主项目:骨架 + 插件集成 + 构建)"
|
||||
name = "chongming-zenoh"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
@@ -38,25 +42,30 @@ version = "0.1.0"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"chongming-cli",
|
||||
"greenlet>=3.5.6",
|
||||
"nuitka",
|
||||
"pyarmor",
|
||||
"pyinstaller",
|
||||
"ruff",
|
||||
"chongming-cli",
|
||||
"greenlet>=3.5.6",
|
||||
# onefile extra:带 zstandard,否则 onefile 产物不做压缩(Nuitka 自身推荐写法)
|
||||
"nuitka[onefile]",
|
||||
# Nuitka standalone/onefile 打包在 Linux 必需(链接完成后才检查,缺了会白跑一整轮编译)
|
||||
"patchelf; sys_platform == 'linux'",
|
||||
"pyarmor",
|
||||
"pyinstaller",
|
||||
"ruff",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/chongming"]
|
||||
[tool.uv]
|
||||
# 宿主项目自身不再出包(网关搬到 chongming-gateway 后本仓无 Python 包),
|
||||
# uv sync 只装依赖与 dev 工具,不再尝试构建/安装本仓 editable。
|
||||
package = false
|
||||
|
||||
# 本地联调网关时取消注释:直接用 utils/gateway 源码(editable),改完无需发版即可被
|
||||
# 本仓(含打包构建)使用;联调结束恢复按发布版依赖,并用 uv lock --upgrade-package
|
||||
# chongming-gateway 刷新版本。
|
||||
# [tool.uv.sources]
|
||||
# chongming-gateway = { path = "utils/gateway", editable = true }
|
||||
|
||||
[[tool.uv.index]]
|
||||
url = "http://124.71.68.6:3000/api/packages/chongming/pypi/simple/"
|
||||
|
||||
[[tool.uv.index]]
|
||||
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
|
||||
|
||||
[project.scripts]
|
||||
gunicorn = "chongming:gunicorn_serve"
|
||||
granian = "chongming:granian_serve"
|
||||
serve = "chongming:serve"
|
||||
worker_serve = "chongming_worker.process:worker_serve"
|
||||
|
||||
Reference in New Issue
Block a user