Hermetic `chmod`/`touch`/`id` in `python_repository`

🚀 feature request

Relevant Rules

python_repository

Description

We currently call out the to system chmod, touch and id binaries.

We could do the equivalent functionality with Python.

Describe the solution you'd like

The Python interpreter is downloaded in python_repository. If we provide a script as a private attribute to the repository rule, we can perform the readonly permissions change with the downloaded Python interpreter.

Describe alternatives you've considered

None. Python has the functionality to perform the chmod/touch/id.