python: Simplify handling of Python dependency