Build and distribute C/C++ static libraries via Python packages.
Getting Started
You can have a setup.py 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')])
setup(
name='pkg_name',
# ...
setup_requires=['build_capi'],
capi_libs=[get_lib],
include_package_data=True,
data_files=[(join('pkg_name', 'include'), join('pkg_name', 'include',
'example.h'))],
package_data={'': [join('pkg_name', 'lib', '*.*')]})
and then have a pkg_name/__init__.py
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.
Install
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
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for build-capi 1.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| build-capi-1.1.10.tar.gz | 6.3 kB | Without provenance | Details |
Release files / build-capi-1.1.10.tar.gz
| Download URL | build-capi-1.1.10.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4048fe3a1fa34e390eeae507c089499ab81cf9f34d8babfe229da20c0c2810a
|
|
BLAKE2b-256 checksum How to use checksums |
b5168c3b75d481c98af68a4ad5b03f6d14ed3a7e03216950c084c28b3d3d8e2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for build-capi 1.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.