public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Python: enable loadable SQLite extension support
@ 2022-10-28 15:45 Martin Carpenter
  2023-03-09 22:49 ` Marco Atzeri
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Carpenter @ 2022-10-28 15:45 UTC (permalink / raw)
  To: cygwin

Hi,

Can I please request that the Python 3 package be compiled with "
--enable-loadable-sqlite-extensions"?

I'm trying to use a Python 3 app (datasette) to load an SQLite
extension but it fails with:

AttributeError: 'sqlite3.Connection' object has no attribute
'enable_load_extension'

The Python docs say that --enable-loadable-sqlite-extensions should be
passed at build to enable this (new for 3.6) . See:

 * 
https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.enable_load_extension
 * 
https://docs.python.org/3/using/configure.html#cmdoption-enable-loadable-sqlite-extensions


The shipped sqlite3 supports extensions (".load ext.so" works).
Python's sysconfig module shows that Python 3.9.10 on Cygwin does not
have this feature enabled:

>>> import sysconfig
>>> list(filter(lambda x: 'enable' in x,
sysconfig.get_config_vars('CONFIG_ARGS')[0].split(' ')))
["'--enable-shared'", "'--enable-ipv6'"]


For comparison, Python 3.8.10 on Ubuntu 20.04:

>>> list(filter(lambda x: 'enable' in x,
sysconfig.get_config_vars('CONFIG_ARGS')[0].split(' ')))
["'--enable-shared'", "'--enable-ipv6'", "'--enable-loadable-sqlite-
extensions'"]


Equivalent issue from NixOS for reference: 
https://github.com/NixOS/nixpkgs/issues/66526


Thanks,

Martin.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-09 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 15:45 Python: enable loadable SQLite extension support Martin Carpenter
2023-03-09 22:49 ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).