# PerliStream Server Edition — runtime dependencies for PACKAGED builds only
# (.deb / tarball / Docker / Windows). The household box keeps requirements.txt.
#
# Rules for this file:
#   * exact pins (packaging/build-all.sh records the resolved transitive set in
#     packaging/dist/*.lock.txt next to each artifact);
#   * every package must ship wheels for win_amd64 AND manylinux x86_64/aarch64,
#     CPython 3.10–3.13, so the Windows build (pip --platform win_amd64) and the
#     .deb wheelhouse need no compiler;
#   * no dev/test tooling.
#
# Deliberately NOT here (household-only, all imported lazily so the app still
# boots without them): gunicorn (packaged builds serve via gevent pywsgi in
# server_main.py), vosk (offline voice search — heavy + needs a model),
# qbittorrent-api + beautifulsoup4 (torrents are operator-only, off by
# default), surrealdb (main.py only try-imports RecordID).

# ── Core web runtime (audited top-level imports of the app) ──────────────────
Flask==3.1.3
Werkzeug==3.1.8
gevent==26.4.0                # monkey-patching + pywsgi server
greenlet==3.5.0
python-dotenv==1.2.2          # config.py
PyJWT[crypto]==2.12.1         # auth.py; [crypto] = EdDSA for Connect tokens (D)
Authlib==1.7.2                # routes/auth.py (OAuth client)
google-auth==2.51.0           # _shared/api/verify_google_id_token.py
requests==2.33.1              # live/*, routes/live.py, library/torrents.py
httpx[http2]==0.28.1          # library/tmdb.py opens its client with http2=True
guessit==3.8.0                # library/scanner.py, transfer.py
python-dateutil==2.9.0.post0
maxminddb==3.1.1              # geoip.py (degrades quietly without the .mmdb)
psutil==7.2.2                 # fleet_endpoints + non-Linux pid/cmdline checks

# ── Server-edition additions for the other build agents ──────────────────────
cryptography==48.0.0          # D: ed25519 request signing · H: self-signed TLS cert (x509)
# A: setup/claim QR codes use a built-in encoder — no QR package.
# G: relay tunnel client (cloud/tunnel.py) needs nothing beyond cryptography.
zeroconf==0.151.3            # D: mDNS _perlistream._tcp (LGPL-2.1, used unmodified as a library)
ifaddr==0.2.0                 # D/A: LAN interface + address enumeration (zeroconf also needs it)

# Intentionally no package for:
#   UPnP port mapping — hand-roll SSDP M-SEARCH (UDP 239.255.255.250:1900) +
#     the IGD SOAP AddPortMapping call over `requests`; `upnpclient` drags in
#     lxml + netdisco and `miniupnpc` needs a compiler on Windows.
#   local admin password hashing — stdlib hashlib.scrypt (OpenSSL-backed on
#     every platform, including the Windows embeddable Python).
