Build rules for PythonMode.