* feat(stream-gears): ship stream_gears package with accurate stubs
The stream_gears/ package (__init__.py, stub, py.typed) never made it into
the wheel: pyproject only listed python-packages = ["biliup"], so maturin
generated its own __init__.py and the stub drifted from the implementation
(7 of 16 upload lines, login_by_qrcode typed as bool, missing upload
parameters, pyobject.Segment/Credit not accepted by the Rust side).
- Move the package to the repo root next to biliup/ (maturin resolves
python-packages relative to python-source) and set
module-name = "stream_gears.stream_gears" for a mixed layout.
- __init__.py re-exports the native module, adds Segment = PySegment and a
Credit TypedDict; pyobject.py is removed.
- Rewrite stream_gears.pyi from the implementation, including
StreamGearsError and the proxy/file parameters.
- Give upload an explicit text_signature so its string and list defaults
show up in inspect.signature/help() instead of Ellipsis.
Top-level names only grow: Credit and Segment are added.
* ci(desktop): keep PyInstaller off the source stream_gears package
PyInstaller puts the repo root first on its search path, so the source
stream_gears/ (which has no native module) shadowed the installed package
and the frozen biliup failed to import stream_gears.stream_gears. Remove
the source copy after installing the wheel.
* test(stream-gears): check package layout and run stubtest in CI
test_package.py covers the new top-level names, the native submodule,
__all__ staying in sync with the native module, py.typed and the stub in
the wheel, upload's text_signature against PyO3's argument parsing, and
mypy --strict on a valid and an invalid example.
CI runs python -m mypy.stubtest stream_gears against the installed wheel
so the stub cannot drift from the implementation again.
* build(stream-gears): drop unused danmaku-client and async-trait deps
Neither is referenced anywhere in crates/stream-gears. danmaku is still
built through biliup-cli, so this only trims the manifest and lockfile
entries.
* refactor(stream-gears): keep the package in crates/stream-gears via python-source
Point maturin's python-source at crates/stream-gears instead of moving
stream_gears/ to the repository root. python-packages is resolved under
python-source, so the root biliup/ package is shipped through include.
The wheel contents are unchanged.
* ci: drop workarounds for a root-level stream_gears package
With stream_gears/ back in crates/stream-gears, nothing at the repository
root shadows the installed package, so PyInstaller and stubtest no longer
need to avoid it.