Skip to main content

buildguard

Catch upstream Python dependency breakage before it surprises your CI build.

buildguard is a deterministic CLI that creates a clean virtual environment, attempts to install your pinned dependency set, and fails early when upstream package ecosystem drift breaks installation.

It is intended as a preflight install check for CI.

Licensing:

  • free for personal and other non-commercial use
  • paid commercial license required for business, client, or other commercial use
  • no activation, unlock flow, or license-file check in the CLI

Common upstream drift this catches includes:

  • versions disappearing
  • wheels removed from package indexes
  • build backend behavior changes
  • dependency resolution breakage
  • incompatible metadata changes
  • missing distributions for a Python version or platform

buildguard is not:

  • a vulnerability scanner
  • a dependency resolver
  • a lockfile manager
  • a license scanner

Quick Start

buildguard check requirements.txt
buildguard check requirements.txt --json

Installation

Install from the repository root:

python3 -m pip install .

CI Example

GitHub Actions:

name: Buildguard Preflight

on:
  push:
  pull_request:

jobs:
  buildguard:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - run: python -m pip install .

      - run: buildguard check requirements.txt

Legacy Interpreter Notes

If you are validating against an older Python interpreter (for example --python python3.6), use --no-upgrade-tools. This skips pip/setuptools/wheel upgrades inside the temporary venv and is often more stable for legacy interpreter tests.

If the pip wrapper binary is broken on your machine for that interpreter, use --python-m-pip so buildguard runs pip as python -m pip inside the temporary venv.

When needed, you can pin build tool versions during the upgrade step:

  • --pip-version <version>
  • --setuptools-version <version>
  • --wheel-version <version>

These options require tool upgrades to be enabled (do not combine with --no-upgrade-tools).

Development

Editable install:

python3 -m pip install -e . --no-build-isolation

Optional local venv setup:

bash scripts/setup_local_venv.sh

Smoke tests:

python scripts/smoke_test_check_success.py
python scripts/smoke_test_check_failure.py
python scripts/smoke_test_missing_distribution.py

Publishing

PyPI publishing is handled by the GitHub Actions workflow at publish-pypi.yml.

Example Output

Success:

buildguard check: requirements.txt
python: python3.11
venv: /tmp/buildguard-abc123

PASS

requirements installed successfully in a clean environment

summary:
elapsed_seconds=18.4
pip_exit_code=0

Failure:

buildguard check: requirements.txt
python: python3.11
venv: /tmp/buildguard-abc123

FAIL

pip install -r requirements.txt exited with code 1

likely failing dependency:
uvloop==0.17.0

pip error summary:
Failed building wheel for uvloop
error: subprocess-exited-with-error

summary:
elapsed_seconds=22.7
pip_exit_code=1

Exit Codes

  • 0: success
  • 1: install failure
  • 2: fatal tool/runtime/config error

Why This Exists

Upstream dependency ecosystem changes can break installs unexpectedly and waste CI time. buildguard makes dependency installation a deliberate, fail-fast preflight step.

Support Scope

buildguard v1 is intentionally small and practical. It focuses on deterministic preflight install checks for one requirements file.

License

See LICENSE.txt for the free personal-use terms and COMMERCIAL_LICENSE.md for the commercial licensing model.

Release files for buildguard 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for buildguard 0.1.0
File Size Uploaded
buildguard-0.1.0.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for buildguard 0.1.0
File Interpreter ABI Platform
buildguard-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / buildguard-0.1.0.tar.gz

Download URL buildguard-0.1.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5030c751f9c0d2fd012f2f513ff88c8a7f8b675b96b3c035a8d94ff7adf6c3b4
BLAKE2b-256 checksum
How to use checksums
863447823d3034d29b6723c632f3d7a95ff3c4a64bd78f56795bbae0229d0040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / buildguard-0.1.0-py3-none-any.whl

Download URL buildguard-0.1.0-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47d114f7e401cb2c66947a79339c2535a11da27db32820d841705c349cb980f3
BLAKE2b-256 checksum
How to use checksums
a43c65241d35fddc6d2495ae8f0e695d410af5ef172fd36bfe24529d6c5b6efa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page