diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2e294b..926f8f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,11 +35,6 @@ jobs: echo "WHEEL_NAME=$(ls *.whl)" >> $GITHUB_ENV echo "SDIST_NAME=$(ls *.tar.gz)" >> $GITHUB_ENV - # - name: test - # run: | - # pip install dist/*.whl pytest - # pytest - - uses: actions/upload-artifact@v4 with: name: ${{ env.WHEEL_NAME }} @@ -52,6 +47,12 @@ jobs: name: ${{ env.SDIST_NAME }} path: "dist/*.tar.gz" + - name: test + run: | + pip install dist/*.whl pytest + pytest + + upload: needs: [build] if: startsWith(github.ref, 'refs/tags/') diff --git a/setup.py b/setup.py index 889c2ff..a35c069 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,15 @@ def quote_argument(arg: str) -> str: class AmalgationLibSQLCipherBuilder(build_ext): def build_extension(self, ext): # noqa # type: ignore + sqlcipher_root = "src/pysqlcipher3/c/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(sqlcipher_root) + ext.sources.append(sqlcipher_source) + # build with fulltext search enabled ext.define_macros.append(("SQLITE_ENABLE_FTS3", "1")) ext.define_macros.append(("SQLITE_ENABLE_RTREE", "1"))