diff --git a/bin/steps/python b/bin/steps/python
index 141ea89c0a40eeaa627c7c45d54747c676bbaf55..f984d557d3a302dbc0bcc6275844c94e57b5da69 100755
--- a/bin/steps/python
+++ b/bin/steps/python
@@ -1,4 +1,8 @@
 set +e
+
+# Fix any pending whitespace around runtime.txt.
+runtime-fixer runtime.txt
+
 PYTHON_VERSION=$(cat runtime.txt)
 
 # Install Python.
diff --git a/vendor/runtime-fixer b/vendor/runtime-fixer
new file mode 100755
index 0000000000000000000000000000000000000000..4ee1e41981b8cba01b57cc5b64ffe8c9f55b8202
--- /dev/null
+++ b/vendor/runtime-fixer
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+import sys
+
+runtime_file = sys.argv[1]
+
+with open(req_file, 'r') as f:
+    r = f.read().strip()
+
+with open(runtime_file, 'w') as f:
+    f.write(r)