Standalone Cross-Platform Wheels: Zero External Deps in ezsnmp

Note

  • Published: December 02, 2026

  • Authors: Written by Gemini 3.8 Flash, Co-Authored & Reviewed by Carlos Santos (@carlkidcrypto)

  • Estimated Reading Time: 7 minutes

  • Tags: ezsnmp • Python • Wheels • Net-SNMP • SWIG • cibuildwheel • Packaging

Historically, installing a Net-SNMP-backed Python library on Linux, macOS, or Windows meant fighting OS package managers before pip install could even succeed. Missing libsnmp-dev headers, mismatched OpenSSL versions, or absent SWIG binaries turned routine Dockerfile builds and CI runners into fragile multi-step scripts.

In the 2026 CalSemVer release cycle (v2026.10.28a0 through v2026.11.9b0, culminating in the first stable v2026.11.28 release), ezsnmp completes a major packaging transformation: self-contained, standalone binary wheels across Linux, macOS, and Windows that bundle compiled Net-SNMP 5.10 and OpenSSL libraries directly inside the wheel.

In this post—part two of our three-part series on the upcoming ezsnmp changes—we will examine how standalone wheels eliminate external system dependencies, how build_utils.py and cibuildwheel assemble cross-platform binaries, and when you should still build from source.

What Changes for Developers: pip install ezsnmp

With standalone wheels, installing ezsnmp in a fresh virtual environment or minimal container no longer requires apt-get install libsnmp-dev, brew install net-snmp, or manual Windows SDK configuration:

# Install precompiled standalone wheel (zero system Net-SNMP required)
pip install --upgrade --pre ezsnmp

On PyPI, ezsnmp now ships precompiled binary wheels covering:

  • Linux (``manylinux`` glibc 2.28+ & ``musllinux`` 1.2+ x86-64): Added in PRs #1388 and #1394, bundling Net-SNMP shared libraries directly into the wheel via auditwheel repair so even Alpine Linux containers work out of the box.

  • macOS ARM64 (26.0+): Built against Net-SNMP 5.10 with automated OpenSSL discovery for revisioned Homebrew formulae (PRs #1402 and #1445) and delocate bundling.

  • Windows (x86-32, x86-64, and ARM64): Self-contained native wheels (PRs #1255, #1324, and #1328) bundling Net-SNMP and OpenSSL DLLs with zero external runtime installers.

  • CPython 3.10 through 3.15: Including free-threaded (cp314t) wheel variants.

Inside the Build Pipeline: build_utils.py & cibuildwheel

Shipping a C++17 + SWIG extension that compiles cleanly across three operating systems required major build-system modernization:

  1. Eliminating Conflicting SWIG Requirements:

    • In PR #1389, ezsnmp removed conflicting SWIG build requirements in pyproject.toml to prevent dependency drift between system SWIG binaries and pip build isolation.

  2. Centralized Helpers in ``build_utils.py``:

    • Extracted platform detection, compiler flags, and Net-SNMP/OpenSSL path discovery from setup.py into build_utils.py (PR #992), making Windows MSVC, macOS Clang, and Linux GCC flags maintainable and unit testable.

  3. Deduplicated & Parallelized CI Matrix:

    • PRs #1420, #1421, and #1422 deduplicated C++ extension compilation and test objects while parallelizing the Linux cibuildwheel matrix with artifact caching.

Verifying a Standalone Installation

After installing a standalone wheel in a clean container (such as python:3.12-slim with no libsnmp-dev installed), verify both the package version and live Net-SNMP runtime execution:

from importlib.metadata import version
from ezsnmp import Session
from ezsnmp.exceptions import ConnectionError, GenericError, TimeoutError

print(f"ezsnmp version: {version('ezsnmp')}")

# Standalone wheels bundle Net-SNMP 5.10 libraries internally
with Session(
    hostname="127.0.0.1",
    community="public",
    version=2,
    timeout=2,
    retries=1,
    set_max_repeaters_to_num=25,
) as session:
    try:
        uptime = session.get("sysUpTime.0")[0]
        print(f"sysUpTime ({uptime.type}): {uptime.value}")
    except (TimeoutError, ConnectionError, GenericError) as err:
        print(f"Target unreachable: {err}")

📥 Download this script: verifying_a_standalone_installation.py

When to Still Build from Source (sdist)

While standalone wheels are the recommended default for 95% of deployments, building from the source distribution (pip install --no-binary ezsnmp ezsnmp) remains supported when you need to:

  • Link against a custom-patched corporate Net-SNMP installation.

  • Target niche architectures (such as ppc64le or s390x) not yet in the PyPI wheel matrix.

  • Run under FIPS-validated OS OpenSSL providers mandated by enterprise security policies.

When building from sdist, ensure libsnmp-dev (or net-snmp-devel), a C++17 compiler, and SWIG are present on the build host.

Summary & What’s Next

By bundling Net-SNMP 5.10 and OpenSSL inside standalone cross-platform wheels, ezsnmp turns pip install ezsnmp into a single zero-dependency step on Linux, macOS, and Windows.

In part three of this series tomorrow, we will walk through what’s new and fixed across the 2026 beta cycle (v2026.10.28a0 through v2026.11.9b0), including Net-SNMP 5.10 container migration, per-session OID formatting locks, IPv6 validation, and Valgrind memory-safety hardening.


Warning

AI-generated content may contain misinformation or mistakes. A human does review this, but we are only human.