make pygit2 work with pyinstaller

This commit is contained in:
Santiago Perez De Rosso 2015-04-03 11:35:54 -04:00
parent 1f755c601c
commit cd7e2b21be

@ -80,7 +80,10 @@ def get_ffi():
# Load C definitions
if getattr(sys, 'frozen', False):
dir_path = dirname(abspath(sys.executable))
if hasattr(sys, '_MEIPASS'):
dir_path = sys._MEIPASS
else:
dir_path = dirname(abspath(sys.executable))
else:
dir_path = dirname(abspath(__file__))