From d37ef7770fbc22ce07634430d9a61516762a2724 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 5 Jul 2011 13:42:16 +0200 Subject: [PATCH] Added smmap as submodule, package initialization adjusted to assure it is available --- .gitmodules | 5 ++++- git/__init__.py | 16 +++++++++------- git/ext/smmap | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) create mode 160000 git/ext/smmap diff --git a/.gitmodules b/.gitmodules index 57b06fc86..8535685a3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ -[submodule "git/ext/async"] +[submodule "async"] path = git/ext/async url = git://github.com/gitpython-developers/async.git +[submodule "smmap"] + path = git/ext/smmap + url = git://github.com/Byron/smmap.git diff --git a/git/__init__.py b/git/__init__.py index 4a4200cc1..adc5487e6 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -14,13 +14,15 @@ #{ Initialization def _init_externals(): """Initialize external projects by putting them into the path""" - sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', 'async')) - - try: - import async - except ImportError: - raise ImportError("'async' could not be found in your PYTHONPATH") - #END verify import + ext_base = os.path.join(os.path.dirname(__file__), 'ext') + for package in ('async', 'smmap'): + sys.path.append(os.path.join(ext_base, package)) + try: + __import__(package) + except ImportError: + raise ImportError("%r could not be found in your PYTHONPATH" % package) + #END verify import + #END handle external import #} END initialization diff --git a/git/ext/smmap b/git/ext/smmap new file mode 160000 index 000000000..cf297b7b8 --- /dev/null +++ b/git/ext/smmap @@ -0,0 +1 @@ +Subproject commit cf297b7b81bc5f6011c49d818d776ed7915fa1ee