Build debian package for SQLCipher4

This commit is contained in:
Miguel Jacq 2025-12-21 12:58:42 +11:00
parent 2f68084bdd
commit d1aa5762bc
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
28 changed files with 285904 additions and 168 deletions

28
scripts/build-extension.py Executable file
View file

@ -0,0 +1,28 @@
from __future__ import annotations
import os
import subprocess
import sys
from pathlib import Path
def main() -> None:
root = Path(__file__).resolve().parents[1]
env = os.environ.copy()
env.setdefault("BOUQUIN_SYSTEM_OPENSSL", "1")
# Build the extension in-place so the .so/.pyd lands under sqlcipher4/
subprocess.check_call([sys.executable, "setup.py", "build_ext", "--inplace"], cwd=root, env=env)
# Sanity check: did we actually produce the native module?
pkg = root / "sqlcipher4"
built = list(pkg.glob("_sqlite3*.so")) + list(pkg.glob("_sqlite3*.pyd"))
if not built:
raise SystemExit("Extension build produced no sqlcipher4/_sqlite3*.so or .pyd. Check setup.py output.")
print("Built:", ", ".join(p.name for p in built))
if __name__ == "__main__":
main()