There’s a Python program that I update regularly. Every time I update the program, I need to modify a specific Python file to change its functionality. Instead of manually patching the file each time, I’d like to automate the process.
I’m looking for a way to automatically apply a patch to a Python file whenever the program updates or if the file doesn’t have the desired modifications.
Any advice or suggestions on how to automate this process would be greatly appreciated!
If you want to ensure no surprise breakage, you’d want to create your own package, apply the patch and version it a lot higher than the current version of the original and install it. The downside is you won’t get updates of the original unless you respin your package based on the latest.
If you don’t care about inevitable breakage, the myriad proposed patching processes would work. At some point your patch won’t apply and you’d have to go in there and fix things.