If you check the bug reports, you'll see that I posted a sed statement to add to the PKGBUILD that does exactly that. This fixes the bug in Calibre itself, but still relies on a package from the AUR, which is a bug in itself.
]]>from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
to:
from cssselect import GenericTranslator
Patch is short so I'm posting it here:
--- stylizer.py 2012-10-18 23:27:41.205984029 +0200
+++ stylizer.py.patched 2012-10-18 23:27:07.442641381 +0200
@@ -20,7 +20,8 @@
from cssutils import (profile as cssprofiles, parseString, parseStyle, log as
cssutils_log, CSSParser, profiles, replaceUrls)
from lxml import etree
-from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
+#from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
+from cssselect import GenericTranslator
from calibre import force_unicode
from calibre.ebooks import unit_convert
from calibre.ebooks.oeb.base import XHTML, XHTML_NS, CSS_MIME, OEB_STYLES
File "/usr/lib/calibre/calibre/ebooks/oeb/stylizer.py", line 23, in <module>
from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
ImportError: cannot import name css_to_xpath
File "/usr/lib/python2.7/site-packages/lxml/cssselect.py", line 18, in <module>
raise ImportError('cssselect seems not to be installed.