This project uses pip and pip-tools for dependency management with automated requirements file generation.
For initial development setup, follow the instructions in README.md:
python3.12 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip wheel
pip install -r requirements-pinned.txt
pip install -r requirements_dev.txtThe Makefile provides automated requirements management:
# Sync ALL requirements files (recommended - does everything)
make requirements
# Or sync individual files:
make sync-requirements # Generate requirements-build.txt only
make sync-build-tools # Generate requirements-build-tools.txt only (requires podman)
# Check if requirements are in sync
make requirements-checkrequirements-build.txt and requirements-build-tools.txt are automatically generated from requirements-pinned.txt.
Note: requirements_dev.txt is manually maintained (not auto-generated) and contains development/testing dependencies that don't need hash pinning.
# Sync all requirements files (creates venv and installs pip-tools if needed)
make requirementsThis will:
- Generate
requirements-build.txtfromrequirements-pinned.txt(with hashes) - Generate
requirements-build-tools.txtfromrequirements-build.txt(build backend dependencies)
# Check if all requirements files match the current state
make requirements-checkNote: The requirements-check command will automatically run make requirements first to regenerate both requirements-build.txt and requirements-build-tools.txt, then check if the generated files match what's currently tracked in git.
The requirements files are automatically synced via:
- Pre-commit hooks: Automatically sync when
requirements-pinned.txtchanges - GitHub Actions:
- On push to
main:requirements-build.txtis automatically updated and committed - On pull requests: The workflow checks if
requirements-build.txtis in sync and fails if it's not
- On push to
If you see a PR check failure, run make sync-requirements locally and commit the updated requirements-build.txt file.
requirements-pinned.txt: Source of truth for production - Contains exact version pins for runtime and deployment dependencies (used to generate requirements-build.txt with hashes)requirements_dev.txt: Development dependencies - Contains testing and development tools (pytest, coverage, etc.). Not compiled with hashes since these are only used in CI and local dev.requirements-build.txt: Contains build dependencies for downstream hermetic builds, compiled from requirements-pinned.txt (auto-generated, includes hashes)requirements-build-tools.txt: Contains build-time tool dependencies (build backends) for hermetic Konflux builds, compiled fromrequirements-build.txtviapybuild-deps(auto-generated)
The project maintains a licenses/licenses.md file that documents all dependency licenses:
# Regenerate licenses/licenses.md
make licenses
# Check if licenses/licenses.md is in sync
make check-licensesNote: The license file is generated from the installed dependencies in requirements-build.txt.
Remove requirements-build.txt, and file will be regenerated using latest versions.
Example: there is vulnerability in a single dependency library.
Like CVE-2025-6176 - brotli<=1.1.0.
You need to upgrade brotli to >=1.2.0.
The sync-requirement.sh does not update all packages to latest version.
To update only brotli:
make sync-requirements EXTRA_DEPS="brotli>=1.2.0"
# EXTRA_DEPS can contain multiple dependencies. They need to be space-separated.
make sync-requirements EXTRA_DEPS="brotli>=1.2.0 urllib3>=0.0.1"