Packaging, Distribution & Dependency Resolution
Ensure deterministic production builds. Master Wheel (.whl) vs Source Distributions (sdist), strict application lockfiles vs permissive library ranges, and high-performance Rust tooling (uv).
Senior Systems Studio: Packaging, Distribution & Dependency Resolution
Select any senior topic below to analyze Wheel binary tag specifications vs sdist source distributions, enforce strict application lockfile reproducibility vs permissive library ranges, and run modern uv dependency resolution workflows.
Wheels, Lockfiles & Modern Tooling
- Wheel vs sdist: Wheels (
.whl) are pre-compiled binary archives unpacked directly intosite-packageswithout requiring local C/Rust compilers, unlike source distributions (sdist). - Applications vs Libraries: Libraries specify permissive dependency ranges in
pyproject.tomland never commit lockfiles. Applications MUST commit deterministic lockfiles (uv.lock) with SHA-256 cryptographic hashes. - Modern Tooling (
uv): Use Rust-powereduvfor PubGrub dependency resolution, instant virtualenv creation, and reproducible deployments.
1. Binary Wheels (.whl) vs Source Distributions (sdist)
Understand the physical packaging artifacts published to PyPI:
# Standard Wheel Naming Specification:
# {distribution}-{version}-{python_tag}-{abi_tag}-{platform_tag}.whl
cryptography-42.0.5-cp311-cp311-manylinux_2_28_x86_64.whl
# sdist (Source Archive): Requires gcc/clang compiler on target machine!
cryptography-42.0.5.tar.gz
2. Applications vs Libraries Dependency Locking
Enforce reproducible application deployments via deterministic cryptographic lockfiles:
# Application deterministic lockfile entry (uv.lock / poetry.lock):
[[package]]
name = "pydantic"
version = "2.6.4"
hashes = [
{ sha256 = "6d41ff1758c08a9f626a575a6c38ee21074e0d4cf96ffb47ec46e2a2223707cf" }
]