ports/www/py-pywebview-gtk/files/patch-webview_guilib.py
Jesús Daniel Colmenares Oviedo f295c24f7c
www/py-pywebview-gtk: New port: Build GUI for your Python program with JavaScript, HTML, and CSS (gtk)
pywebview is a lightweight cross-platform wrapper around a webview
component that allows to display HTML content in its own native GUI
window. It gives you the power of web technologies in your desktop
application, hiding the fact that the GUI is browser based. Available
for Windows, macOS, Linux and Android. You can use pywebview either
with a 3rd party web framework or on its own with a two way bridge
between Python and DOM.

WWW: https://github.com/r0x0r/pywebview
PR:		282459
2024-11-07 18:22:13 -08:00

20 lines
938 B
Python

--- webview/guilib.py.orig 2024-10-27 17:42:14 UTC
+++ webview/guilib.py
@@ -114,7 +114,7 @@ def initialize(forced_gui: GUIType | None = None):
elif hasattr(sys, 'getandroidapilevel'):
try_import([import_android])
- elif platform.system() == 'Linux' or platform.system() == 'OpenBSD':
+ elif platform.system() == 'Linux' or platform.system() == 'OpenBSD' or platform.system() == 'FreeBSD':
if forced_gui == 'qt':
guis = [import_qt, import_gtk]
else:
@@ -135,7 +135,7 @@ def initialize(forced_gui: GUIType | None = None):
raise WebViewException('You must have pythonnet installed in order to use pywebview.')
else:
raise WebViewException(
- 'Unsupported platform. Only Windows, Linux, OS X, OpenBSD are supported.'
+ 'Unsupported platform. Only Windows, Linux, OS X, OpenBSD, FreeBSD are supported.'
)
guilib.setup_app()