Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 May 2016 09:02:40 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Regarding Sigil: bug, request for an added port, or something else?
Message-ID:  <2d8ea215-6d43-4aff-e1b1-9fef6eaf0314@FreeBSD.org>
In-Reply-To: <20160522004208.GB59766@whisperer.chthonixia.net>
References:  <20160522004208.GB59766@whisperer.chthonixia.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--O1uKqunV2csLkmPHT8v39ILS821LeNu0S
Content-Type: multipart/mixed; boundary="3x0M0NiocbDWHEnXIdUesE3LjjC48sEC8"
From: Matthew Seaman <matthew@FreeBSD.org>
To: freebsd-questions@freebsd.org
Message-ID: <2d8ea215-6d43-4aff-e1b1-9fef6eaf0314@FreeBSD.org>
Subject: Re: Regarding Sigil: bug, request for an added port, or something
 else?
References: <20160522004208.GB59766@whisperer.chthonixia.net>
In-Reply-To: <20160522004208.GB59766@whisperer.chthonixia.net>

--3x0M0NiocbDWHEnXIdUesE3LjjC48sEC8
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 22/05/2016 01:42, J. Altman wrote:
> Greetings, listmembers...
>=20
> I need to know what might be the best way to proceed for the following:=

>=20
> When starting Sigil (a port with no maintainer) the following two error=
s
> occur:
>=20
> =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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Embedded Python Error:
>=20
> Traceback (most recent call last):
>=20
> File "/usr/local/share/sigil/python3lib/xmlprocessor.py", line 6, in <m=
odule>
> from sigil_bs4.builder._lxml import LXMLTreeBuilderForXML
> File "/usr/local/share/sigil/plugin_launchers/python/sigil_bs4/builder/=
_lxml.py",
> line 26, in <module> from lxml import etree
>=20
> ImportError: No module named 'lxml'
>=20
> error in xmlprocessor repairXML: -2:
>=20
> Traceback (most recent call last):
> File "/usr/local/share/sigil/python3lib/xmlprocessor.py", line 6,
> in <module> from sigil_bs4.builder._lxml import LXMLTreeBuilderForXML
>=20
> File "/usr/local/share/sigil/plugin_launchers/python/sigil_bs4/builder/=
_lxml.py",
> line 26, in <module> from lxml import etree
>=20
> ImportError: No module named 'lxml'
>=20
> =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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Then Sigil starts; a core is (sometimes) dumped. And not just any
> old core, it seems:
>=20
> du -ch sigil.core=20
> 1.1G	sigil.core
> 1.1G	total
>=20
> When I asked at Mobile Read forums, for Sigil support, it seems that
> Sigil needs lxml for Python 3; where the lxml in the ports tree is
> py27-lxml-3.5.0.
>=20
> Would this be considered a bug, or a ports request? It seems that it's
> a ports request, at this point. I assume that such a request goes to
> ports@, or to the maintainer of py27-lxml-3.5.0?
>=20
> OTOH, I have no idea if lxml for Python 3 is the solution.
>=20
> Thanks for any assitance, and best regards,

Yes, this is a bug in the sigil port.  The problem here seems to be that
sigil has no direct dependency on py-lxml -- it's one of the other
dependencies that brings that in.  sigil itself declares a requirement
for python v3, but those other dependencies won't.  They'll use python
v2.7 by default.  It is generally possible to compile any python port
for python 3.x though.  Unfortunately, what the ports can't do very well
at the moment is generate multiple packages for different versions of
python all from the same port.   This 'variants' support has been mooted
and is coming, but it's nowhere near usability yet.

How are you installing your ports?  If you're using the FreeBSD pkg
repos, then I'm afraid you're out of luck -- everything there is
hardwired to use python v2.7.  If you build your own packages, either by
poudriere or otherwise, then you should be able to switch the default
version of python to v3.4 by adding something like this to make.conf:

DEFAULT_VERSIONS+=3D	python=3D3.4

This should solve the problem you're experiencing, but changing the
default like this does mean reinstalling every python related package.

For users of precompiled packages in the absence of variants support the
ideal solution would be to create a py3-lxml slave port that explicitly
uses python v3.x.

Your best way forwards now is to raise a PR in Bugzilla explaining what
you're seeing.  The maintainer of the sigil port will be automatically
notified.

	Cheers,

	Matthew



--3x0M0NiocbDWHEnXIdUesE3LjjC48sEC8--

--O1uKqunV2csLkmPHT8v39ILS821LeNu0S
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJXQWeoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATRTcP/01l8LEjtIfgKjm+DuLNGKBl
rJUGcMgMSBARxHF/EqZVEz9rD54lzxkhaAYAElv/2CSlLPe9pT0kjgz0a9besOSB
QlfEcMe8c+L89MATMazbZQKm/8lvKSchMGYXfsGj/2XDPJg0k6EAfw7XFzj0XTkX
bGqrPfqy7tMoKZfCXY50itFyjhE+tZcNeUHt5qC3Tn0pVRiDeJxMUKxTudD7Xuy9
mqhN9y5Gb+LRREYIOmtr/TH83a4l5HsAXJXWdghdiVtQ0yDK1Iajc+oChSPOw0+R
EnBzFsckzKcZYzjw2LMaxcXUrjP6uVcss74bSbQPVv0NGP/Wj3aS51+tlGm3D/hP
GhqhXzxh5BXBok9gteSSib3uoJ7UqS0w7w/CDxyyJbrNeX89vZhQCDomnK7ITMiA
3AdhtLubE3rC7dmYM+uaPx4/sMi0vjMxFmQi2DslQgJtWgo3/dBgGpSo6NHztzAP
x0fST13+1dTWuocVFWtfR00lXDlenxol+mTjSBzNz1Xht+uxfPq2+MDDIHu7aUyf
QIXTU+sHr3CZvp7cMH4vIi9WZ3MU/VQcxVRJ0+1ew8raD7kxTFo9EKgZJCFpQMmX
6cmQ9XmskpQ7n8a4Tn/f05PMn2CLPrOLemZXvvpWZodbyYwRoEmQw0DlK8dDVG/G
H7Cwur019uOGlP9saOde
=Y48r
-----END PGP SIGNATURE-----

--O1uKqunV2csLkmPHT8v39ILS821LeNu0S--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2d8ea215-6d43-4aff-e1b1-9fef6eaf0314>