Skip to content

Commit

Permalink
rename py to bindings (#13)
Browse files Browse the repository at this point in the history
* rename py to bindings

* finally works

* fix lint

* Bump version to 0.0.8

* fix lint again
  • Loading branch information
codekansas authored Oct 10, 2024
1 parent 2fb94bd commit f66e724
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = [
"actuator/rust/py",
"actuator/rust/bindings",
"actuator/rust/robstride",
]
resolver = "2"
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include Cargo.toml
recursive-include actuator/ *.rs *.pyi *.so *.py *.txt Cargo.toml py.typed
4 changes: 2 additions & 2 deletions actuator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.0.7"
__version__ = "0.0.8"

from .rust.py import PyRobstrideMotorFeedback as RobstrideMotorFeedback, PyRobstrideMotors as RobstrideMotors
from .rust.bindings import PyRobstrideMotorFeedback as RobstrideMotorFeedback, PyRobstrideMotors as RobstrideMotors
1 change: 1 addition & 0 deletions actuator/rust/bindings.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "py"
name = "bindings"
version.workspace = true
edition.workspace = true
description.workspace = true
Expand All @@ -9,7 +9,7 @@ license.workspace = true
readme.workspace = true

[lib]
name = "py"
name = "bindings"
crate-type = ["cdylib", "rlib"]

[dependencies]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["maturin>=1.1,<2.0"]
build-backend = "maturin"

[project]
name = "py"
name = "bindings"
requires-python = ">=3.9"


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use pyo3_stub_gen::Result;

fn main() -> Result<()> {
let stub = py::stub_info()?;
let stub = bindings::stub_info()?;
stub.generate()?;
Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl From<RobstrideMotorFeedback> for PyRobstrideMotorFeedback {
}

#[pymodule]
fn py(m: &Bound<PyModule>) -> PyResult<()> {
fn bindings(m: &Bound<PyModule>) -> PyResult<()> {
m.add_class::<PyRobstrideMotors>()?;
m.add_class::<PyRobstrideMotorFeedback>()?;
Ok(())
Expand Down
1 change: 0 additions & 1 deletion actuator/rust/py.pyi

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ignore_missing_imports = true

[[tool.mypy.overrides]]

module = ["actuator.rust.py"]
module = ["actuator.rust.bindings"]

disable_error_code = ["no-untyped-def"]

Expand Down
9 changes: 0 additions & 9 deletions setup.cfg

This file was deleted.

9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
assert version_re is not None, "Could not find version in actuator/__init__.py"
version: str = version_re.group(1)

package_data = ["py.typed", "requirements.txt", "requirements-dev.txt"]
package_data = [f"actuator/{name}" for name in ("py.typed", "requirements.txt", "requirements-dev.txt")]
package_data.append("Cargo.toml")
for ext in ("pyi", "rs", "toml", "so"):
package_data.extend(glob.iglob(f"actuator/**/*.{ext}", recursive=True))

Expand All @@ -38,8 +39,8 @@
url="https://github.com/kscalelabs/actuator",
rust_extensions=[
RustExtension(
target="actuator.rust.py",
path="actuator/rust/py/Cargo.toml",
target="actuator.rust.bindings",
path="actuator/rust/bindings/Cargo.toml",
binding=Binding.PyO3,
),
],
Expand All @@ -49,8 +50,8 @@
long_description_content_type="text/markdown",
python_requires=">=3.11",
install_requires=requirements,
tests_require=requirements_dev,
extras_require={"dev": requirements_dev},
include_package_data=True,
package_data={"actuator": package_data},
packages=["actuator"],
)

0 comments on commit f66e724

Please sign in to comment.