Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
carderne committed Aug 1, 2024
1 parent e64f2b5 commit c7c6325
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ def quote_argument(arg: str) -> str:

class AmalgationLibSQLCipherBuilder(build_ext):
def build_extension(self, ext): # noqa # type: ignore
sqlcipher_root = Path("sqlcipher")
sqlcipher_header = sqlcipher_root / "sqlite3.h"
sqlcipher_source = sqlcipher_root / "sqlite3.c"
if not sqlcipher_header.exists() or not sqlcipher_source.exists():
sqlcipher_root = "sqlcipher"
sqlcipher_header = os.path.join(sqlcipher_root, "sqlite3.h")
sqlcipher_source = os.path.join(sqlcipher_root, "sqlite3.c")
if not os.path.exists(sqlcipher_header) or not os.path.exists(sqlcipher_source):
raise RuntimeError("SQLCipher amalgamation not found")

ext.include_dirs.append(str(sqlcipher_root))
ext.sources.append(str(sqlcipher_source))
ext.include_dirs.append(sqlcipher_root)
ext.sources.append(sqlcipher_source)

# build with fulltext search enabled
ext.define_macros.append(("SQLITE_ENABLE_FTS3", "1"))
Expand Down

0 comments on commit c7c6325

Please sign in to comment.