Skip to content

Commit

Permalink
fix python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Oct 30, 2024
1 parent 4c0d317 commit e425f02
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions pyklang/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Defines the top-level package for PyKlang."""

__version__ = "0.0.1"

from .bindings import add
3 changes: 0 additions & 3 deletions pyklang/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ build-backend = "maturin"
[project]
name = "bindings"
requires-python = ">=3.9"

[project.optional-dependencies]
test = ["pytest", "pyright", "ruff"]
2 changes: 1 addition & 1 deletion pyklang/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn add(a: u64, b: u64) -> u64 {
}

#[pymodule]
fn pyklang(m: &Bound<PyModule>) -> PyResult<()> {
fn bindings(m: &Bound<PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(add, m)?)?;
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def run(self) -> None:
url="https://github.com/kscalelabs/klang",
rust_extensions=[
RustExtension(
target="pyklang",
target="pyklang.bindings",
path="pyklang/Cargo.toml",
binding=Binding.PyO3,
),
Expand Down

0 comments on commit e425f02

Please sign in to comment.