From 04f024fe8fc833ace171d36d1ee31cc19d073c47 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Sun, 21 Jun 2020 18:40:06 +0100 Subject: [PATCH] Add extras for templating One of our examples shows off the use of Jinja2 for templating HTML files, but we don't make it easy or clear for users to know how to enable support. This adds an entry to the readme and indicates supported versions of Jinja2 via `extras_require` in `setup.py` --- README.md | 6 ++++++ setup.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 3850f26f..f6ea5d42 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,12 @@ Install from pypi with `pip`: pip install eel ``` +To include support for HTML templating, currently using [Jinja2](https://pypi.org/project/Jinja2/#description): + +```shell +pip install eel[jinja2] +``` + ## Usage ### Directory Structure diff --git a/setup.py b/setup.py index 4aaf0094..bc6d8c56 100644 --- a/setup.py +++ b/setup.py @@ -15,6 +15,9 @@ 'eel': ['eel.js'], }, install_requires=['bottle', 'bottle-websocket', 'future', 'whichcraft'], + extras_require={ + "jinja2": ['jinja2>=2.10'] + }, python_requires='>=3.6', description='For little HTML GUI applications, with easy Python/JS interop', long_description=long_description,