Skip to content

feat: ship the sqlquack command with pip install sqlquack - #95

Closed
kvlonge wants to merge 4 commits into
mainfrom
feat/pip-console-command
Closed

kvlonge wants to merge 4 commits into
mainfrom
feat/pip-console-command

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Why

The site says pip install sqlquack, then sqlquack check and sqlquack convert --builtin-policy. The sqlquack wheel has only the Python module, with no command, and nothing in the repository builds or publishes distributions.

Changes

  • New sqlquack-cli distribution (crates/sqlquack/pyproject.toml, maturin bindings = "bin"): it ships the native sqlquack executable, following SQLBuild's sqlbuild/sqlbuild-cli split. sqlquack depends on sqlquack-cli at the same version, so one pip install gives both the module and the command.
  • A bundled feature chain (sqlquack-duckdb → sqlquack → sqlquack-python) compiles DuckDB into both wheels, so they need no system DuckDB. Both wheels ship LICENSE and THIRD_PARTY_NOTICES, which now include DuckDB's MIT notice. make distribution-notices, part of check-ci, keeps the copies equal.
  • Workflows adapted from SQLBuild:
    • build-distributions.yml: wheels for Linux x86_64/aarch64, macOS x86_64/arm64 and Windows x86_64, plus sdists. Each wheel is smoke tested in a fresh venv with the site's quick-start commands.
    • distributions.yml: runs that build on pull requests that touch packaging.
    • release-distributions.yml, publish.yml (trusted publishing, pypi environment, v0* tags only) and release-please.yml.
  • Release Please does nothing until the repository variable SQLQUACK_RELEASES is enabled, so no release pull request, tag or upload can happen before launch.

Verification

  • Local Linux x86_64 wheels: installed into a fresh venv from the built wheels only (--no-index), then ran sqlquack --version, the QUALIFY check (SQ0203, exit 1) and convert --builtin-policy. The binary has no libduckdb dependency.
  • The Distributions workflow on this PR builds and smoke tests all five platforms.
  • make check-ci passes, and the hygiene scan is clean.

pip install sqlquack installed only the Python module. A new
sqlquack-cli distribution ships the native sqlquack executable, as
sqlbuild-cli does for sqlbuild, and sqlquack depends on it at the same
version. Both wheels compile DuckDB in, so they need no system DuckDB,
and carry the licence and third-party notices, now including DuckDB's.

Build, release and publish workflows follow SQLBuild's: wheels for
Linux, macOS and Windows smoke tested with the site's quick start, and
trusted publishing to PyPI. Release Please stays idle until the
SQLQUACK_RELEASES repository variable is enabled at launch.
libduckdb-sys links the archive that calls duckdb_register_static_extensions
after libduckdb, which defines it. GNU ld does not look back, so the bundled
sqlquack binary failed to link on linux-aarch64. Both bundled targets now mark
the loader undefined up front on Linux.

kvlonge commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #157, rebuilt on current main.

@kvlonge kvlonge closed this Nov 8, 2026
@kvlonge
kvlonge deleted the feat/pip-console-command branch November 9, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant