I am really saddened looking through issue trackers and finding how many people have done things like `pip install` to get Calibre dependencies, then been sad when nothing works. The fact that it's so far from standard build tooling has consequences, even if it's an understandable part of being a long-running project with a history.
Conversation
Notices
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 19:53:53 JST
Cassandra has had an adventure
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 19:53:51 JST
Cassandra has had an adventure
I don't want to be too mean about this... Calibre is almost half a million lines of code, and has been around longer than Python 3 has. But also? I'm trying to point out that a large part of how we archive and read electronic books without fear of retroactive censorship is load-bearing on those five hundred thousand lines.
That is not sustainable, and not something that ever should have been placed on one person's shoulders.
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 19:53:52 JST
Cassandra has had an adventure
The root cause for many of those errors is that Calibre depends on another of Kovid's packages, html5-parser, which in turn relies on lxml in a very odd way. In particular, it's only compatible with lxml if it's installed using `pip install --no-binary lxml` rather than from pyproject.toml.
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 19:53:52 JST
Cassandra has had an adventure
That in turn seems, according to html5-parser documentation (not yet taken the time to confirm this myself), to cause *both* lxml and html5-parser to dynamically link libxml2 so that they can share the same C-level data structures.
Effectively, html5-parser seems to rely on internal implementation details of lxml in ways that completely break Python packaging. I get it gives a performance advantage, but at a steep cost.
GreenSkyOverMe (Monika) repeated this. -
Embed this notice
✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Sunday, 07-Dec-2025 20:21:59 JST
✧✦Catherine✦✧
@xgranade it has HOW MUCH code?
-
Embed this notice
✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Sunday, 07-Dec-2025 20:25:02 JST
✧✦Catherine✦✧
@xgranade this is 1/6th of Clang
what is it even _doing_
-
Embed this notice
✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Sunday, 07-Dec-2025 20:38:05 JST
✧✦Catherine✦✧
@xgranade this is bonkers
what the fuck is rapydscript and why is there 26k lines of it
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 20:38:13 JST
Cassandra has had an adventure
@whitequark (Not for nothing, but html5ever is currently maintained, a Servo project, written in a language understandable by humans, *and* is half what html5-parser comes in at, being only 20k SLoC.)
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 20:38:15 JST
Cassandra has had an adventure
@whitequark Also, that excludes the HTML5 parsing library (that itself depends on a Google library that was deprecated in *2016*), and the Calibre-specific cross-platform build tooling, coming in at 38k and 10k, respectively.
All told, 500k was a very conservative underestimate on my part.
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 20:38:18 JST
Cassandra has had an adventure
@whitequark There's another 11k just in the build scripts.
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 20:38:20 JST
Cassandra has had an adventure
-
Embed this notice
✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Sunday, 07-Dec-2025 20:49:08 JST
✧✦Catherine✦✧
@xgranade im gonna need a drink
-
Embed this notice
Cassandra has had an adventure (xgranade@wandering.shop)'s status on Sunday, 07-Dec-2025 20:49:09 JST
Cassandra has had an adventure
@whitequark Uh. I don't think either of us will like the answer.
-
Embed this notice
a kilo of saucepans (rakslice) (rakslice@mastodon.social)'s status on Sunday, 07-Dec-2025 20:54:57 JST
a kilo of saucepans (rakslice)
@whitequark @xgranade since this is the proverbial "itunes of ebooks", should I ask a cursed question
-
Embed this notice