Skip to content

Commit

Permalink
Merge pull request #1508 from freakboy3742/appimage-warning
Browse files Browse the repository at this point in the history
Add a warning about AppImage use.
  • Loading branch information
freakboy3742 authored Oct 25, 2023
2 parents 4a06104 + 08b406d commit 356ec0d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions changes/1500.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The use of AppImage as an output format now generates a warning.
18 changes: 18 additions & 0 deletions src/briefcase/platforms/linux/appimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,24 @@ def finalize_app_config(self, app: AppConfig):
"""
)

self.logger.warning(
"""\
*************************************************************************
** WARNING: Use of AppImage is not recommended! **
*************************************************************************
Briefcase supports AppImage in a best-effort capacity. It has proven
to be highly unreliable as a distribution platform. AppImages cannot
use pre-compiled binary wheels, and has significant problems with
most commonly used GUI toolkits (including GTK and PySide).
Consider using system packages or Flatpak for Linux app
distribution.
*************************************************************************
"""
)


class LinuxAppImageMostlyPassiveMixin(LinuxAppImagePassiveMixin):
# The Mostly Passive mixin verifies that Docker exists and can be run, but
Expand Down
14 changes: 11 additions & 3 deletions tests/platforms/linux/appimage/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ def test_finalize_docker(create_command, first_app_config, capsys):

create_command.finalize_app_config(first_app_config)

stdout = capsys.readouterr().out
# Warning message was not recorded
assert "WARNING: Building a Local AppImage!" not in capsys.readouterr().out
assert "WARNING: Building a Local AppImage!" not in stdout

# Generic appimage warning *was* recorded
assert "WARNING: Use of AppImage is not recommended!" in stdout


def test_finalize_nodocker(create_command, first_app_config, capsys):
Expand All @@ -79,8 +83,12 @@ def test_finalize_nodocker(create_command, first_app_config, capsys):

create_command.finalize_app_config(first_app_config)

# Warning message was not recorded
assert "WARNING: Building a Local AppImage!" in capsys.readouterr().out
stdout = capsys.readouterr().out
# Warning message was recorded
assert "WARNING: Building a Local AppImage!" in stdout

# Generic appimage warning *was* recorded
assert "WARNING: Use of AppImage is not recommended!" in stdout


@pytest.mark.parametrize(
Expand Down

0 comments on commit 356ec0d

Please sign in to comment.