From b0bf223276ac3a0a522aca4d1c2e8c08636f9081 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Thu, 3 Jul 2014 10:10:38 +0200 Subject: [PATCH] Tweak include/lib dir detection in ffi.py Joint work with @carlosmn --- pygit2/ffi.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pygit2/ffi.py b/pygit2/ffi.py index 0dba2f3..98de11c 100644 --- a/pygit2/ffi.py +++ b/pygit2/ffi.py @@ -112,11 +112,11 @@ with codecs.open(decl_path, 'r', 'utf-8') as header: # if LIBGIT2 exists, set build and link against that version libgit2_path = getenv('LIBGIT2') -include_dirs = [] -library_dirs = [] -if libgit2_path: - include_dirs = [path.join(libgit2_path, 'include')] - library_dirs = [path.join(libgit2_path, 'lib')] +if not libgit2_path: + libgit2_path = '/usr/local' + +include_dirs = [path.join(libgit2_path, 'include')] +library_dirs = [path.join(libgit2_path, 'lib')] C = ffi.verify("#include ", libraries=["git2"], include_dirs=include_dirs, library_dirs=library_dirs)