--- id: patchelf version: "0.19.1.0" license: GPL-3.0-or-later license_treatment: copyleft maintenance: active --- # patchelf — A small utility to modify the dynamic linker and RPATH of ELF executables. License: copyleft · Maintenance: active · Downloads: 13.8M/mo ## What it is and what it does patchelf is a packaging of the upstream NixOS patchelf utility, distributed via PyPI for easy installation. It modifies ELF executables' dynamic linker and RPATH settings, which is essential for binary wheel portability and compatibility across Linux distributions. The package provides pre-built binaries for multiple architectures and libc variants (glibc, musl), eliminating the need to compile patchelf from source. This is primarily a command-line tool packaged for Python environments. It has no runtime dependencies and is commonly used in build pipelines for auditwheel, manylinux, and musllinux workflows—scenarios where you need to adjust how compiled binaries locate their dependencies. The package is actively maintained and supports modern Python versions. Use it for: - Building manylinux or musllinux wheels that need to adjust RPATH in compiled extensions - Automating binary patching in CI/CD pipelines without requiring system package managers - Modifying ELF executables' dynamic linker for cross-distribution compatibility - Dependency for auditwheel or similar tools that repair wheel portability - Development environments where patchelf must be available as a Python dependency ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a PyPI-packaged binary of patchelf, a utility for modifying the dynamic linker and RPATH of ELF executables. Yes, if you need patchelf in a Python environment or build pipeline. It offers zero runtime dependencies, active maintenance, and broad platform coverage via pre-built wheels. The GPLv3+ copyleft applies only to modifications; using the binary carries no redistribution obligation. Install friction is medium due to platform-specific wheels, but that is unavoidable for a compiled utility. ## Install pip install patchelf uv add patchelf poetry add patchelf ## Installing patchelf Before you install: Medium install friction due to platform-specific binary wheels. Active maintenance with recent releases (6 days since last update). No runtime dependencies simplifies deployment. License in practice: Dual-licensed under Apache 2.0 and GPLv3+. The copyleft GPLv3+ component means derivative works or modifications must be released under compatible terms; using the binary as-is carries no obligation, but redistributing modified versions requires GPL compliance. Quickstart: pip install patchelf import patchelf # patchelf is primarily a command-line tool; Python usage depends on the underlying binary Requires a supported platform with a pre-built wheel (Linux x86_64, aarch64, armv7l, ppc64le, s390x, riscv64, i686, or macOS universal2). Python >= 3.7. Verify before relying: - Whether the package exposes a Python API or is primarily a CLI wrapper around the patchelf binary - Specific use cases within auditwheel, manylinux, or musllinux workflows that this packaging enables ## Package facts - License: GPL-3.0-or-later (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 13.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags modify elf executables, patchelf binary, dynamic linker modification, rpath patching, elf binary patching, auditwheel dependency, manylinux wheel tools, elf-binary-tools, build-automation, wheel-packaging [View on SkillFed](https://skillfed.io/packages/patchelf) · [View on PyPI](https://pypi.org/project/patchelf/)