Пример #1
0
def test_bvi_utils_tools_binarycreator_fullpath_4_win():
    repository_path = "%s/in/repository" % FULLPATH
    installer_file = "%s/out/installer" % FULLPATH
    online_only = False
    offline_only = False
    exclude = None
    include = None
    binarycreator(installer_file,
                  repository_path,
                  online_only=online_only,
                  offline_only=offline_only,
                  exclude=exclude,
                  include=include)
    assert os.path.isfile(installer_file)
    print("\n[ ! ] ==> Check the binary: %s" % installer_file)
 def __create_installer(self):
     "Create the binary installer(s)."
     if not self.args.repository_only:
         if self.args.installer is not None:
             if self.args.offline_installer is None:
                 online_only = self.args.online_only
                 offline_only = self.args.offline_only
             else:
                 online_only = True
                 offline_only = False
             logging.getLogger().info(MESSAGE_BVI_INSTALLER)
             binarycreator(
                 self.args.installer,
                 "%s_tmp" % self.args.repository,
                 online_only=online_only,
                 offline_only=offline_only,
                 platform_target=self.args.platform_target if
                 self.args.platform_target else System.platform().lower(),
                 command=self.args.binary_creator_command
                 if self.args.binary_creator_command else None)
         if self.args.offline_installer is not None:
             online_only = False
             offline_only = self.args.offline_only
             logging.getLogger().info(MESSAGE_BVI_OFFLINE_INSTALLER)
             binarycreator(
                 self.args.offline_installer,
                 "%s_tmp" % self.args.repository,
                 additional_repositories=[
                     os.path.join("%s_tmp", "packages") % r
                     for r in self.args.additional_repositories
                 ],
                 online_only=online_only,
                 offline_only=offline_only,
                 platform_target=self.args.platform_target if
                 self.args.platform_target else System.platform().lower(),
                 command=self.args.binary_creator_command
                 if self.args.binary_creator_command else None)