Shareef Jalloq
09/23/2025, 4:45 PMGitRepository in the Python API yet there doesn't seem to be any way to add that package to PYTHONPATH or pip install it.Nate
09/23/2025, 5:12 PMpull step like run_shell_script to install your library at runtime via pip or uvNate
09/23/2025, 5:12 PMNate
09/23/2025, 5:13 PMShareef Jalloq
10/15/2025, 2:49 PMShareef Jalloq
10/16/2025, 9:16 AMcommand in job_variables . I create a unique venv and pip install the same Git SHA as would be cloned by the GitRepository. A bit roundabout but better than the other options.
command = [
"bash -lc '",
"VENV=$(mktemp -d)/venv;",
"python3 -m venv $VENV;",
"source $VENV/bin/activate;",
"python -m pip install --upgrade pip wheel;",
"SOURCE_REF=${FPGA_AUTOMATION_SOURCE_REFERENCE:-};",
f'INSTALL_TARGET="fpga-automation[server] @ git+{sanitised_url}";',
'if [ -n "$SOURCE_REF" ]; then',
' INSTALL_TARGET="${INSTALL_TARGET}@${SOURCE_REF}";',
"fi;",
'python -m pip install "$INSTALL_TARGET";',
"FLOW_RUN_ID=${PREFECT__FLOW_RUN_ID:-${PREFECT_FLOW_RUN_ID:-}};",
'if [ -z "$FLOW_RUN_ID" ]; then',
' echo "Missing Prefect flow run ID in PREFECT__FLOW_RUN_ID/PREFECT_FLOW_RUN_ID" >&2;',
" exit 2;",
"fi;",
'exec python -m prefect flow-run execute "$FLOW_RUN_ID"',
"'",
]