cmake: head fix

Also fixes up the Python element to match Tim’s new guidelines.

Closes #34517.
Closes #34529.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
cmake: simplify resource usage