-
-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of lxml dependency #440
Comments
Unfortunately, that's not true. WeasyPrint uses lxml because it supports XPath for CSS selectors coming from cssselect, and there's nothing in the standard library that supports XPath correctly. lxml has also lots of wheels that should avoid compilation on many platforms. But yes, avoiding lxml is a good idea. @SimonSapin had started cssselect2 to make CSS selectors work without XPath, but it's dead today. |
Yes, I see, that does complicate things :( I guess usage of |
|
use optional html5lib instead. because lxml dependency will limit your user base. |
@faststare, see @liZe’s message above:
So moving away from lxml first requires moving away from XPath. Which we want to do anyway, but it’ll take more work than "just switch to html5lib". |
If possible, I think it'd be great to get rid of the dependency on
lxml
. I've found it to be quite annoying to install; on Linux it takes a minute to compile, on Mac OS X the first time it'll take like an hour to compile (due to having tobrew install gcc
as well), and on Windows one by default doesn't have a compiler at hand - leaving you to install a pre-compiled version oflxml
, but apparently not every version has pre-compiled DLLs in place..By replacing
lxml
by stdlibxml
some of this pain (imo) goes away. Of course will need some simple unittests to ensure compatibility remains, but other than that.. :)The text was updated successfully, but these errors were encountered: