-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (131 loc) · 4.66 KB
/
pyproject.toml
File metadata and controls
151 lines (131 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools-rust>=1.7"]
build-backend = "setuptools.build_meta"
[project]
name = "sochdb"
version = "0.5.5"
description = "SochDB is an AI-native database with token-optimized output, O(|path|) lookups, built-in vector search, and durable transactions."
readme = "README.md"
license = {text = "Apache-2.0"}
authors = [
{name = "Sushanth Reddy Vanagala", email = "sushanth@sochdb.dev"}
]
maintainers = [
{name = "Sushanth", email = "sushanth@sochdb.dev"}
]
keywords = ["database", "llm", "ai", "vector-search", "embedded", "key-value", "sochdb", "context-retrieval", "transactions"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Rust",
"Topic :: Database",
"Topic :: Database :: Database Engines/Servers",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
]
requires-python = ">=3.9"
dependencies = [
"numpy>=1.20",
"grpcio>=1.50.0",
"grpcio-tools>=1.50.0",
"protobuf>=4.0.0",
]
[project.optional-dependencies]
analytics = [
"posthog>=3.0.0",
]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"faker>=18.0",
]
all = [
"posthog>=3.0.0",
]
[project.urls]
Homepage = "https://sochdb.dev"
Repository = "https://github.com/sochdb/sochdb-python-sdk"
Documentation = "https://sochdb.dev"
"Bug Tracker" = "https://github.com/sochdb/sochdb-python-sdk/issues"
[project.scripts]
# CLI tools accessible from anywhere after pip install
sochdb-server = "sochdb.cli_server:main"
sochdb-bulk = "sochdb.cli_bulk:main"
sochdb-grpc-server = "sochdb.cli_grpc:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
# Include bundled native libraries for each platform
sochdb = [
# Shared libraries (FFI) - platform-specific directories
"lib/*/*.so",
"lib/*/*.dylib",
"lib/*/*.dll",
# Root lib directory (fallback)
"lib/*.so",
"lib/*.dylib",
"lib/*.dll",
# Bundled CLI binaries (bulk operations)
"_bin/**/sochdb-bulk",
"_bin/**/sochdb-bulk.exe",
"_bin/**/*",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
# =============================================================================
# cibuildwheel Configuration (uv-style binary-in-wheel)
# =============================================================================
#
# Platform Matrix (minimal viable set):
# - Linux: manylinux_2_17_x86_64, manylinux_2_17_aarch64
# - macOS: macosx_11_0_universal2 (or separate x86_64 + arm64)
# - Windows: win_amd64
#
# Key insight: wheels are py3-none-<platform> since we bundle a Rust binary,
# not a CPython extension. This avoids rebuilding for every Python minor.
# =============================================================================
[tool.cibuildwheel]
# Build for Python 3.9+ only (matches requires-python)
build = "cp39-* cp310-* cp311-* cp312-* cp313-*"
# Skip 32-bit builds, PyPy, and musllinux (for now)
skip = "*-win32 *-manylinux_i686 pp* *-musllinux*"
# Before building wheel, compile the Rust binary
before-build = "bash {project}/scripts/build_rust_binary.sh"
# Test the wheel after building
test-command = "python -c \"from sochdb.bulk import get_sochdb_bulk_path; print(get_sochdb_bulk_path())\""
[tool.cibuildwheel.linux]
# Use manylinux_2_17 for broad glibc compatibility (glibc >= 2.17)
# This matches what uv uses for maximum compatibility
manylinux-x86_64-image = "manylinux_2_17"
manylinux-aarch64-image = "manylinux_2_17"
# Install Rust toolchain inside the manylinux container
before-all = """
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
"""
# Environment for Rust builds
environment = { PATH = "$HOME/.cargo/bin:$PATH" }
[tool.cibuildwheel.macos]
# Build universal2 (x86_64 + arm64 in one binary)
archs = ["universal2"]
# macOS 11.0 minimum for universal2 support
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
# Install both Rust targets for universal2
before-all = """
rustup target add x86_64-apple-darwin aarch64-apple-darwin
"""
[tool.cibuildwheel.windows]
# Windows x64 only (ARM64 later if needed)
archs = ["AMD64"]
# Rust should be pre-installed on GitHub Actions Windows runners