def build_command(tmp_path, first_app_config): command = LinuxAppImageBuildCommand(base_path=tmp_path, home_path=tmp_path / "home", apps={'first': first_app_config}) command.host_os = 'Linux' command.host_arch = 'wonky' command.verbosity = 0 command.use_docker = False command._path_index = { first_app_config: { 'app_path': "First App.AppDir/usr/app", 'app_packages_path': "First App.AppDir/usr/app_packages", } } command.os = mock.MagicMock() command.os.environ.copy.return_value = {'PATH': '/usr/local/bin:/usr/bin'} # Store the underlying subprocess instance command._subprocess = mock.MagicMock() command.subprocess._subprocess = command._subprocess # Set up a Docker wrapper command.Docker = Docker command.linuxdeploy = LinuxDeploy(command) return command
def build_command(tmp_path, first_app_config): command = LinuxAppImageBuildCommand(base_path=tmp_path, home_path=tmp_path / "home", apps={'first': first_app_config}) command.host_os = 'Linux' command.host_arch = 'wonky' command.verbosity = 0 command.use_docker = False command.os = mock.MagicMock() command.os.environ.copy.return_value = {'PATH': '/usr/local/bin:/usr/bin'} # Store the underlying subprocess instance command._subprocess = mock.MagicMock() command.subprocess._subprocess = command._subprocess # Set up a Docker wrapper command.Docker = Docker command.linuxdeploy_appimage = tmp_path / 'tools' / 'linuxdeploy-wonky.AppImage' return command