fix: default bridge and tests to project venv Python

Use .venv/bin/python3 by default, with PYTHON_PATH as an override, and update the setup script and docs to match the new virtualenv-based workflow.
This commit is contained in:
2026-05-10 00:00:56 +02:00
parent 0d25e52ebc
commit 4cb568c326
5 changed files with 28 additions and 65 deletions
+3 -3
View File
@@ -26,7 +26,8 @@ const FIXTURE_PATH = "tests/fixtures/data.kdbx";
const FIXTURE_DATA_PATH = "tests/fixtures/data.kdbx.json";
async function ensurePyKeePass(): Promise<boolean> {
const child = Bun.spawn(["python3", "-c", "import pykeepass; print('ok')"], {
const python = process.env.PYTHON_PATH ?? ".venv/bin/python3";
const child = Bun.spawn([python, "-c", "import pykeepass; print('ok')"], {
stdout: "pipe",
stderr: "pipe",
});
@@ -95,7 +96,7 @@ test("lists the groups from the bundled data fixture", async () => {
}
const db = openKeePassDatabase(FIXTURE_PATH, { password });
const groups = await db.listGroups();
const groups = await db.listGroups();
expect(groups).toEqual([
{ name: "Racine", path: "" },
{ name: "Folder1", path: "Folder1" },
@@ -145,4 +146,3 @@ test("uses the JSON fixture content as the source of truth for expectations", as
"\t\t- f2-item1",
]);
});