Skip to content

Commit

Permalink
Added smmap as submodule, package initialization adjusted to assure i…
Browse files Browse the repository at this point in the history
…t is available
  • Loading branch information
Byron committed Jul 5, 2011
1 parent da12df9 commit d37ef77
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .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
16 changes: 9 additions & 7 deletions git/__init__.py
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions git/ext/smmap
Submodule smmap added at cf297b

0 comments on commit d37ef77

Please sign in to comment.