From 4a587dccff0ece3c4127bd8a02c9e0af0dc1f32c Mon Sep 17 00:00:00 2001 From: David Brochart Date: Mon, 20 Feb 2023 15:55:12 +0100 Subject: [PATCH] Add package __version__ --- pyproject.toml | 1 - src/lib.rs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a60667a..7d9b3db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,6 @@ build-backend = "maturin" [project] name = "y-py" -version = "0.6.0" description = "Python bindings for the Y-CRDT built from yrs (Rust)" license = { file = "LICENSE" } authors = [ diff --git a/src/lib.rs b/src/lib.rs index 9a65239..d07a362 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,8 @@ use crate::y_doc::*; /// Python bindings for Y.rs #[pymodule] pub fn y_py(_py: Python, m: &PyModule) -> PyResult<()> { + m.add("__version__", env!("CARGO_PKG_VERSION"))?; + // Data Types m.add_class::()?; m.add_class::()?;