Files
svfs/pyproject.toml
chakcy ae9fc8dbe4
tests / ubuntu-latest / py3.13 (push) Waiting to run
tests / windows-latest / py3.13 (push) Waiting to run
tests / ubuntu-latest / py3.13 (pull_request) Has been cancelled
tests / windows-latest / py3.13 (pull_request) Has been cancelled
chore: 三包一起分发、桌面应用打包脚本与 CI,README 对齐实现
* pyproject:wheel 打三个包(sqlite_vfs + svfs_studio + svfs_client)——两个桌面
  应用的 console script 都声明在同一个发行版里,只打核心包会让 pip 装完
  `svfs-client` 命令存在而模块缺失(跑起来是 ImportError);extras 拆成
  client(完整 PySide6,WebEngine 必需)/ studio(PySide6-Essentials 够用)/
  gui(两者合集,保留旧写法)。实测重建 wheel 三个包齐全、纯标准库层在无
  PySide6 的环境里可导入;
* packaging/:PyInstaller spec(白名单裁剪 Qt 体积,DevTools/QML/opengl32sw 的
  裁剪依据都记在注释里)与 build.py 编排;Nuitka 路线的已知问题(编译后
  Shiboken 无法导入)写在脚本注释里,推荐走 PyInstaller;
* .github/workflows/tests.yml:windows + ubuntu 双跑。文件头注明了两个尚未在真
  runner 上验证过的点——依赖索引(pyproject 默认指清华镜像,CI 里用
  UV_DEFAULT_INDEX 覆盖回 PyPI)与 Linux 上 Qt 需要的系统库;
* README:按实现重新对齐——登录与认证(凭据存储、会话失效反馈、离线宽限)、
  可靠性与诊断(客户端自更新、网络超时/重试/代理/CA、日志落盘)、plugin.json
  的 net_hosts、数据目录(credentials.dat / logs)、桥 API、安装方式与 extras。

uv.lock 同步(dev 组与 extras)。
2026-09-16 17:15:55 +08:00

81 lines
3.2 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[project]
dependencies = []
description = "sqlite virtual file system"
name = "sqlite-vfs"
readme = "README.md"
# 版本门槛按实际用到的 API 推导,不是拍的:
# * contrib/fastapi_static.py 用了 hashlib.md5(..., usedforsecurity=False) → 3.9+
# * 测试用了 random.Random.randbytes → 3.9+
# 核心(core/compression/migration/publish/folder_*)本身只用到 3.7 就有的东西;
# 仓库里没有 3.10+ 的语法(无 match、无 PEP 604 注解、无 zip(strict=))。
# 说明:这里只在本机的 3.13 上跑过,"3.9 可用"是代码审查的结论,没有在 3.9 上实测。
requires-python = ">=3.9"
version = "0.3.0"
# 可选集成:核心功能只用标准库,第三方框架一律走 extras。
# 例如 pip install "sqlite-vfs[fastapi]" 才会装上 FastAPI/Starlette。
[project.optional-dependencies]
fastapi = [
"fastapi>=0.100",
"starlette>=0.27",
"uvicorn>=0.23",
"python-multipart>=0.0.6",
]
# 桌面工具用的 Qt 绑定。核心库与 CLI 依然零第三方依赖,所以放在 extra 里。
#
# 三个 extra 的分工(都装着 PySide6,区别只在要不要 WebEngine):
# studio —— svfs-studio(仅 QtCore/QtGui/QtWidgets,Essentials 就够)
# client —— svfs-client(QWebEngineView 在 PySide6-Essentials 里**没有**,
# 必须完整版)
# gui —— 两个桌面应用都装的合集,保留它是为了不破坏既有文档里的
# `uv sync --extra gui` / `sqlite-vfs[gui]` 写法
studio = [
"PySide6-Essentials>=6.6",
]
client = [
"PySide6>=6.6",
]
gui = [
"PySide6>=6.6",
]
[[tool.uv.index]]
default = true
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
# 说明:这里原先有 [tool.uv.workspace] members = ["devmo"],但仓库里没有 devmo 目录。
# 实测 uv 0.11.8 容忍这种写法(uv sync --dry-run 退出码 0),所以它不是阻塞项,
# 只是会误导人,因此删掉。
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[dependency-groups]
dev = [
"twine>=4.0.2",
# starlette 1.6+ 的 TestClient(tests/test_plugin_server.py 用)需要它
"httpx2>=0.1",
]
[project.scripts]
# 统一入口(推荐):svfs <子命令>
svfs = "sqlite_vfs.cli.main:main"
# 旧的独立命令保留为别名(与 svfs <同名子命令> 同一段实现)
vfspack = "sqlite_vfs.cli.packer:pack"
vfsunpack = "sqlite_vfs.cli.unpacker:unpack"
vfsverify = "sqlite_vfs.cli.verify:verify"
vfsmigrate = "sqlite_vfs.cli.migrate:main"
vfspublish = "sqlite_vfs.cli.publish:publish_objects"
vfsfetch = "sqlite_vfs.cli.fetch:fetch_objects"
svfs-studio = "svfs_studio.__main__:main"
svfs-client = "svfs_client.__main__:main"
[tool.hatch.build.targets.wheel]
# 三个包必须一起打:`svfs-studio` / `svfs-client` 两个 console script 在上面
# 声明了,svfs_client 还 import svfs_studio 的主题与基础部件(UI 套件)——
# 只打 sqlite_vfs 的话,pip 装完命令存在但模块不在(ImportError)。
# 不装 Qt([gui] extra)也能安全安装:这三个包在导入前都不会碰 PySide6
# (纯标准库层见 svfs_client/__init__.py 的分层说明)。
packages = ["src/sqlite_vfs", "src/svfs_studio", "src/svfs_client"]