summaryrefslogtreecommitdiff
blob: 6a261d17561f85aa8788dfbca91b897774c512b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
# Copyright (C) 2010 Gentoo Foundation
# Written by Sebastian Pipping <sping@gentoo.org>
#
# Licensed under GPL v2 or later

def add_module_path():
    import inspect
    import os
    import sys
    self_dir = os.path.dirname(inspect.getfile(sys._getframe(0)))
    if os.path.exists(os.path.join(self_dir, 'setup.py')):
        # Allow running from source dir
        sys.path.insert(0, os.path.join(self_dir, 'modules'))

add_module_path()
import layman.dbtools.gitoliteextractor