# -*- coding: utf-8 -*-
"""
/***************************************************************************
 OAMQGIS3
                                 A QGIS plugin
 Open Aerial Map Plugin for QGIS3
 Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
                             -------------------
        begin                : 2019-02-14
        copyright            : (C) 2019 by yojiyojiyoji
        email                : hotqgis@gmail.com
        git sha              : $Format:%H$
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
 This script initializes the plugin, making it known to QGIS.
"""

import sys
import os

path_root = os.path.join(os.path.dirname(__file__))
sys.path.append(path_root)

# path to external libs
path_urllib3 = os.path.join(
    os.path.dirname(__file__),
    'ext_libs/urllib3-1.24.1/src')
sys.path.append(path_urllib3)

path_chardet = os.path.join(
    os.path.dirname(__file__),
    'ext_libs/chardet-3.0.4')
sys.path.append(path_chardet)

path_certifi = os.path.join(
    os.path.dirname(__file__),
    'ext_libs/certifi-2018.11.29')
sys.path.append(path_certifi)

path_idna = os.path.join(
    os.path.dirname(__file__),
    'ext_libs/idna-2.8')
sys.path.append(path_idna)

path_requests = os.path.join(
    os.path.dirname(__file__),
    'ext_libs/requests-2.25.1')
sys.path.append(path_requests)

path_geopy = os.path.join(
    os.path.dirname(__file__),
    'ext_libs/geopy-1.23.0')
sys.path.append(path_geopy)

# noinspection PyPep8Naming
def classFactory(iface):  # pylint: disable=invalid-name
    """Load OAMQGIS3 class from file OAMQGIS3.

    :param iface: A QGIS interface instance.
    :type iface: QgsInterface
    """
    #
    from .oam_qgis3 import OAMQGIS3
    return OAMQGIS3(iface)
