From 514ed5dc77cf4b31fd2d271e01609a389ad93f95 Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Mon, 30 Mar 2026 07:01:01 -0700 Subject: [PATCH] fix: add python-multipart dependency, fix launchd service name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit python-multipart is required by FastAPI for form POST handling (login). Was missing from pyproject.toml — crash on macOS first run. launchd plist now uses the muxplex entry point script directly instead of python -m muxplex, so macOS shows 'muxplex' in Activity Monitor, launchctl list, and login items instead of 'python3'. --- muxplex/cli.py | 23 ++++++++++++++++++----- pyproject.toml | 1 + 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/muxplex/cli.py b/muxplex/cli.py index 847cc59..c7b8292 100644 --- a/muxplex/cli.py +++ b/muxplex/cli.py @@ -217,6 +217,23 @@ def _check_dependencies() -> None: def _install_launchd(executable: str) -> None: """Install a macOS launchd agent plist to ~/Library/LaunchAgents/.""" + import shutil + + # Prefer the entry point script ('muxplex') so macOS shows the correct + # process name in Activity Monitor, launchctl list, and login items. + # Fall back to 'python -m muxplex' if the entry point isn't on PATH. + muxplex_bin = shutil.which("muxplex") + if muxplex_bin: + program_args = f""" + {muxplex_bin} + """ + else: + program_args = f""" + {executable} + -m + muxplex + """ + label = "com.muxplex" plist = f""" @@ -225,11 +242,7 @@ def _install_launchd(executable: str) -> None: Label {label} ProgramArguments - - {executable} - -m - muxplex - +{program_args} RunAtLoad KeepAlive diff --git a/pyproject.toml b/pyproject.toml index 532c0f0..fd22aec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ dependencies = [ "websockets>=11.0", "python-pam>=1.8.4", "itsdangerous>=2.1.0", + "python-multipart>=0.0.9", ] [project.optional-dependencies]