Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Build and distribute C/C++ static libraries

Project Description

Build and distribute C/C++ static libraries via Python packages.

Getting Started

You can have a similar to

from os.path import join
from setuptools import setup

def get_lib():
  from build_capi import CApiLib

  mylib = CApiLib('pkg_name.lib.nmylib',
                  sources=[join('pkg_name', 'sources', 'example.c')],
                  include_dirs=[join('pkg_name', 'include')])

      # ...
      data_files=[(join('pkg_name', 'include'), join('pkg_name', 'include',
      package_data={'': [join('pkg_name', 'lib', '*.*')]})

and then have a pkg_name/

def get_include():
  import pkg_name
  from os.path import join, dirname
  return join(dirname(pkg_name.__file__), 'include')

def get_lib():
  import pkg_name
  from os.path import join, dirname
  return join(dirname(pkg_name.__file__), 'lib')

Please, refer to build_capi/example/prj_name for a minimal example of project using build_capi.


The recommended way of installing it is via conda

conda install -c conda-forge build-capi

An alternative way would be via pip

pip install build-capi



This project is licensed under the MIT License - see the LICENSE file for details

Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
build-capi-1.1.10.tar.gz (6.3 kB) Copy SHA256 Checksum SHA256 Source Jan 23, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting