mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
* feat: detect psycopg[binary] and skip apt packages When using psycopg2-binary or psycopg[binary], the PostgreSQL client libraries (libpq-dev, libpq5) are not needed because these variants ship with pre-compiled binaries. This change: - Adds usesBinaryPsycopg() to detect binary variants - Updates usesPostgres() to return false when binary variants are used - Skips libpq-dev (build) and libpq5 (runtime) apt package installation - Adds comprehensive unit tests for binary psycopg detection This reduces image size and build time for projects using binary variants. * test: add psycopg[binary] integration test Adds a dedicated test example for psycopg[binary] to verify that the bracket syntax for optional dependencies is correctly detected. This ensures the binary detection works for both psycopg2-binary and psycopg[binary] variants. Test coverage now includes: - psycopg2-binary (existing python-system-deps example) - psycopg[binary] (new python-psycopg-binary example) - psycopg non-binary (existing python-latest-psycopg example) - psycopg2 non-binary (existing python-django example) * test: snapshot update * test: add binary pyscogp test * test: ensure libpq is installed for pyscog operation * build: add helper for running the current dir tests * test: check to make sure the libpg library is not installed when a binary postgres connection is requested * test: update snapshot --------- Co-authored-by: Hanzo Dev <[email protected]>
13 lines
302 B
YAML
13 lines
302 B
YAML
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_DB: test_db
|
|
POSTGRES_USER: test_user
|
|
POSTGRES_PASSWORD: test_password
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U test_user -d test_db"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|