1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2025-12-18 13:10:17 +01:00

Fixed issue with html5-parser.

During development, turns out, that some incompatibility has been
introduced with lxml and html5-parser binary versions on pypy, with
library which is installed on my system. In case, where incompatibility
occurs, there was no error message, no exception thrown, just as a
result of parsing, lame lxml object has been returned, and performing
method like find() on it causes returning None instead of expected
Element object.

Following information about installation of the html5-library[1], I was
forced to change how ebook-converter is installed. Now, we have to build
and compile lxml on the target system, which is forced by introduced
requirements.txt file. Perhaps, I'll reconsider removing html5-parser in
the future.

[1] https://html5-parser.readthedocs.io/en/latest/#unix
This commit is contained in:
2020-11-11 15:51:07 +01:00
parent 22fed6f4d3
commit 35c34c3b45
2 changed files with 12 additions and 4 deletions

View File

@@ -107,10 +107,7 @@ managers), i.e:
$ . venv/bin/activate
(venv) $ git clone https://github.com/gryf/ebook-converter
(venv) $ cd ebook-converter
(venv) $ # you can either use pip or just setuptools:
(venv) $ pip install .
(venv) $ # OR
(venv) $ python setup.py install
(venv) $ pip install -r requirements.txt .
Simple as that. And from now on, you can issue converter:

11
requirements.txt Normal file
View File

@@ -0,0 +1,11 @@
beautifulsoup4>=4.9.3
css-parser>=1.0.6
filelock>=3.0.12
html2text>=2020.1.16
html5-parser==0.4.9 --no-binary lxml
msgpack>=1.0.0
odfpy>=1.4.1
pillow>=8.0.1
python-dateutil>=2.8.1
setuptools>=50.3.2
tinycss>=0.4