--- id: setuptools-golang version: "2.9.0" license: MIT license_treatment: permissive maintenance: abandoned --- # setuptools-golang — A setuptools extension for building cpython extensions written in golang. License: permissive · Maintenance: abandoned · Downloads: 1.4M/mo ## What it is and what it does setuptools-golang is a setuptools plugin that lets you write CPython extension modules in Go instead of C or C++. You define Go source files as extension modules in your setup.py, and the tool compiles them into native Python extensions using Go's cgo mechanism. It handles the build configuration, GOPATH management, and optional binary stripping to reduce extension size. The package is primarily useful for teams that want to leverage Go's concurrency model, standard library, or existing Go codebases to accelerate performance-critical sections of Python applications. It also provides a tool for building manylinux wheels so end users can install pre-compiled extensions without needing a Go compiler. However, the project is now archived and no longer maintained, meaning new Python or Go versions may introduce incompatibilities that won't be fixed. Use it for: - Accelerate CPU-bound Python code by rewriting hot loops or algorithms in Go and exposing them as Python functions. - Integrate existing Go libraries or services into Python applications without rewriting them in C or Python. - Build and distribute pre-compiled manylinux wheels so Python users don't need Go or a C compiler installed. - Prototype Go-based performance improvements to Python projects while keeping the public API in Python. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A setuptools extension that builds CPython extensions from Go source code, enabling developers to write performance-critical Python modules in Go and package them as standard Python extensions. No—do not install for new projects. The package is archived and abandoned; no releases have been made since the latest release and the repository accepts no new contributions. While it works for existing projects already using it, starting a new Go-Python integration on this tool risks hitting unresolved bugs or incompatibilities with future Python or Go versions. Consider alternatives for new work. ## Install pip install setuptools-golang uv add setuptools-golang poetry add setuptools-golang ## Installing setuptools-golang Before you install: Low install friction with a single runtime dependency on setuptools. However, the project is archived and abandoned, with no releases for over a year, signaling that maintenance has ended and future compatibility issues may not be addressed. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use this in proprietary projects without obligation to share modifications. Quickstart: # In setup.py: from setuptools import setup, Extension setup( name='myproject', build_golang={'root': 'github.com/user/project'}, ext_modules=[Extension('example', ['example.go'])], setup_requires=['setuptools-golang'], ) # Then: pip install . Requires Go >= 1.5 installed on the build system; Python >= 3.8 required; supported on Linux, macOS, and win32. Verify before relying: - Whether the archived repository will receive security patches or compatibility fixes for future Python or Go releases. - Current real-world usage and whether the Go cgo/CPython API integration remains stable with modern Go and Python versions. - Compatibility with PyPy3 given the abandoned maintenance status. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags build python extensions in go, golang cpython extension builder, setuptools go integration, python go bindings, go to python extension, go-interop, extension-building [View on SkillFed](https://skillfed.io/packages/setuptools-golang) · [View on PyPI](https://pypi.org/project/setuptools-golang/)