Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 806788 - dev-python/weasyprint-53.0 doesn't work with app-text/pandoc
Summary: dev-python/weasyprint-53.0 doesn't work with app-text/pandoc
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-06 10:41 UTC by Hund
Modified: 2023-03-29 15:06 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hund 2021-08-06 10:41:23 UTC
I recently upgraded the package dev-python/weasyprint to version 53.0 from 52.5  and this is now what happens when I try to use Pandoc with WeasyPrint:

```
$ pandoc --pdf-engine weasyprint -c ../style.css input.md -s -o output.pdf
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/weasyprint", line 33, in <module>
    sys.exit(load_entry_point('weasyprint==53.0', 'console_scripts', 'weasyprint')())
  File "/usr/lib/python-exec/python3.9/weasyprint", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/weasyprint/__init__.py", line 322, in <module>
    from .css import preprocess_stylesheet  # noqa isort:skip
  File "/usr/lib/python3.9/site-packages/weasyprint/css/__init__.py", line 27, in <module>
    from . import computed_values, counters, media_queries
  File "/usr/lib/python3.9/site-packages/weasyprint/css/computed_values.py", line 16, in <module>
    from ..text.ffi import ffi, pango, units_to_double
ModuleNotFoundError: No module named 'weasyprint.text'
Error producing PDF.
```

Downgrading to version 52.5 solves the issue.
Comment 1 Guillaume Ayoub 2021-08-07 23:16:32 UTC
This bug is actually fixed by dev-python/pyproject2setuppy-18. Installing >=pyproject2setuppy-18 and reinstalling WeasyPrint fixes the problem.
Comment 2 Hund 2021-08-08 10:48:50 UTC
Thanks! That solved it. :)
Comment 3 Aaron W. Swenson gentoo-dev 2021-08-12 13:15:39 UTC
(In reply to Guillaume Ayoub from comment #1)
> This bug is actually fixed by dev-python/pyproject2setuppy-18. Installing
> >=pyproject2setuppy-18 and reinstalling WeasyPrint fixes the problem.

Thanks for the easy fix!
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-08-12 14:06:22 UTC
I'm going to stabilize v18 now and then bump the dependency straight in eclass.