FS#31857 - [calibre] New optional dependecy in 3.0: cssselect

Attached to Project: Arch Linux
Opened by Simon Sapin (SimonSapin) - Tuesday, 09 October 2012, 11:02 GMT
Last edited by Giovanni Scafora (giovanni) - Sunday, 21 October 2012, 08:23 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Giovanni Scafora (giovanni)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

lxml 3.0 was just released.

The lxml.cssselect functionnality that was previously in the same package has moved to a separate PyPI package: cssselect.
cssselect is packaged in the AUR as python-cssselect and python2-cssselect. It should be added as an optional dependency to lxml when 3.0 is packaged.
This task depends upon

Closed by  Giovanni Scafora (giovanni)
Sunday, 21 October 2012, 08:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  Added python2-cssselect as dep
Comment by Simon Sapin (SimonSapin) - Tuesday, 09 October 2012, 11:04 GMT
Also, if the dependency is optional, packages that depend on python{,2}-lxml and use the cssselect functionality should also have a full dependency on python{,2}-cssselect.
Comment by Alexander F. Rødseth (xyproto) - Monday, 15 October 2012, 18:18 GMT
Assigning to maintainers of packages that depends on python2-lxml directly or indirectly, since python2-lxml is an orphan.
Comment by Gaetan Bisson (vesath) - Monday, 15 October 2012, 23:22 GMT
Assigning to Eric: as he has been pushing python-lxml to [testing] he should understand this much better than us.
Comment by Gaetan Bisson (vesath) - Monday, 15 October 2012, 23:25 GMT
Simon, I think the bottom line is: does any of the packages currently in our repos rely on lxml.cssselector? If not, we can leave it in the AUR for now.
Comment by Eric Belanger (Snowman) - Tuesday, 16 October 2012, 00:37 GMT
I don't understand it more than you. I pushed it in staging because of the python rebuild and it's an orphan. None of my packages requires it.
Comment by Gaetan Bisson (vesath) - Tuesday, 16 October 2012, 01:43 GMT
So a quick grep through our repos reveals that calibre is the only application that uses the wrapper around cssselect that python2-lxml provide (and no application for python-lxml). Although I do no know calibre, its parts relying on cssselect look optional to me. So I'll assing this bug to its maintainer and let him decide what to do.

Of course, feel free to let me know if I missed something and this cssselect business affects other packages.
Comment by Gaetan Bisson (vesath) - Tuesday, 16 October 2012, 01:44 GMT
(Just a note for the original reporter in case that wasn't obvious from the beginning: we do not do optional dependencies from the official repos to the AUR.)
Comment by Simon Sapin (SimonSapin) - Tuesday, 16 October 2012, 06:31 GMT
I don’t know if cssselect is needed in the official repos. I’m just pointing out that, if it is, there is already something in the AUR that can help with packaging. I understand that official packages can not depend on something in the AUR.
Comment by Doug Newgard (Scimmia) - Thursday, 18 October 2012, 00:58 GMT
Even with the cssselect package from the AUR, Calibre still doesn't work right with lxml 3.0. I filed a bug here: https://bugs.launchpad.net/calibre/+bug/1067942
Comment by Allan McRae (Allan) - Thursday, 18 October 2012, 05:42 GMT
Comment from  FS#32051 :

I've got a fix. python2-cssselect needs to be installed from the AUR, and this line needs to be added along with the other sed lines in the PKGBUILD:

sed -i -e "s:lxml.cssselect\ import\ css_to_xpath:cssselect\ import\ GenericTranslator:g" src/calibre/ebooks/oeb/stylizer.py

I know it's not a good fix since it depends on package from the AUR, but that's where the functionality is that used to be in lxml.
Comment by Doug Newgard (Scimmia) - Thursday, 18 October 2012, 05:47 GMT
Just to be clear, the fix I posted is updating the broken calibre script to work directly with cssselect, bypassing the lxml wrapper. It doesn't change the python2-lxml dependency on the AUR package, so it doesn't fix the bug in this report, but the one that was closed.

Calibre still needs lxml, including lxml.cssselect, for other things, so it doesn't remove that dependency completely.
Comment by Andrea Scarpino (BaSh) - Friday, 19 October 2012, 08:54 GMT
python-lxml 3.0-2 has python-cssselect has optional dependence.
Comment by Doug Newgard (Scimmia) - Friday, 19 October 2012, 09:08 GMT
OK, so python2-cssselect has been moved to extra and Calibre 0.9.3 fixed the broken script. Looks like Calibre just needs python2-cssselect as a dependency and we're all set. I would suggest a regular dependency instead of an opt for that one since it's necessary for format conversion, which is a pretty big part of Calibre.

Loading...