setuptools-dso
setuptools extension to build non-python shared libraries
What it is and what it does
setuptools_dso extends setuptools to compile non-Python shared libraries directly during wheel creation, letting you build C/C++ code as part of the standard Python packaging workflow. Instead of maintaining a separate Makefile or build system and pre-compiling binaries, you define your library sources in setup.py and setuptools_dso handles compilation across platforms.
The package is designed for projects that need to ship compiled native code alongside Python modules—common in scientific computing, systems programming, and performance-critical libraries. It integrates into the standard setuptools build pipeline, so the resulting wheels contain both your Python code and the compiled shared objects, making distribution and installation straightforward for end users.
Use it for:
- Build and distribute C libraries as part of a Python package without maintaining external build scripts
- Create Python wheels that bundle compiled native code for performance-critical components
- Package EPICS (Experimental Physics and Industrial Control System) drivers and extensions
- Distribute scientific or systems libraries that wrap C/C++ code and need to compile on user systems
- Simplify CI/CD for projects with mixed Python and native code by using setuptools as the single build entry point
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
setuptools_dso is a setuptools plugin that builds non-Python shared libraries (like .so, .dylib, or .dll files) from source and packages them into Python wheels, replacing the need for external build systems.
Yes, if you need to build and ship non-Python shared libraries as part of a Python package. It eliminates the friction of maintaining separate build systems and integrates cleanly into the standard wheel workflow. The project is stable, actively maintained, has no known vulnerabilities, and carries a permissive license. Install only if you actually have native code to compile; it adds no value for pure-Python packages.
Install
setuptools-dso on PyPI
pip
pip install setuptools-dsouv
uv add setuptools-dsopoetry
poetry add setuptools-dsoInstalling setuptools-dso
Before you install
Installation is straightforward with low friction—a pure-wheel distribution with only setuptools as a runtime dependency. The project is actively maintained with recent commits and has been stable since its 2018 release.
License in practice
Licensed under BSD (permissive), so you can use and modify the package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install setuptools-dso
# In setup.py, import and use the extension:
from setuptools_dso import Extension
from setuptools import setup
setup(
name='mypackage',
ext_modules=[Extension('mylib', sources=['src/mylib.c'])]
)
Requires a C/C++ compiler toolchain available on the build system (gcc, clang, MSVC, etc.) to compile the shared libraries.
Verify before relying
- Whether the package supports building C++ libraries in addition to C
- What compiler flags and customization options are available for advanced build scenarios
- Performance or size overhead compared to pre-built binary wheels
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — setuptools |
| Maintenance | actively maintained — 184 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 86,622/month — #13,846 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: setuptools_dso-2.12.3-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
coherent.licensedA Setuptools plugin that automatically injects…
permissive · top 15,000 on PyPI
delvewheelBundles DLL dependencies into Windows Python…
permissive · top 15,000 on PyPI
extension-helpersProvides build helpers and utilities for Python…
permissive · top 5,000 on PyPI
distributeDistribute is a legacy compatibility wrapper…
permissive · top 15,000 on PyPI
setuptools-golangA setuptools extension that builds CPython…
permissive · top 5,000 on PyPI
setuptools-odooSetuptools-odoo automates packaging of Odoo…
copyleft · top 15,000 on PyPI
pip-hello-worldA minimal test package demonstrating setuptools…
permissive · top 15,000 on PyPI
setuptools-gitA setuptools plugin that automatically includes…
permissive · top 15,000 on PyPI
editablesEditables is a library for building wheels that…
permissive · top 1,000 on PyPI