--- id: delocate version: "0.13.0" license: Copyright (c) 2014-2025, Matthew Brett and the Delocate contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that… (full text in the JSON record) license_treatment: permissive maintenance: active --- # delocate — Move macOS dynamic libraries into package License: permissive · Maintenance: active · Downloads: 598.5K/mo ## What it is and what it does Delocate is a macOS-specific build tool that solves the problem of distributing Python wheels containing compiled extensions that link to dynamic libraries outside the system paths. When you build a wheel on a machine with Homebrew or custom-compiled libraries, the wheel's extensions link to those libraries by absolute path—making the wheel fail on other machines that don't have them installed. Delocate analyzes the wheel, copies all non-system dynamic libraries into a `.dylibs` directory within the wheel, and rewrites the extension load paths to find them there instead. The package provides four command-line tools: `delocate-listdeps` shows what libraries a wheel depends on, `delocate-path` relocates libraries in a directory tree, `delocate-wheel` processes a wheel file directly, and `delocate-merge` combines wheels built for different architectures (e.g., `x86_64` and `arm64`) into a single universal binary. It also validates that wheels contain the required architectures for compatibility with system Python and Python.org distributions. Use it for: - Build and distribute a Scipy or NumPy wheel from a machine with Homebrew gfortran without requiring users to install gfortran. - Verify that a wheel's compiled extensions and libraries have the correct architectures (x86_64, arm64) before release. - Combine separately built x86_64 and arm64 wheels into a single universal2 wheel for macOS. - Audit which external dynamic libraries a third-party wheel depends on before installation. - Prepare wheels for PyPI distribution that will work on any macOS machine with Python 3.9+. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Delocate finds and relocates dynamic libraries that macOS Python extensions depend on, bundling them into wheels and rewriting load paths so wheels work on machines without those libraries installed. Yes, if you build or distribute Python wheels on macOS with compiled extensions. Delocate is the standard tool for making those wheels portable across machines. If you only install wheels or work on Linux, it is not needed. No known security vulnerabilities; actively maintained; low install friction. ## Install pip install delocate uv add delocate poetry add delocate ## Installing delocate Before you install: Low friction: pure Python wheel with three lightweight runtime dependencies (packaging, typing_extensions, macholib). Active maintenance with last commit 2026-05-25 and stable release status. License in practice: BSD 2-Clause permissive license; you can use, modify, and distribute delocate and wheels it processes freely, provided you retain the copyright notice and disclaimer. Quickstart: pip install delocate # List dynamic libraries a wheel depends on delocate-listdeps scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl # Copy libraries into wheel and relink delocate-wheel -w fixed_wheels scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl macOS only; requires Python 3.9 or later; wheels must contain compiled extensions with dynamic library dependencies to be useful. Verify before relying: - Whether delocate-merge (dual-architecture wheel combining) works with current macOS/Xcode toolchains. - Performance impact of delocate-wheel on large wheels with many library dependencies. ## Package facts - License: Copyright (c) 2014-2025, Matthew Brett and the Delocate contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 598.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags macOS wheel dynamic library bundling, macos dylib relocation for wheels, fix wheel dependencies macos, delocate wheel macos, bundle dylibs into python wheel, macos install_name rpath rewriting, macos-specific, wheel-packaging, binary-relocation [View on SkillFed](https://skillfed.io/packages/delocate) · [View on PyPI](https://pypi.org/project/delocate/)