Skip to content

Commit

Permalink
remove python support
Browse files Browse the repository at this point in the history
pyo3 is not supported for petgraph, which blocks the python support for this crate
  • Loading branch information
digizeph committed Jan 17, 2024
1 parent 0572a6f commit 135e6cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
9 changes: 0 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,5 @@ readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

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

[dependencies]
pyo3 = "0.15.1"
petgraph = "0.6.4"

[features]
py = ["pyo3/extension-module"]
default = []
27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,4 @@ on the root directory.

The examples are available in the [`examples/`](examples/) direction.

You can run it with `cargo run --example=<filename without .rs>`.

### Python

The package is available on PyPi at https://pypi.org/project/valley-free/.
For installation, `pip3 install valley-free` should do the trick.

``` python
#!/usr/bin/env python3

import valley_free

topo = valley_free.load_topology("20161101.as-rel.txt.bz2")
paths = valley_free.propagate_paths(topo, 15169)

print(len(paths))
# 117074
```

#### Manually build Python package

Build for current Python environment:
`maturin build --release --features py`

Build using manylinux environment:
`docker run --rm -v $(pwd):/io konstin2/maturin build --release --features py`
You can run it with `cargo run --example=<filename without .rs>`.

0 comments on commit 135e6cd

Please sign in to comment.