--- id: swig version: "4.4.1" license: https://github.com/swig/swig/blob/master/LICENSE license_treatment: copyleft maintenance: active --- # swig — SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. License: copyleft · Maintenance: active · Downloads: 1.7M/mo ## What it is and what it does This package distributes SWIG as a wheel, eliminating the need to install it separately via system package managers. SWIG is a compiler that connects C and C++ programs with high-level languages by automatically generating wrapper code. It's commonly used during the build phase of extension projects to generate bindings from C/C++ interface files. The package provides pre-compiled binaries for most major platforms and architectures (x86_64, ARM, RISC-V, s390x, and others on Windows, macOS, and Linux). You can declare it in pyproject.toml so it's available during builds, or use it as a command-line tool. With no runtime dependencies, the footprint is minimal once installed. Use it for: - Building C/C++ extensions that need automatic wrapper generation from interface definitions - Setting up CI/CD pipelines where the tool must be available without relying on system package managers - Declaring the tool as a build-system requirement in pyproject.toml for reproducible builds across platforms - Running the tool via pipx without a permanent installation, useful in ephemeral environments like GitHub Actions ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides SWIG as a PyPI-installable package, enabling you to generate language bindings between C/C++ code and Python without requiring a separate system installation. Yes, if you need this tool for building bindings from C/C++ code. The package eliminates system-level installation friction and works reliably across platforms. Be aware that binary wheels carry GPLv3 licensing obligations—verify compatibility with your project's license before distributing compiled extensions. The package is actively maintained and has no known vulnerabilities. ## Install pip install swig uv add swig poetry add swig ## Installing swig Before you install: Medium install friction due to binary wheel distribution across many platforms (Windows, macOS, Linux on x86_64, ARM, and other architectures). Package is actively maintained with recent releases; last commit was 2026-08-13. No runtime dependencies simplifies deployment once installed. License in practice: Copyleft license (GPLv3 or later) applies to binary wheels due to inclusion of compiled binaries. Source distributions are Apache 2.0. Users distributing compiled extensions must comply with GPLv3 terms; verify compatibility with your project's license before use. Quickstart: pip install swig Then add to pyproject.toml: [build-system] requires = ["swig"] Or run directly: swig -python myfile.i Building from source distribution requires internet access to download source code. Binary wheels are platform-specific; ensure your platform has a matching wheel available. Verify before relying: - Whether ARM wheels for Raspberry Pi on piwheels.org are kept in sync with PyPI releases - Exact Python version compatibility (requires_python is unspecified in metadata) - Whether swig can be used as a direct CLI tool after pip install ## Package facts - License: https://github.com/swig/swig/blob/master/LICENSE (copyleft) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 1.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags swig python bindings, c++ wrapper generator, language bindings c, build tool c extension, interface generator c++, c-bindings, build-tool, cross-platform [View on SkillFed](https://skillfed.io/packages/swig) · [View on PyPI](https://pypi.org/project/swig/)