summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2020-04-11 14:09:05 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2020-04-11 14:11:24 +0800
commite6cc702bf8fdd5e742ed77d607e7b697d27bcfef (patch)
tree3af25d124e7555bab8663b96e88df35bf1a5c21f
parentcc21afae16d00291ea97cc1f159a4c268b94a198 (diff)
downloadgitdb-e6cc702bf8fdd5e742ed77d607e7b697d27bcfef.tar.gz
don't try to use __file__ when using pyoxidizer
-rw-r--r--gitdb/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitdb/__init__.py b/gitdb/__init__.py
index df1f242..2b06b24 100644
--- a/gitdb/__init__.py
+++ b/gitdb/__init__.py
@@ -13,7 +13,8 @@ import os
def _init_externals():
"""Initialize external projects by putting them into the path"""
for module in ('smmap',):
- sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', module))
+ if 'PYOXIDIZER' not in os.environ:
+ sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', module))
try:
__import__(module)