From 466ed9c7a6a9d6d1a61e2c5dbe6f850ee04e8b90 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 11 Apr 2020 14:48:00 +0800 Subject: Test for PyOxidizer and avoid trying to use __file__ if present Fixes #1002 --- git/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/__init__.py') diff --git a/git/__init__.py b/git/__init__.py index e98806d4..8f32d07b 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -18,7 +18,7 @@ __version__ = 'git' #{ Initialization def _init_externals(): """Initialize external projects by putting them into the path""" - if __version__ == 'git': + if __version__ == 'git' and 'PYOXIDIZER' not in os.environ: sys.path.insert(0, osp.join(osp.dirname(__file__), 'ext', 'gitdb')) try: -- cgit v1.2.3