Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
carderne committed Aug 1, 2024
1 parent a36b6c7 commit 8799dcf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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/')
Expand Down
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 8799dcf

Please sign in to comment.