Just out of curiosity, how do you decide when to vendor a third party library? Bundling a library removes the need for support code, and it gives CPython total control over how to build the third party library. I don’t know if the pros outweigh the cons though.
The reason I ask, is because for the
sqlite3 module, there’s no straight forward way to detect how the SQLite library was built at compile time1. There’s no define that tells me if SQLite was built with R*Tree support, or if it was built without double-quote literal support. For instance, if a user built their SQLite library with
SQLITE_OMIT_AUTOINIT defined, Python would segfault at
sqlite3.connect(...), and there’s no way for the
sqlite3 module to detect if the SQLite library was built with that option. Bundling SQLite would make a lot of things easier.
1) You can run
sqlite3 ":memory:" "pragma compile_options" to fetch compile options