Skip to content

Commit

Permalink
new maturin
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed Nov 18, 2023
1 parent deda687 commit 85b880d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 13 deletions.
9 changes: 1 addition & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,4 @@ crate-type = ["cdylib"]
exmex = { version = "0.18.0", features = ["partial"] }
numpy = "0.20.0"
num = "0.4"

[dependencies.pyo3]
version = "0.20.0"
features = ["extension-module"]

[package.metadata.maturin]
python-source = "py"
name = "mexpress._mexpress"
pyo3 = { version = "0.20.0", features = ["extension-module"] }
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions py/mexpress/__init__.py → mexpress/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

from mexpress._mexpress import native_parse_f64, native_parse_f32
from mexpress import _mexpress as mx


def _transform_x(x):
Expand Down Expand Up @@ -56,8 +56,8 @@ def __str__(self) -> str:


def parse_f64(s: str) -> Mexpress:
return Mexpress(native_parse_f64(s.replace("**", "^")), dtype=np.float64)
return Mexpress(mx.native_parse_f64(s.replace("**", "^")), dtype=np.float64)


def parse_f32(s: str) -> Mexpress:
return Mexpress(native_parse_f32(s.replace("**", "^")), dtype=np.float32)
return Mexpress(mx.native_parse_f32(s.replace("**", "^")), dtype=np.float32)
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ readme = "README.md"
version = "0.1.5"
requires-python = ">=3.8"
[build-system]
requires = ["maturin>=0.14,<0.15"]
requires = ["maturin>1.0,<2.0"]
build-backend = "maturin"

[tool.maturin]
features = ["pyo3/extension-module"]
module-name = "mexpress._mexpress"
[tool.ruff]
ignore = ["E731"]
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 85b880d

Please sign in to comment.