Skip to content

Commit a3546eb

Browse files
committed
Add minimum files for Python build
1 parent a2dd24f commit a3546eb

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

bindings/python/pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "sqlite-vec"
7+
version = "0.1.7a2"
8+
description = "A vector search SQLite extension."
9+
readme = "README.md"
10+
requires-python = ">=3.12"
11+
dependencies = [
12+
"numpy"
13+
]

bindings/python/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
numpy >= 2.3.0
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from os import path
2+
import sqlite3
3+
4+
def loadable_path():
5+
""" Returns the full path to the sqlite-vec loadable SQLite extension bundled with this package """
6+
7+
loadable_path = path.join(path.dirname(__file__), "vec0")
8+
return path.normpath(loadable_path)
9+
10+
def load(conn: sqlite3.Connection) -> None:
11+
""" Load the sqlite-vec SQLite extension into the given database connection. """
12+
13+
conn.load_extension(loadable_path())
14+
15+
from .extra_init import *
File renamed without changes.

0 commit comments

Comments
 (0)