diff options
| author | Magnus Hagander | 2019-11-05 18:59:35 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2019-11-05 19:05:36 +0000 |
| commit | 0ef3b472aae2ed693b16d3da95b1562fefa1e6cd (patch) | |
| tree | 82db6192b0248ddd46aba8ccd340f073358d27a7 /tools | |
| parent | 67ee0f4eeced616c195b6d13b4d018e5b072c2f5 (diff) | |
Make loading of qrencode and cairosvg optional
In particular, cairosvg is only used for the PNG format twitter cards,
so most functionality exists without it.
Make sure we import those modules conditionally only when needed and
handle the import exception. Also add an explicit attempt to load them
during system startup and write to the log if it fails, so it doesn't do
so silently.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/devsetup/dev_requirements.txt | 2 | ||||
| -rw-r--r-- | tools/devsetup/dev_requirements_full.txt | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/devsetup/dev_requirements.txt b/tools/devsetup/dev_requirements.txt index 680dafc9..d2425a3d 100644 --- a/tools/devsetup/dev_requirements.txt +++ b/tools/devsetup/dev_requirements.txt @@ -17,5 +17,3 @@ python-dateutil requests requests-oauthlib==0.7.0 file-magic -qrencode -cairosvg diff --git a/tools/devsetup/dev_requirements_full.txt b/tools/devsetup/dev_requirements_full.txt new file mode 100644 index 00000000..0afc5109 --- /dev/null +++ b/tools/devsetup/dev_requirements_full.txt @@ -0,0 +1,4 @@ +# Install these requirements as well for full functionality, but they +# are not required for the base. +qrencode +cairosvg |
