mirror of
https://git.freebsd.org/ports.git
synced 2025-05-12 23:31:50 -04:00
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
This commit is contained in:
parent
dbe7fcfc13
commit
f295c24f7c
6 changed files with 69 additions and 0 deletions
|
@ -1799,6 +1799,7 @@
|
|||
SUBDIR += py-python-dotenv
|
||||
SUBDIR += py-python-multipart
|
||||
SUBDIR += py-pyweblib
|
||||
SUBDIR += py-pywebview-gtk
|
||||
SUBDIR += py-pywikibot
|
||||
SUBDIR += py-pywry
|
||||
SUBDIR += py-qh3
|
||||
|
|
31
www/py-pywebview-gtk/Makefile
Normal file
31
www/py-pywebview-gtk/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
PORTNAME= pywebview
|
||||
DISTVERSION= 5.3.2
|
||||
CATEGORIES= www python
|
||||
MASTER_SITES= PYPI
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
PKGNAMESUFFIX= -gtk
|
||||
|
||||
MAINTAINER= DtxdF@disroot.org
|
||||
COMMENT= Build GUI for your Python program with JavaScript, HTML, and CSS (gtk)
|
||||
WWW= https://github.com/r0x0r/pywebview
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=0:devel/py-setuptools-scm@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
|
||||
LIB_DEPENDS= libwebkit2gtk-4.0.so:www/webkit2-gtk3
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bottle>=0:www/py-bottle@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}proxy_tools>=0:www/py-proxy_tools@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
|
||||
|
||||
USES= gnome python
|
||||
USE_GNOME+= gtk30:run pygobject3:run
|
||||
USE_PYTHON= autoplist cryptography pep517
|
||||
|
||||
CONFLICTS_INSTALL= www/py-${PORTNAME}-qt
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
.include <bsd.port.mk>
|
3
www/py-pywebview-gtk/distinfo
Normal file
3
www/py-pywebview-gtk/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1730049620
|
||||
SHA256 (pywebview-5.3.2.tar.gz) = 77b88a63e65e12913d269205e9c6d357666d4864826749c738bf432bd3ad23d9
|
||||
SIZE (pywebview-5.3.2.tar.gz) = 443072
|
20
www/py-pywebview-gtk/files/patch-webview_guilib.py
Normal file
20
www/py-pywebview-gtk/files/patch-webview_guilib.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- 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()
|
7
www/py-pywebview-gtk/pkg-descr
Normal file
7
www/py-pywebview-gtk/pkg-descr
Normal file
|
@ -0,0 +1,7 @@
|
|||
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.
|
7
www/py-pywebview-gtk/pkg-message
Normal file
7
www/py-pywebview-gtk/pkg-message
Normal file
|
@ -0,0 +1,7 @@
|
|||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
You need at least one font installed on your system or you will see a blank window.
|
||||
EOM
|
||||
}
|
||||
]
|
Loading…
Add table
Reference in a new issue