Skip to content

buildplan: Python commands as people type them - #117

Merged
ramonmalcolm10 merged 2 commits into
mainfrom
python-run-as-typed
Nov 29, 2026
Merged

ramonmalcolm10 merged 2 commits into
mainfrom
python-run-as-typed

Conversation

@ramonmalcolm10

Copy link
Copy Markdown
Contributor

A customer's Flask app (start command flask --app app run ...) has never started: Python commands are args to the bundle's interpreter, so it ran python flask ... and Python looked for a file named flask. It failed at activation, after a full build.

Now, for a Python bundle's start, release, process and cron commands:

  • a leading python / python3 / python3.X is dropped (the bundle's bin is the interpreter);
  • a first word that isn't an option, a .py file, a path or a file of the app's is a script installed by the app's dependencies (flask, gunicorn, celery, anything). It's copied from the build's Python into .homeport/scripts/ and run by the bundle's interpreter. Works for any package, with no per-framework list;
  • a script that no dependency installs fails the build with a message, instead of the app failing to start;
  • a start command with a fixed port (--port=8080, -b 0.0.0.0:8000) gets a warning to use $PORT.

Args to python (-m flask ..., app.py ...) are unchanged. Owner approved 2026-11-29. Builders need the FLEET_CLI pin moved after release.

@ramonmalcolm10
ramonmalcolm10 merged commit c90c5cf into main Nov 29, 2026
5 checks passed
@ramonmalcolm10
ramonmalcolm10 deleted the python-run-as-typed branch November 29, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant