Skip to content

Commit

Permalink
Basic setup for python library
Browse files Browse the repository at this point in the history
  • Loading branch information
squiddy committed Dec 27, 2022
1 parent 6a7c372 commit d4c4227
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 1 deletion.
90 changes: 89 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ walkdir = { version = "2.3.2" }
clearscreen = { version = "1.0.10" }
rayon = { version = "1.5.3" }
update-informer = { version = "0.5.0", default-features = false, features = ["pypi"], optional = true }
pyo3 = { version = "0.17.3", features = ["extension-module", "abi3", "abi3-py37"] }

# https://docs.rs/getrandom/0.2.7/getrandom/#webassembly-support
# For (future) wasm-pack support
Expand Down Expand Up @@ -111,3 +112,6 @@ opt-level = 1
[[bench]]
name = "source_code_locator"
harness = false

[package.metadata.maturin]
name = "ruff._ruff"
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ cfg_if! {

mod lib_native;
pub use lib_native::check;

mod lib_python;
pub use lib_python::_ruff;
} else {
mod lib_wasm;
pub use lib_wasm::check;
Expand Down
6 changes: 6 additions & 0 deletions src/lib_python.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use pyo3::prelude::*;

#[pymodule]
pub fn _ruff(py: Python<'_>, m: &PyModule) -> PyResult<()> {
Ok(())
}

0 comments on commit d4c4227

Please sign in to comment.