I’m writing a Python app that needs to call some Git commands. I first looked at libgit2 and pygit2, but they lack some of the features I need, like git remote. Instead, I now want to find a way to include the native Git binaries in my application, rather that using a Git library. Also, while the app will probably become cross-platform later, I’m currently concerned with creating a solid Windows version, first.
How can I package the native Git binaries into a Windows Python-based application? Would this require me to ship the Git installer along with my application, or is there a portable version of Git available that I can bundle directly?
Dulwich is the pure-Python implementation of the Git file formats and protocols and could help here.
You can find its repo on GitHub.