This commit is contained in:
Roman
2018-11-20 23:56:37 +02:00
10 changed files with 35 additions and 6254 deletions

2
.gitignore vendored
View File

@@ -1,6 +1,6 @@
*.pyc
*.spec
upload.sh
*.sh
setup.cfg
pywebview.egg-info
MANIFEST

View File

@@ -11,15 +11,15 @@ matrix:
# env: PYTHON_VERSION="3"
- os: linux
sudo: required
dist: trusty
dist: xenial
language: python
python: "2.7_with_system_site_packages"
env: PACKAGES="xvfb gir1.2-gtk-3.0 gir1.2-webkit2-4.0 python-gi python-gi-cairo pep8 pyflakes python-pytest" PYTHON="python"
- os: linux
sudo: required
dist: trusty
dist: xenial
language: python
python: "3.4_with_system_site_packages"
python: "3.5_with_system_site_packages"
env: PACKAGES="xvfb gir1.2-gtk-3.0 gir1.2-webkit2-4.0 python3-gi python3-gi-cairo python3-pep8 pyflakes python3-pytest" PYTHON="python3"
- os: linux
sudo: required

View File

@@ -3,6 +3,13 @@
# Changelog
## 2.2.1
_Released 24/10/2018_
- `Fix` Dependency installation
- `New` Reintroduce [qt] extra require switch
## 2.2
_Released 23/10/2018_

View File

@@ -20,7 +20,7 @@ _pywebview_ is created by [Roman Sirokov](https://github.com/r0x0r/). Maintained
``` bash
pip install pywebview
```
_On Linux you might need additional libraries. Refer to the [installation](https://pywebview.flowrl.com/guide/installation.html) page for details._
_On Linux you need additional libraries. Refer to the [installation](https://pywebview.flowrl.com/guide/installation.html) page for details._
### Hello world

View File

@@ -14,7 +14,7 @@
<body class="bg-white near-black tc avenir fw1">
<div class="fl w-100 center">
<div class="center">
<img src="logo.png" alt="pywebview" class="pv3" style="width: 200px"/>
<img src="/logo.png" alt="pywebview" class="pv3" style="width: 200px"/>
<div class="mb5">
<a href="https://pywebview.flowrl.com/" class="green dim f4 link" target="_blank">Documentation</a>

View File

@@ -14,7 +14,7 @@ footer: BSD Licensed | Copyright © 2014-present Roman Sirokov
pip install pywebview
```
_On Linux you might need additional libraries. Refer to the [installation](/guide/installation.html) page for details._
_On Linux you need additional libraries. Refer to the [installation](/guide/installation.html) page for details._
### Hello world:

View File

@@ -4,7 +4,11 @@
pip install pywebview
```
This will install _pywebview_ with default dependencies.
This will install _pywebview_ with default dependencies. To install _pywebview_ with PyQt5 (available on Linux and macOS) use
``` bash
pip install pywebview[qt]
```
## Dependencies
@@ -25,16 +29,20 @@ You can also use QT5 in macOS
### Linux
If you are running KDE, QT will be chosen, otherwise GTK is the default. Additionally for both GTK and QT you have to install WebKit separately.
You have to install Linux dependencies manually. You can choose between GTK and QT.
[PyGObject](https://pygobject.readthedocs.io/en/latest/) library is used with GTK.
[PyGObject](https://pygobject.readthedocs.io/en/latest/) is used with GTK. To install dependencies on Ubuntu for both Python 3 and 2
``` bash
sudo apt install python-gi gir1.2-webkit2-4.0
sudo apt install python-gi python-gi-cairo python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.0
```
[PyQt5](http://pyqt.sourceforge.net/Docs/PyQt5/index.html) is used with QT. On Debian based system you need following packages
For other distributions, consult the [PyGObject documentation](https://pygobject.readthedocs.io/en/latest/getting_started.html)
<br/><br/>
[PyQt5](http://pyqt.sourceforge.net/Docs/PyQt5/index.html) is used with QT. On Ubuntu you need following packages
``` bash
sudo apt install python3-pyqt5 python3-pyqt5.qtwebkit libqt5webkit5-dev
sudo apt install python3-pyqt5 python3-pyqt5.qtwebkit python-pyqt5 python-pyqt5.qtwebkit libqt5webkit5-dev
```

View File

@@ -2,7 +2,9 @@ import os
import platform
from setuptools import setup
extras_require = {
'qt': ['PyQt5'],
}
install_requires = [
'pythonnet ; sys_platform == "win32"',
@@ -25,6 +27,7 @@ setup(
download_url="https://github.com/r0x0r/pywebview/archive/2.2.1.tar.gz",
keywords=["gui", "webkit", "html", "web"],
install_requires=install_requires,
extras_require=extras_require,
version="2.2.1",
include_package_data=True,
packages=["webview", "webview.js"],

View File

@@ -189,7 +189,9 @@ class BrowserView:
code = 'pywebview._bridge.return_val = "{0}";'.format(escape_string(str(return_val)))
webview.run_javascript(code)
except json.JSONDecodeError:
except ValueError: # Python 2
pass
except json.JSONDecodeError: # Python 3
pass
def on_navigation(self, webview, decision, decision_type):

6239
yarn.lock

File diff suppressed because it is too large Load Diff