indygreg / python-build-standalone

Produce redistributable builds of Python
BSD 3-Clause "New" or "Revised" License
1.71k stars 107 forks source link

sqlite config options #128

Closed lromor closed 2 years ago

lromor commented 2 years ago

Hi, awesome project! I'm having an issue with loading sqlite3 extensions, I guess your builds are not including:

--enable-loadable-sqlite-extensions

Debian python is usually shipped with those extensions enabled. What's your take on that?

indygreg commented 2 years ago

The simple reason this feature isn't enabled is because it isn't enabled by default in SQLite's configure.

I see no reason we can't enable this.

The only hiccup I can see is on musl. If this feature relies on loading shared libraries, it won't work with statically linked binaries since you can't dlopen() from a static binary.

Feel free to submit a PR to add the configure flag. If someone else doesn't, I'll likely do this the next time I sit down to hack on the project. Adding a test to https://github.com/indygreg/python-build-standalone/blob/908d502f0ab68daff2764075f7520ab9f0f2977e/src/verify_distribution.py#L110 would also be desirable.

indygreg commented 2 years ago

It looks like this project is currently passing -DSQLITE_OMIT_LOAD_EXTENSION=1 to the build of the _sqlite3 extension module. Unsure why but that code has existed since the initial commit in the repo. We should be able to delete it.

indygreg commented 2 years ago

I forgot to mention it in the commit message, but this should be fixed as of 3134fb00c72ead698ff3505cde9ace40451e8dfe.

indygreg commented 2 years ago

This is now in the 20220528 release I published a few days ago.