setuptools-golang
A setuptools extension for building cpython extensions written in golang.
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Go >= 1.5 installed on the build system; Python >= 3.8 required; supported on Linux, macOS, and win32.
- 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 · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use this in proprietary projects without obligation to share modifications.
last release 2023-07-29 (1112 days) · last repo commit 2025-01-20 · 104 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,375,874 downloads/mo, #3,987 on PyPI
Alternatives
Verify before relying
# 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 .- 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.
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 on this page. Verify before relying on it.
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
setuptools-golang on PyPI
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.
Requires Go >= 1.5 installed on the build system; Python >= 3.8 required; supported on Linux, macOS, and win32.
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 .
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 the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesetuptools |
| Maintenance | Abandoned 1,112 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 1,375,874 / month, #3,987 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: setuptools_golang-2.9.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “build python extensions in go”
- setuptools-golangA setuptools extension that builds CPython extensions from Go source…
- tree-sitter-goProvides a Go language grammar for tree-sitter, enabling incremental…
- manygoConverts Golang platform identifiers (GOOS and GOARCH) into Python…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also manygo · setuptools-git · setuptools-dso · setuptools-protobuf · setuptools-git-versioning · dockerfile · extension-helpers · setuptools-odoo · readthedocs-sphinx-ext