Tweak include/lib dir detection in ffi.py
Joint work with @carlosmn
This commit is contained in:
@@ -112,11 +112,11 @@ with codecs.open(decl_path, 'r', 'utf-8') as header:
|
|||||||
|
|
||||||
# if LIBGIT2 exists, set build and link against that version
|
# if LIBGIT2 exists, set build and link against that version
|
||||||
libgit2_path = getenv('LIBGIT2')
|
libgit2_path = getenv('LIBGIT2')
|
||||||
include_dirs = []
|
if not libgit2_path:
|
||||||
library_dirs = []
|
libgit2_path = '/usr/local'
|
||||||
if libgit2_path:
|
|
||||||
include_dirs = [path.join(libgit2_path, 'include')]
|
include_dirs = [path.join(libgit2_path, 'include')]
|
||||||
library_dirs = [path.join(libgit2_path, 'lib')]
|
library_dirs = [path.join(libgit2_path, 'lib')]
|
||||||
|
|
||||||
C = ffi.verify("#include <git2.h>", libraries=["git2"],
|
C = ffi.verify("#include <git2.h>", libraries=["git2"],
|
||||||
include_dirs=include_dirs, library_dirs=library_dirs)
|
include_dirs=include_dirs, library_dirs=library_dirs)
|
||||||
|
Reference in New Issue
Block a user