Add dependency on jinja2.
This commit is contained in:
parent
6d2acc244c
commit
2fdf241da2
@ -74,6 +74,7 @@ The following software and libraries are required to run qutebrowser:
|
||||
(5.3.1 recommended) for Python 3
|
||||
* https://pypi.python.org/pypi/setuptools/[pkg_resources/setuptools]
|
||||
* http://fdik.org/pyPEG/[pyPEG2]
|
||||
* http://jinja.pocoo.org/[jinja2]
|
||||
|
||||
The following libraries are optional and provide colored logging in the
|
||||
console:
|
||||
@ -85,7 +86,8 @@ On Debian
|
||||
~~~~~~~~~
|
||||
|
||||
----
|
||||
# apt-get install python3-pyqt5 python3-pyqt5.qtwebkit python3-pkg-resources python3-pip
|
||||
# apt-get install python3-pyqt5 python3-pyqt5.qtwebkit python3-pkg-resources
|
||||
python3-pip python3-jinja2
|
||||
# pip3 install pypeg2 --allow-external pypeg2 --allow-unverified pypeg2
|
||||
----
|
||||
|
||||
@ -129,6 +131,7 @@ to get Qt and PyQt5.
|
||||
* Get pip as described http://stackoverflow.com/a/12476379[on Stack Overflow].
|
||||
* Run +pip install --allow-external pypeg2 --allow-unverified pypeg2 pypeg2+ to
|
||||
install pypeg2.
|
||||
* Run +pip install jinja2+ to install jinja2.
|
||||
|
||||
As soon as v0.1 is out, a standalone .exe (built with
|
||||
http://cx-freeze.sourceforge.net/[cx_Freeze]) will be provided. In the
|
||||
|
@ -9,7 +9,7 @@ arch=(any)
|
||||
url="http://www.qutebrowser.org/"
|
||||
license=('GPL')
|
||||
depends=('python>=3.4' 'python-setuptools' 'python-pyqt5>=5.2' 'qt5-base>=5.2'
|
||||
'qt5-webkit>=5.2' 'libxkbcommon-x11' 'python-pypeg2')
|
||||
'qt5-webkit>=5.2' 'libxkbcommon-x11' 'python-pypeg2' 'python-jinja')
|
||||
makedepends=('python' 'python-setuptools')
|
||||
optdepends=('python-colorlog: colored logging output')
|
||||
options=(!emptydirs)
|
||||
|
@ -112,6 +112,7 @@ def main():
|
||||
earlyinit.check_pyqt_webkit()
|
||||
earlyinit.check_pkg_resources()
|
||||
earlyinit.check_pypeg2()
|
||||
earlyinit.check_jinja2()
|
||||
# We do this import late as we need to fix harfbuzz first.
|
||||
from qutebrowser import app
|
||||
from qutebrowser.utils import debug
|
||||
|
@ -248,3 +248,17 @@ def check_pypeg2():
|
||||
pip="pypeg2 --allow-external pypeg2 "
|
||||
"--allow-unverified pypeg2")
|
||||
_die(text)
|
||||
|
||||
|
||||
def check_jinja2():
|
||||
"""Check if jinja2 is installed."""
|
||||
try:
|
||||
import jinja2 # pylint: disable=unused-variable
|
||||
except ImportError:
|
||||
text = _missing_str("jinja2",
|
||||
debian="apt-get install python3-jinja2",
|
||||
arch="Install python-jinja from the AUR",
|
||||
windows="Install from http://www.lfd.uci.edu/"
|
||||
"~gohlke/pythonlibs/#jinja2 or via pip.",
|
||||
pip="jinja2")
|
||||
_die(text)
|
||||
|
@ -179,6 +179,13 @@ def _module_versions():
|
||||
else:
|
||||
ver = getattr(pypeg2, '__version__', 'yes')
|
||||
lines.append('pypeg2: {}'.format(ver))
|
||||
try:
|
||||
import jinja2
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
ver = getattr(jinja2, '__version__', 'yes')
|
||||
lines.append('jinja2: {}'.format(ver))
|
||||
return lines
|
||||
|
||||
|
||||
|
@ -98,7 +98,7 @@ setupdata = {
|
||||
'description': _get_constant('description'),
|
||||
'long_description': read_file('README.asciidoc'),
|
||||
'url': 'http://www.qutebrowser.org/',
|
||||
'requires': ['pypeg2'],
|
||||
'requires': ['pypeg2', 'jinja2'],
|
||||
'author': _get_constant('author'),
|
||||
'author_email': _get_constant('email'),
|
||||
'license': _get_constant('license'),
|
||||
|
2
setup.py
2
setup.py
@ -47,7 +47,7 @@ try:
|
||||
['qutebrowser = qutebrowser.qutebrowser:main']},
|
||||
test_suite='qutebrowser.test',
|
||||
zip_safe=True,
|
||||
install_requires=['pypeg2'],
|
||||
install_requires=['pypeg2', 'jinja2'],
|
||||
extras_require={'nice-debugging': ['colorlog', 'colorama'],
|
||||
'checks': ['flake8', 'pylint', 'check-manifest',
|
||||
'pyroma']},
|
||||
|
Loading…
Reference in New Issue
Block a user