Regarding Sigil: bug, request for an added port, or something else?

Matthew Seaman matthew at FreeBSD.org
Sun May 22 08:02:58 UTC 2016


On 22/05/2016 01:42, J. Altman wrote:
> Greetings, listmembers...
> 
> I need to know what might be the best way to proceed for the following:
> 
> When starting Sigil (a port with no maintainer) the following two errors
> occur:
> 
> =================================================================
> 
> Embedded Python Error:
> 
> Traceback (most recent call last):
> 
> File "/usr/local/share/sigil/python3lib/xmlprocessor.py", line 6, in <module>
> 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
> 
> ImportError: No module named 'lxml'
> 
> error in xmlprocessor repairXML: -2:
> 
> Traceback (most recent call last):
> File "/usr/local/share/sigil/python3lib/xmlprocessor.py", line 6,
> in <module> 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
> 
> ImportError: No module named 'lxml'
> 
> ===============================================================
> 
> Then Sigil starts; a core is (sometimes) dumped. And not just any
> old core, it seems:
> 
> du -ch sigil.core 
> 1.1G	sigil.core
> 1.1G	total
> 
> 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.
> 
> 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?
> 
> OTOH, I have no idea if lxml for Python 3 is the solution.
> 
> 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+=	python=3.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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20160522/331c4385/attachment.sig>


More information about the freebsd-questions mailing list