Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bindings/python/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@ trap cleanup EXIT

rm -rf build dist *.egg-info
python3 setup.py sdist
if ! tar tzf dist/*.tar.gz | grep -q 'genomicsqlite/sqlite_web_dbi\.py$'; then
>&2 echo "The sdist is missing genomicsqlite/sqlite_web_dbi.py; refusing to release."
>&2 echo "That module is a symlink into build/_deps/sqlite_web_vfs-src/, populated by the CMake build."
>&2 echo "This tree was never built, so setuptools dropped the dangling symlink silently."
>&2 echo "Build this tree (or materialize the file from a built tree), rebuild the sdist, and retry."
exit 1
fi
echo -e "\033[0;31;5m -- Pushing $(basename `ls -1 dist/*.tar.gz` .tar.gz) to PyPI! -- \033[0m"
twine upload dist/*.tar.gz
10 changes: 9 additions & 1 deletion test/pkg_smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ cp "$LIB" "$SRC/genomicsqlite/$QDIR/"
# version.py wants git describe (unavailable in the staged copy) or this file
[ -f "$SRC/RELEASE-VERSION" ] || echo "0.0.0" > "$SRC/RELEASE-VERSION"
SITE="$WORK/site"
"$PY" -m pip install --quiet --no-build-isolation --target "$SITE" "$SRC"
# Install the sdist, not the source directory: the tarball is the shipped
# artifact, and building it is the step that can drop package modules.
( cd "$SRC" && "$PY" setup.py sdist --dist-dir "$WORK/dist" )
"$PY" -m pip install --quiet --no-build-isolation --target "$SITE" "$WORK"/dist/*.tar.gz
echo "installed bundled libraries:"; ls "$SITE/genomicsqlite/$QDIR"

cd "$WORK" # neutral cwd: the repo tree must not shadow the installed package
Expand All @@ -40,3 +43,8 @@ OUT="$(env -u LIBGENOMICSQLITE PYTHONPATH="$SITE" PATH="$SHELLDIR:$PATH" \
echo "$OUT"
[ "$OUT" = "CLI:pkg-ok" ] || { echo "CLI smoke output mismatch" >&2; exit 1; }
echo "CLI SMOKE OK"

# Exercise the .dbi helper end-to-end (sqlite_web_dbi.py in the installed package)
env -u LIBGENOMICSQLITE PYTHONPATH="$SITE" "$PY" -m genomicsqlite "$DB" --dbi
[ -f "$DB.dbi" ] || { echo "missing $DB.dbi" >&2; exit 1; }
echo "DBI SMOKE OK"
Loading