forked from phiresky/sqlite-zstd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mimoja <[email protected]>
- Loading branch information
Showing
3 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,21 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
cibw_arch: ["x86_64", "aarch64"] | ||
cibw_arch: ["x86_64"] | ||
env: | ||
CIBW_BEFORE_ALL_LINUX: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y" | ||
CIBW_BUILD_VERBOSITY: "1" | ||
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: 'true' | ||
fetch-depth: '0' | ||
|
||
- name: "Install setuptools" | ||
shell: bash | ||
run: python3 -m pip install --upgrade setuptools>=61.2 setuptools_scm>=6.2 | ||
|
||
- name: Set up QEMU | ||
if: matrix.os == 'ubuntu-latest' && matrix.cibw_arch == 'aarch64' | ||
|
@@ -60,7 +67,7 @@ jobs: | |
|
||
- name: Build sdist | ||
run: | | ||
python -m pip install setuptools-rust setuptools wheel | ||
python -m pip install setuptools-rust setuptools setuptools_scm wheel | ||
cd python/ | ||
python setup.py sdist | ||
|
@@ -76,7 +83,7 @@ jobs: | |
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: python/dist/ | ||
path: python/dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
import sqlite3 | ||
from importlib.resources import files, as_file | ||
from setuptools_scm import get_version | ||
|
||
real_version = get_version(root="..") | ||
pretend_version = get_version(root="..", local_scheme="no-local-version") | ||
if pretend_version != real_version: | ||
__version__ = pretend_version | ||
else: | ||
__version__ = real_version | ||
|
||
|
||
def load(conn: sqlite3.Connection) -> None: | ||
lib = next(x for x in files(__name__).iterdir() if x.name.startswith('lib')) | ||
lib = next(x for x in files(__name__).iterdir() if x.name.startswith("lib")) | ||
with as_file(lib) as ext: | ||
conn.load_extension(str(ext)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters