コード例 #1
0
 def __init__(self, os_name, target, version, arch, subarchives=None,
              modules=None, mirror=None, logging=None, all_extra=False):
     self.version = version
     self.target = target
     self.arch = arch
     self.mirror = mirror
     self.os_name = os_name
     self.all_extra = all_extra
     self.arch_list = [item.get('arch') for item in Settings().qt_combinations]
     all_archives = (subarchives is None)
     if mirror is not None:
         self.has_mirror = True
         self.base = mirror + '/online/qtsdkrepository/'
     else:
         self.has_mirror = False
         self.base = self.BASE_URL
     if logging:
         self.logger = logging
     else:
         self.logger = getLogger('aqt')
     self.archives = []
     self.mod_list = []
     qt_ver_num = self.version.replace(".", "")
     self.qt_ver_base = self.version[0:1]
     if all_extra:
         self.all_extra = True
     else:
         for m in modules if modules is not None else []:
             self.mod_list.append("qt.qt{}.{}.{}.{}".format(self.qt_ver_base, qt_ver_num, m, arch))
             self.mod_list.append("qt.{}.{}.{}".format(qt_ver_num, m, arch))
     self._get_archives(qt_ver_num)
     if not all_archives:
         self.archives = list(filter(lambda a: a.name in subarchives, self.archives))
コード例 #2
0
ファイル: archives.py プロジェクト: pengguanjun/aqtinstall
 def __init__(
     self,
     os_name,
     target,
     version,
     arch,
     base,
     subarchives=None,
     modules=None,
     logging=None,
     all_extra=False,
     timeout=(5, 5),
 ):
     self.version = version
     self.target = target
     self.arch = arch
     self.os_name = os_name
     self.all_extra = all_extra
     self.arch_list = [item.get("arch") for item in Settings().qt_combinations]
     all_archives = subarchives is None
     self.base = base
     if logging:
         self.logger = logging
     else:
         self.logger = getLogger("aqt")
     self.archives = []
     self.mod_list = []
     qt_ver_num = self.version.replace(".", "")
     self.qt_ver_base = self.version[0:1]
     if all_extra:
         self.all_extra = True
     else:
         for m in modules if modules is not None else []:
             self.mod_list.append(
                 "qt.qt{}.{}.{}.{}".format(self.qt_ver_base, qt_ver_num, m, arch)
             )
             self.mod_list.append("qt.{}.{}.{}".format(qt_ver_num, m, arch))
     self.timeout = timeout
     self._get_archives(qt_ver_num)
     if not all_archives:
         self.archives = list(filter(lambda a: a.name in subarchives, self.archives))
コード例 #3
0
 def __init__(self, env_key='AQT_CONFIG'):
     config = os.getenv(env_key, None)
     self.settings = Settings(config=config)
     self._create_parser()