From ab7c3223076306ca71f692ed5979199863cf45a7 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 7 Apr 2015 18:38:42 +0200 Subject: fix(externals): init external in dev mode only Previously it would always adjust your system path, which is bad behaviour. --- git/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'git') 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 -- cgit v1.2.3