Added installing on OS X#448
Conversation
There was a problem hiding this comment.
This would then require you to set the path every time you want to use something which uses pygit2. A more common solution should be to brew link libgit2 which makes libgit2 available through /usr/local/, which is the path where non-system-provided software and libraries are installed and where the build system expects to see it (and where python will look when it needs to load libgit2).
|
I know about the I tried the following to test the libgit2 and pygit2 installation:
This worked without any problem. I didn't need to run |
|
I don't get what you mean by optional here. Everything in /usr/local is installed by the user/admin and cannot be necessary for the operation of the OS. You likely didn't need to explicitly run |
|
Sorry, you are completely right. I was looking in the wrong place (/usr/local/bin instead of /usr/local/lib). I shouldn't write something on Monday morning before my second coffee. |
|
I had the opportunity to try this on a new Mac with Yosemite installed (since my old one broke down). After installing Xcode and homebrew I could run the following commands without any problems: and install pygit2 in a fresh virtualenv with Maybe the stuff to export the libgit2 part could just be left out. |
|
yes I think so, just leaving out that part would be enough |
This should be considered as a primer to get you started on using pygit2 on OS X. Since I only have one Mac, I could not verify this on more OS Versions and / or settings.