blob: 0ce32508e535941eaf4a9ff995af45323ce031f1 [file] [log] [blame]
Mike Frysingerf6013762019-06-13 02:30:51 -04001# -*- coding:utf-8 -*-
2#
Conley Owens094cdbe2014-01-30 15:09:59 -08003# Copyright (C) 2014 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17from __future__ import print_function
David Pursehouse1126c4e2019-07-11 13:07:42 +090018try:
David Pursehouse5fbd1c62019-07-31 15:29:25 +090019 from importlib.machinery import SourceFileLoader
20 _loader = lambda *args: SourceFileLoader(*args).load_module()
David Pursehouse1126c4e2019-07-11 13:07:42 +090021except ImportError:
David Pursehouse5fbd1c62019-07-31 15:29:25 +090022 import imp
23 _loader = lambda *args: imp.load_source(*args)
Conley Owens094cdbe2014-01-30 15:09:59 -080024import os
25
26
27def WrapperPath():
28 return os.path.join(os.path.dirname(__file__), 'repo')
29
30_wrapper_module = None
31def Wrapper():
32 global _wrapper_module
33 if not _wrapper_module:
David Pursehouse1126c4e2019-07-11 13:07:42 +090034 _wrapper_module = _loader('wrapper', WrapperPath())
Conley Owens094cdbe2014-01-30 15:09:59 -080035 return _wrapper_module