-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit does two things: first, switch a lot of metadata-definition to use the workspace-package inheritance allowed since Rust 1.64 (including several shared dependencies); second, relax the installation requirements on `indexmap` and `hashbrown` to allow both to use their most recent two majors. Dependents can then install `rustworkx-core` using either (say) `hashbrown 0.13.2` or `hashbrown 0.14.0` as desired, and similar between `indexmap 1.9.3` and `indexmap 2.0.0`. This commit leaves the lock file in the `hashbrown 0.14.0`, `indexmap 2.0.0` state, although note that some other crate dependents still use `hashbrown 0.12.3` internally, but this doesn't matter for the public API surface. I tested it manually in the `hashbrown 0.13.2`, `indexmap 1.9.3` state by updating those two dependencies with: cargo update -p '[email protected]' --precise 1.9.3 cargo update -p '[email protected]' --precise 0.13.2 cargo update -p '[email protected]' Co-authored-by: Ivan Carvalho <[email protected]>
- Loading branch information
1 parent
6fa9ec6
commit 34b7ec0
Showing
3 changed files
with
112 additions
and
83 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,60 @@ | ||
[package] | ||
name = "rustworkx" | ||
description = "A python graph library implemented in Rust" | ||
version = "0.14.0" | ||
authors = ["Matthew Treinish <[email protected]>"] | ||
license = "Apache-2.0" | ||
readme = "README.md" | ||
repository = "https://github.com/Qiskit/rustworkx" | ||
keywords = ["python", "graph"] | ||
edition = "2021" | ||
rust-version = "1.64" | ||
version.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
authors.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
|
||
[workspace] | ||
members = [ | ||
"rustworkx-core", | ||
] | ||
|
||
[lib] | ||
name = "rustworkx" | ||
crate-type = ["cdylib"] | ||
[workspace.package] | ||
version = "0.14.0" | ||
edition = "2021" | ||
rust-version = "1.64" | ||
authors = ["Matthew Treinish <[email protected]>"] | ||
repository = "https://github.com/Qiskit/rustworkx" | ||
license = "Apache-2.0" | ||
|
||
[dependencies] | ||
[workspace.dependencies] | ||
ahash = "0.8.3" | ||
petgraph = "0.6.3" | ||
fixedbitset = "0.4.2" | ||
hashbrown = { version = ">=0.13, <0.15", features = ["rayon"] } | ||
indexmap = { version = ">=1.9, <3", features = ["rayon"] } | ||
num-traits = "0.2" | ||
numpy = "0.19.0" | ||
petgraph = "0.6.3" | ||
rand = "0.8" | ||
rand_pcg = "0.3" | ||
rayon = "1.7" | ||
num-traits = "0.2" | ||
rayon-cond = "1.7" | ||
|
||
[lib] | ||
name = "rustworkx" | ||
crate-type = ["cdylib"] | ||
|
||
[dependencies] | ||
ahash.workspace = true | ||
fixedbitset.workspace = true | ||
hashbrown.workspace = true | ||
indexmap.workspace = true | ||
ndarray-stats = "0.5.1" | ||
num-bigint = "0.4" | ||
num-complex = "0.4" | ||
ndarray-stats = "0.5.1" | ||
num-traits.workspace = true | ||
numpy.workspace = true | ||
petgraph.workspace = true | ||
quick-xml = "0.30" | ||
rand.workspace = true | ||
rand_pcg.workspace = true | ||
rayon.workspace = true | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
rustworkx-core = { path = "rustworkx-core", version = "=0.14.0" } | ||
|
@@ -40,18 +63,10 @@ rustworkx-core = { path = "rustworkx-core", version = "=0.14.0" } | |
version = "0.19.2" | ||
features = ["extension-module", "hashbrown", "num-bigint", "num-complex", "indexmap"] | ||
|
||
[dependencies.hashbrown] | ||
version = "0.13" | ||
features = ["rayon"] | ||
|
||
[dependencies.ndarray] | ||
version = "^0.15.6" | ||
features = ["rayon"] | ||
|
||
[dependencies.indexmap] | ||
version = "1.9" | ||
features = ["rayon"] | ||
|
||
[dependencies.sprs] | ||
version = "^0.11" | ||
features = ["multi_thread"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
[package] | ||
name = "rustworkx-core" | ||
version = "0.14.0" | ||
edition = "2021" | ||
authors = ["Matthew Treinish <[email protected]>"] | ||
description = "Rust APIs used for rustworkx algorithms" | ||
license = "Apache-2.0" | ||
readme = "README.md" | ||
repository = "https://github.com/Qiskit/rustworkx" | ||
homepage = "https://github.com/Qiskit/rustworkx/tree/main/rustworkx-core" | ||
keywords = ["graph"] | ||
rust-version = "1.64" | ||
homepage = "https://github.com/Qiskit/rustworkx/tree/main/rustworkx-core" | ||
version.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
authors.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
|
||
[dependencies] | ||
ahash = "0.8.3" | ||
fixedbitset = "0.4.2" | ||
petgraph = "0.6.3" | ||
rand = "0.8.5" | ||
rand_pcg = "0.3.1" | ||
rayon = "1.7" | ||
num-traits = "0.2" | ||
ahash.workspace = true | ||
fixedbitset.workspace = true | ||
hashbrown.workspace = true | ||
indexmap.workspace = true | ||
num-traits.workspace = true | ||
petgraph.workspace = true | ||
priority-queue = "1.3" | ||
rand.workspace = true | ||
rand_pcg.workspace = true | ||
rayon.workspace = true | ||
rayon-cond = "0.3" | ||
|
||
[dependencies.hashbrown] | ||
version = "0.13" | ||
features = ["rayon"] | ||
|
||
[dependencies.indexmap] | ||
version = "1.9" | ||
features = ["rayon"] |