From a212cf354fd5ab6232278710b63391b7863e3322 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Sun, 26 May 2024 13:17:28 +0100 Subject: [PATCH] Use Python via the `python3` command instead of `python` The `python` command was a transitionary symlink to `python3`, that no longer exists on Heroku-24. To fix compatibility with Heroku-24, the buildpack now calls the `python3` command directly. Both `python` and `python3` pointed to the same Python installation on all supported Heroku stacks, so this is a no-op for older stacks. In addition, the buildpack was already using Python 3 syntax in the commands it called (eg the function form of `print()`), so calling Python via the `python3` command is technically more correct regardless. Fixes #22. --- bin/compile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/compile b/bin/compile index 1940f56..58b161c 100644 --- a/bin/compile +++ b/bin/compile @@ -112,11 +112,11 @@ puts_step "Configuring Dynatrace Oneagent..." # determine default values for connection parameters DT_MANIFEST="$BUILD_DIR/dynatrace/oneagent/manifest.json" -MANIFEST_TENANT=$(python -c 'import json,sys; print(json.load(sys.stdin)["tenantUUID"])' <$DT_MANIFEST) -MANIFEST_TOKEN=$(python -c 'import json,sys; print(json.load(sys.stdin)["tenantToken"])' <$DT_MANIFEST) -MANIFEST_ENDPOINTS=$(python -c 'import sys, json; print(";".join(json.load(sys.stdin)["communicationEndpoints"]))' <$DT_MANIFEST) +MANIFEST_TENANT=$(python3 -c 'import json,sys; print(json.load(sys.stdin)["tenantUUID"])' <$DT_MANIFEST) +MANIFEST_TOKEN=$(python3 -c 'import json,sys; print(json.load(sys.stdin)["tenantToken"])' <$DT_MANIFEST) +MANIFEST_ENDPOINTS=$(python3 -c 'import sys, json; print(";".join(json.load(sys.stdin)["communicationEndpoints"]))' <$DT_MANIFEST) -VERSION=$(python -c 'import json,sys; print(json.load(sys.stdin)["version"])' <$DT_MANIFEST) +VERSION=$(python3 -c 'import json,sys; print(json.load(sys.stdin)["version"])' <$DT_MANIFEST) # support pipelined deployments by overriding default values set_env "DT_TENANT" "\${DT_TENANT:-$MANIFEST_TENANT}"