mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Explicitly import html.parser for Cx_Freeze to build
The markdown dependency uses importlib to monkeypatch 'html.parser' [1]. Due to this approach 'html.parser' is never explicitly stated as a dependency. This works fine in most cases, since it's part of the python standard lib. But on Windows the build tool (CxFreeze) ships in the .exe only the modules needed. And because html.parser is never mentioned, it fails with an error (see issue #501). Fixes #501 [1]: https://github.com/Python-Markdown/markdown/blob/master/markdown/htmlparser.py#L29
This commit is contained in:
parent
b7e212efd9
commit
e8b28d6f87
1 changed files with 4 additions and 0 deletions
|
@ -18,6 +18,10 @@ else:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from PySide2 import QtCore, QtWidgets
|
from PySide2 import QtCore, QtWidgets
|
||||||
|
|
||||||
|
# XXX implict import for "markdown" module required for Cx_Freeze to build on Windows
|
||||||
|
# See https://github.com/freedomofpress/dangerzone/issues/501
|
||||||
|
import html.parser
|
||||||
|
|
||||||
import markdown
|
import markdown
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue