# Path: lib/log_helper.py
# class LogHelper(object):
#     def __init__(self, log_file_path=None, verbose=False, rotate_size=0):
# 
# Path: lib/utils.py
# LOG = logging.getLogger(__name__)
# def base_directory_not_found_error(err):
# def retry_on_error(f, error=Exception, failure_handler=None,
#                    max_retries=2, seconds_between_retries=5):
#     def _reraise_exception(exc):
# def retry_on_timeout(f, is_timeout_error_f,
#                      max_retries=2,
#                      seconds_between_retries=5,
#                      initial_timeout=120,
#                      timeout_incr_f=lambda t: t * 2):
# def set_http_proxy_env(proxy):
# def run_command(cmd, **kwargs):
# def create_directory(directory):
# def is_package_installed(package_name):
# def recursive_glob(directory, pattern):
# def replace_str_in_file(file_path, search, replacement):
# def force_symlink(target_path, link_path):


import argparse
import json
import os
import sys
import yaml
from lib import log_helper
from lib import utils
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.





RAW_TEXT_ID = "R|"
CONFIG_METADATA_FILE_PATH = "config/metadata.yaml"
LOG_FILE_NAME = 'builds.log'

config_parser = None


def get_config():
    global config_parser
    if not config_parser:
        config_parser = ConfigParser()
        config_parser.parse()
    return config_parser


class CustomHelpFormatter(argparse.HelpFormatter):

# Path: lib/log_helper.py
# class LogHelper(object):
#     def __init__(self, log_file_path=None, verbose=False, rotate_size=0):
# 
# Path: lib/utils.py
# LOG = logging.getLogger(__name__)
# def base_directory_not_found_error(err):
# def retry_on_error(f, error=Exception, failure_handler=None,
#                    max_retries=2, seconds_between_retries=5):
#     def _reraise_exception(exc):
# def retry_on_timeout(f, is_timeout_error_f,
#                      max_retries=2,
#                      seconds_between_retries=5,
#                      initial_timeout=120,
#                      timeout_incr_f=lambda t: t * 2):
# def set_http_proxy_env(proxy):
# def run_command(cmd, **kwargs):
# def create_directory(directory):
# def is_package_installed(package_name):
# def recursive_glob(directory, pattern):
# def replace_str_in_file(file_path, search, replacement):
# def force_symlink(target_path, link_path):


# Path: lib/config.py
import argparse
import json
import os
import sys
import yaml
from lib import log_helper
from lib import utils

# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.





RAW_TEXT_ID = "R|"
CONFIG_METADATA_FILE_PATH = "config/metadata.yaml"
LOG_FILE_NAME = 'builds.log'

config_parser = None


def get_config():
    global config_parser
    if not config_parser:
        config_parser = ConfigParser()
        config_parser.parse()
    return config_parser


class CustomHelpFormatter(argparse.HelpFormatter):

    def _split_lines(self, text, width):