-
-
Save kergoth/33c11ac5aa0b130e095743d5405e6fd2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import importlib | |
import importlib.machinery | |
class BBPythonPathFinder(importlib.machinery.PathFinder): | |
@classmethod | |
def find_spec(cls, fullname, path=None, target=None): | |
"""Try to find a spec for 'fullname' on bb_pythonpath or 'path'.""" | |
if path is None: | |
path = bb_pythonpath | |
return super().find_spec(fullname, path, target) | |
sys.meta_path.append(BBPythonPathFinder) | |
bb.utils._context['oe'] = importlib.import_module('oe') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment