-
-
Notifications
You must be signed in to change notification settings - Fork 399
Added installing on OS X #448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
.. code-block:: sh | ||
|
||
$ export LIBGIT2=/usr/local/Cellar/libgit2/<libgit2 version>/lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.