From 33d4851b71604fc352a6ce432b738eb74db0834c Mon Sep 17 00:00:00 2001 From: nsheff Date: Wed, 8 Jan 2025 21:02:50 -0500 Subject: [PATCH] update docs --- bindings/python/README.md | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/bindings/python/README.md b/bindings/python/README.md index 52e025c..f3fff89 100644 --- a/bindings/python/README.md +++ b/bindings/python/README.md @@ -1,35 +1,23 @@ # gtars -This is a python wrapper around the `gtars` crate. It provides an easy interface for using `gtars` in python. It is currently in early development, and as such, it does not have a lot of functionality yet, but new tools are being worked on right now. +This is a Python package that wraps the `gtars` crate so you can call gtars code from Python. -## Installation +Documentation for Python bindings is hosted at: https://docs.bedbase.org/gtars/ -You can get `gtars` from PyPI: +## Brief instructions -```bash -pip install gtars -``` - -## Usage - -Import the package, and use the tools: -```python -import gtars as gt - -gt.prune_universe(...) -``` -## Developer docs - -To build for development: +To install the development version, you'll have to build it locally. Build Python bindings like this: -```bash +```console cd bindings/python -maturin build --release +maturin build --interpreter 3.11 --release ``` Then install the local wheel that was just built: -``` -version=`grep '^version =' Cargo.toml | cut -d '"' -f 2` -pip install --force-reinstall target/wheels/gtars-${version}-cp312-cp312-manylinux_2_38_x86_64.whl -``` +```console +gtars_version=`grep '^version =' Cargo.toml | cut -d '"' -f 2` +python_version=$(python --version | awk '{print $2}' | cut -d '.' -f1-2 | tr -d '.') +wheel_path=$(find target/wheels/gtars-${gtars_version}-cp${python_version}-cp${python_version}-*.whl) +pip install --force-reinstall ${wheel_path} +``` \ No newline at end of file