Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Feb 2023 07:14:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 269325] textproc/py-pyphen: 0.3.0 does not work print/py-weasyprint 51
Message-ID:  <bug-269325-7788-HDptoLCg2i@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-269325-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-269325-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269325

Graham Perrin <grahamperrin@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|print/py-weasyprint: fails  |textproc/py-pyphen: 0.3.0
                   |to work, fails to find      |does not work
                   |pyphen even if installed    |print/py-weasyprint 51
             Status|New                         |Open
                URL|                            |https://www.freshports.org/
                   |                            |textproc/py-pyphen/
           Severity|Affects Only Me             |Affects Some People
                 CC|                            |grahamperrin@freebsd.org
           Assignee|ports-bugs@FreeBSD.org      |yuri@freebsd.org

--- Comment #1 from Graham Perrin <grahamperrin@freebsd.org> ---
Workaround and reproduction
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D

After installing the port of WeasyPrint:=20

pip install weasyprint

=E2=80=93 pip installs a slightly superior version of Pyphen, which does wo=
rk with the
port of WeasyPrint.=20

Then:=20

pip uninstall Pyphen

=E2=80=93 leaves the port of Pyphen not working with the port of WeasyPrint=
.=20

----

% pip install weasyprint
Defaulting to user installation because normal site-packages is not writeab=
le
Requirement already satisfied: weasyprint in
/usr/local/lib/python3.9/site-packages (51)
Requirement already satisfied: setuptools>=3D39.2.0 in
./.local/lib/python3.9/site-packages (from weasyprint) (67.1.0)
Requirement already satisfied: cffi>=3D0.6 in
./.local/lib/python3.9/site-packages (from weasyprint) (1.15.1)
Requirement already satisfied: html5lib>=3D0.999999999 in
./.local/lib/python3.9/site-packages (from weasyprint) (1.1)
Requirement already satisfied: cairocffi>=3D0.9.0 in
/usr/local/lib/python3.9/site-packages (from weasyprint) (1.4.0)
Requirement already satisfied: tinycss2>=3D1.0.0 in
/usr/local/lib/python3.9/site-packages (from weasyprint) (1.2.1)
Requirement already satisfied: cssselect2>=3D0.1 in
/usr/local/lib/python3.9/site-packages (from weasyprint) (0.7.0)
Requirement already satisfied: CairoSVG>=3D2.4.0 in
/usr/local/lib/python3.9/site-packages (from weasyprint) (2.6.0)
Collecting Pyphen>=3D0.9.1
  Downloading pyphen-0.13.2-py3-none-any.whl (2.0 MB)
     =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=
=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=
=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=
=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=
=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81 2.0/2.0 =
MB 785.0 kB/s eta 0:00:00
Requirement already satisfied: defusedxml in
/usr/local/lib/python3.9/site-packages (from CairoSVG>=3D2.4.0->weasyprint)
(0.7.1)
Requirement already satisfied: pillow in ./.local/lib/python3.9/site-packag=
es
(from CairoSVG>=3D2.4.0->weasyprint) (9.4.0)
Requirement already satisfied: pycparser in
/usr/local/lib/python3.9/site-packages (from cffi>=3D0.6->weasyprint) (2.21)
Requirement already satisfied: webencodings in
/usr/local/lib/python3.9/site-packages (from cssselect2>=3D0.1->weasyprint)
(0.5.1)
Requirement already satisfied: six>=3D1.9 in
/usr/local/lib/python3.9/site-packages (from html5lib>=3D0.999999999->weasy=
print)
(1.16.0)
Installing collected packages: Pyphen
Successfully installed Pyphen-0.13.2
% man weasyprint
No manual entry for weasyprint
% weasyprint
usage: weasyprint [-h] [--version] [-i] [-e ENCODING] [-f {pdf,png}] [-s
STYLESHEET] [-m MEDIA_TYPE] [-r RESOLUTION] [-u BASE_URL] [-a ATTACHMENT] [=
-p]
[-v] [-d] [-q] input output
weasyprint: error: the following arguments are required: input, output
% which weasyprint
/usr/local/bin/weasyprint
% pkg provides /usr/local/bin/weasyprint
Name    : py39-weasyprint-51
Comment : Converts HTML/CSS documents to PDF
Repo    : FreeBSD
Filename: usr/local/bin/weasyprint
% weasyprint --version
WeasyPrint version 51
% pip uninstall Pyphen
Found existing installation: pyphen 0.13.2
Uninstalling pyphen-0.13.2:
  Would remove:
=20=20=20
/usr/home/grahamperrin/.local/lib/python3.9/site-packages/pyphen-0.13.2.dis=
t-info/*
    /usr/home/grahamperrin/.local/lib/python3.9/site-packages/pyphen/*
Proceed (Y/n)? Y
  Successfully uninstalled pyphen-0.13.2
% weasyprint --version
Traceback (most recent call last):
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 617, in _build_master
    ws.require(__requires__)
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 956, in require
    needed =3D self.resolve(parse_requirements(requirements))
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 815, in resolve
    dist =3D self._resolve_dist(
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 861, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pyphen 0.0.0
(/usr/local/lib/python3.9/site-packages), Requirement.parse('Pyphen>=3D0.9.=
1'),
{'WeasyPrint'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/weasyprint", line 33, in <module>
    sys.exit(load_entry_point('WeasyPrint=3D=3D51', 'console_scripts',
'weasyprint')())
  File "/usr/local/bin/weasyprint", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 86, in load
    module =3D import_module(match.group('module'))
  File "/usr/local/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_remo=
ved
  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_remo=
ved
  File "/usr/local/lib/python3.9/site-packages/weasyprint/__init__.py", line
440, in <module>
    from .css import preprocess_stylesheet  # noqa isort:skip
  File "/usr/local/lib/python3.9/site-packages/weasyprint/css/__init__.py",
line 30, in <module>
    from . import computed_values, media_queries
  File
"/usr/local/lib/python3.9/site-packages/weasyprint/css/computed_values.py",
line 18, in <module>
    from .. import text
  File "/usr/local/lib/python3.9/site-packages/weasyprint/text.py", line 16=
, in
<module>
    import pyphen
  File "/usr/local/lib/python3.9/site-packages/pyphen/__init__.py", line 25=
, in
<module>
    from pkg_resources import resource_filename
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 3249, in <module>
    def _initialize_master_working_set():
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 3223, in _call_aside
    f(*args, **kwargs)
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 3261, in _initialize_master_working_set
    working_set =3D WorkingSet._build_master()
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 619, in _build_master
    return cls._build_from_requirements(__requires__)
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 632, in _build_from_requirements
    dists =3D ws.resolve(reqs, Environment())
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 815, in resolve
    dist =3D self._resolve_dist(
  File
"/home/grahamperrin/.local/lib/python3.9/site-packages/pkg_resources/__init=
__.py",
line 856, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Pyphen>=3D0.9.1' distribution was =
not
found and is required by WeasyPrint
% pkg info -x pyphen
py39-pyphen-0.13.0
%

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269325-7788-HDptoLCg2i>