Use python-bundled sqlite3 library instead of py-sqlite3#26
Conversation
|
Might need a bit of testing on your machine. Hatch is making things a bit funny here, but it should work. |
markjdb
left a comment
There was a problem hiding this comment.
AFAICS the python shipped with FreeBSD doesn't have sqlite3 bundled. I see _sqlite3 in the DISABLED_EXTENSIONS list in the port makefiles, and:
markj@xinde> python
Python 3.11.15 (main, Apr 7 2026, 01:08:37) [Clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd7080 on freebsd16
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.11/sqlite3/__init__.py", line 57, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.11/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
One can install py-sqlite3 to get the "builtin" module, but the intent was to try and minimize system dependencies. So, if we do this we should update the README to list required packages.
|
py-sqlite3 still needs the system dependency to build successfully, since it's building from source using I think this still adheres to the "lower dependencies" goal. Most non-freebsd distributions will include it in their python packages, since there usually isn't a choice in customization like there is in the Ports collection. And on FreeBSD, we will still need to install something (databases/py-sqlite3 port vs pysqlite3 with built-from-source components in PyPI). |
Ok, then do you mind updating the README as well? |
|
The alternative approach I took in #27 was to document the need for installing |
|
I took @ngie-eign's commit, thanks. |
No description provided.