Library to parse and apply unified diffs.
Things that don't work out of the box:
Download patch.py and run it with Python. It is a self-contained module without external dependencies.
You can also run the .zip file.
python patch-1.16.zip diff.patch
patch.py is self sufficient. You can copy it into your repository
and use it from here. This setup will always be repeatable. But if
you need to add
patch module as a dependency, make sure to use strict
specifiers to avoid hitting an API break when version 2 is released:
pip install "patch==1.*"