Python bindings to the rust kcl-lib crate.
The tests.py file contains examples of how to use the library.
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 maturin
should also work if you don't want to use pipx.
There are four main commands:
maturin publish
builds the crate into python packages and publishes them to pypi.maturin build
builds the wheels and stores them in a folder (target/wheels
by default), but doesn't upload them. It's possible to upload those with twine ormaturin upload
.maturin develop
builds the crate and installs it as a python module directly in the current virtualenv. Note that whilematurin develop
is faster, it doesn't support all the feature that runningpip install
aftermaturin build
supports.
pyo3
bindings are automatically detected.
maturin
doesn't need extra configuration files and doesn't clash with an existing setuptools-rust or milksnake configuration.
- Make sure the
Cargo.toml
has the new version you want to release. - Run
make tag
this is just an easy command for making a tag formatted correctly with the version. - Push the tag (the result of
make tag
gives instructions for this) - Everything else is triggered from the tag push. Just make sure all the tests
pass on the
main
branch before making and pushing a new tag.