修改打包方式
All checks were successful
Publish Python Package to Gitea / publish (push) Successful in 1m2s

This commit is contained in:
2026-05-28 16:49:30 +08:00
parent 43ec2d66a3
commit ea25fc2638
17 changed files with 678 additions and 376 deletions

View File

@@ -0,0 +1,15 @@
"""源码仓库内运行 tools/screencast 时,确保 src 在 sys.pathpip 安装后无需)。"""
from __future__ import annotations
import sys
from pathlib import Path
def bootstrap_src() -> None:
try:
import screencast # noqa: F401
except ImportError:
src = Path(__file__).resolve().parent.parent.parent / "src"
src_str = str(src)
if src.is_dir() and src_str not in sys.path:
sys.path.insert(0, src_str)