--- id: setuptools-dso version: "2.12.3" license: BSD license_treatment: permissive maintenance: active --- # setuptools-dso — setuptools extension to build non-python shared libraries License: permissive · Maintenance: active · Downloads: 86.6K/mo ## 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 above — 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 pip install setuptools-dso uv add setuptools-dso poetry add setuptools-dso ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 86.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags build shared libraries in python wheels, setuptools extension for C libraries, compile native code in python packaging, dynamic shared objects setuptools, bundle compiled libraries in wheels, non-python library build tool, native code packaging for python, build-system, native-code, packaging [View on SkillFed](https://skillfed.io/packages/setuptools-dso) · [View on PyPI](https://pypi.org/project/setuptools-dso/)