summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-04-07 18:38:42 +0200
committerSebastian Thiel <byronimo@gmail.com>2015-04-07 18:39:26 +0200
commitab7c3223076306ca71f692ed5979199863cf45a7 (patch)
tree64b40de993827e65432b27cd0c07248b6462151d /git
parent1fd07a0a7a6300db1db8b300a3f567b31b335570 (diff)
downloadgitpython-ab7c3223076306ca71f692ed5979199863cf45a7.tar.gz
fix(externals): init external in dev mode only
Previously it would always adjust your system path, which is bad behaviour.
Diffstat (limited to 'git')
-rw-r--r--git/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git/__init__.py b/git/__init__.py
index 5630b91d..e8dae272 100644
--- a/git/__init__.py
+++ b/git/__init__.py
@@ -15,7 +15,8 @@ __version__ = 'git'
#{ Initialization
def _init_externals():
"""Initialize external projects by putting them into the path"""
- sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', 'gitdb'))
+ if __version__ == 'git':
+ sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'ext', 'gitdb'))
try:
import gitdb