ffdfb1f9b6
Reasons stacked up:
- AV: unsigned JARs that auto-download binaries + upload files trigger
Windows Defender false-positives more often than Python scripts
invoked by code-signed python.exe.
- Qt UI option: PySide6 opens a path to a real Qt UI (matching Prism's
look) if needed later. JVM Qt bindings are abandoned.
- frazclient already needs Python; inlining as 'import cloud_sync' is
zero overhead vs the launcher always shelling out to java.
Implementation:
- cloud_sync package: cli.py (argparse), creds.py, scope.py,
restic.py (binary discovery + auto-download + sha256 verify),
sync.py (pull/push subprocess restic).
- pyproject.toml with hatchling backend; pip-installable.
- Makefile builds cloud-sync.pyz via python -m zipapp (~53 KB).
- 33 pytest tests, stdlib only on runtime.
- CI workflow runs pytest matrix (3.10/3.11/3.12) + builds pyz.
- DESIGN.md + README.md updated to reflect Python.
E2E verified against local restic-rest-server:
pull empty → push initial → rm -rf local → pull restores → modify+push
creates second snapshot → client forget --prune blocked by --append-only.
Throws away ~565 LOC of Kotlin (and 18 jar tests) committed earlier in
this same session. Net result is ~250 LOC Python + 33 tests = smaller
and more aligned with the rest of the stack.
39 lines
1.2 KiB
TOML
39 lines
1.2 KiB
TOML
[build-system]
|
|
requires = ["hatchling>=1.21"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "cloud-sync"
|
|
version = "0.1.0"
|
|
description = "Per-user state sync for Minecraft via restic. Drops into Prism / MMC / ATLauncher pre-launch and post-exit hooks."
|
|
readme = "README.md"
|
|
license = { file = "LICENSE" }
|
|
requires-python = ">=3.10"
|
|
authors = [{ name = "Timemachine", email = "ops@timemachine.center" }]
|
|
keywords = ["minecraft", "restic", "sync", "automc"]
|
|
classifiers = [
|
|
"License :: OSI Approved :: MIT License",
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Games/Entertainment",
|
|
"Topic :: System :: Archiving :: Backup",
|
|
]
|
|
dependencies = [] # stdlib only
|
|
|
|
[project.optional-dependencies]
|
|
test = ["pytest>=8.0"]
|
|
# Future: pip install cloud-sync[qt] when we add a Qt progress / config UI
|
|
qt = ["PySide6>=6.7"]
|
|
|
|
[project.scripts]
|
|
cloud-sync = "cloud_sync.cli:main"
|
|
|
|
[project.urls]
|
|
Homepage = "https://git.timemachine.center/Timemachine/cloud-sync"
|
|
Issues = "https://git.timemachine.center/Timemachine/cloud-sync/issues"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["cloud_sync"]
|