kcl-python-bindings
Python bindings to the rust kcl-lib crate.
Usage
The tests.py file contains examples of how to use the library.
Development
We use maturin for this project.
You can either download binaries from the latest release or install it with pipx:
pipx install maturin
Note
pip install maturinshould also work if you don't want to use pipx.
There are four main commands:
maturin publishbuilds the crate into python packages and publishes them to pypi.maturin buildbuilds the wheels and stores them in a folder (target/wheelsby default), but doesn't upload them. It's possible to upload those with twine ormaturin upload.maturin developbuilds the crate and installs it as a python module directly in the current virtualenv. Note that whilematurin developis faster, it doesn't support all the feature that runningpip installaftermaturin buildsupports.
pyo3 bindings are automatically detected.
maturin doesn't need extra configuration files and doesn't clash with an existing setuptools-rust or milksnake configuration.
Releasing a new version
- Make sure the
Cargo.tomlhas the new version you want to release. - Run
make tagthis is just an easy command for making a tag formatted correctly with the version. - Push the tag (the result of
make taggives instructions for this) - Everything else is triggered from the tag push. Just make sure all the tests
pass on the
mainbranch before making and pushing a new tag.