# Hawkeye daemon Python dependencies — ONE pinned list for Windows, macOS and
# Linux (T-057, F-IO-07).
#
# WHY THIS FILE EXISTS
#
# There used to be three hand-written lists: install-hawkeye-windows.ps1 pinned
# seven packages and omitted pywin32 entirely, while the Linux and macOS
# installers ran `pip install flask playwright pillow pyotp requests
# cryptography` with no versions at all. Two boxes installed a week apart got
# different Flask, different Pillow and a different Playwright — and therefore
# a different bundled Chromium — from the same installer. That is not a
# reproducible product, and the divergence is invisible until a daemon behaves
# differently on one machine.
#
# The installers now run `pip install -r` against THIS file and nothing else.
# tests/test-dependency-pinning.py refuses an inline package list in any of the
# three.
#
# THE PYTHON FLOOR STAYS 3.9, AND THAT IS WHY TWO PACKAGES HAVE TWO LINES.
# The Mac is the floor: install/macos/build-hawkeye-app-bundle.sh embeds the
# venv's own base interpreter into the signed HawkeyeRuntime bundle and ditto's
# the venv's site-packages in beside it, so the venv's Python version IS the
# version the macOS daemons run under — historically Apple's CommandLineTools
# python3.9. Raising the floor here would change which interpreter gets signed
# and TCC-bound on every Mac, which is a much larger change than pinning and
# belongs to the macOS installer ticket, not this one.
#
# pillow 12.x and playwright 1.61+ declare `requires_python >= 3.10`, so on a
# 3.9 box pip was already resolving 11.x/1.60. The two-line form pins THAT,
# exactly: every environment still gets one exact recorded version, which is
# the whole point. It is not a range and it is not a floor.
#
# pyautogui is REQUIRED on all three platforms (decision D-09), not the
# best-effort extra Linux and macOS used to treat it as. Note that requiring
# it to INSTALL is not the same as requiring it to IMPORT: importing pyautogui
# needs a window server, so a headless box installs it and simply reports the
# desktop-control capability as unavailable at runtime. The installers' import
# verification deliberately does not import it on Linux/macOS.
#
# Versions are the set msi-desktop has been running in production, kept as-is
# rather than floated to today's newest, plus explicit pins for the two
# packages that had none.

Flask==3.1.2
PyOTP==2.10.0
requests==2.32.3
PyAutoGUI==0.9.54

# Two lines, one exact version per environment. 12.3.0/1.61.0 are the pins
# Windows has been running; 11.3.0/1.60.0 are the last releases that support
# 3.9 and are therefore what a 3.9 Mac was already silently resolving.
pillow==12.3.0 ; python_version >= "3.10"
pillow==11.3.0 ; python_version < "3.10"
playwright==1.61.0 ; python_version >= "3.10"
playwright==1.60.0 ; python_version < "3.10"

# cryptography was installed by name on every OS (Windows listed it unpinned in
# an otherwise pinned array). It signs and verifies device identity, so "the
# version PyPI served that day" is the worst thing it could be. 50.0.1 declares
# `!=3.9.0,!=3.9.1,>=3.9`, so it covers the 3.9.6 floor too.
cryptography==50.0.1

# pywin32 was in NO list. daemons/hawk_attest.py:552 selftest() does a bare
# `import win32file` and daemons/enroll_device.py:711 calls it with no
# ImportError handling, so a fresh Windows box installed green and then died
# with ModuleNotFoundError at enrolment — no customer Windows machine could
# reach the panel through the shipped path. The marker keeps it off macOS and
# Linux, where the wheel does not exist.
pywin32==312 ; sys_platform == "win32"
