tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

__init__.py (972B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 
      5 
      6 import os
      7 from importlib import import_module
      8 
      9 CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
     10 PROJECT_DIR = os.path.realpath(
     11    os.path.join(CURRENT_DIR, "..", "..", "mobile", "android")
     12 )
     13 ANDROID_COMPONENTS_DIR = os.path.join(PROJECT_DIR, "android-components")
     14 FOCUS_DIR = os.path.join(PROJECT_DIR, "focus-android")
     15 FENIX_DIR = os.path.join(PROJECT_DIR, "fenix")
     16 
     17 
     18 def register(graph_config):
     19    """
     20    Import all modules that are siblings of this one, triggering decorators in
     21    the process.
     22    """
     23    _import_modules([
     24        "job",
     25        "parameters",
     26        "target_tasks",
     27        "util.group_by",
     28        "worker_types",
     29    ])
     30 
     31 
     32 def _import_modules(modules):
     33    for module in modules:
     34        import_module(f".{module}", package=__name__)