Skip to content

Commit

Permalink
Organize dependencies with workspace = true (cont.)
Browse files Browse the repository at this point in the history
Continued cleanup using workspace = true and more uniformity in
dependency listings among all crates.
No functional changes.
  • Loading branch information
bluss committed Aug 2, 2024
1 parent 0d3649e commit b682885
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 46 deletions.
41 changes: 23 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ bench = false
test = true

[dependencies]
num-integer = { version = "0.1.39", default-features = false }
num-traits = { version = "0.2", default-features = false }
num-complex = { version = "0.4", default-features = false }
num-integer = { workspace = true }
num-traits = { workspace = true }
num-complex = { workspace = true }

approx = { workspace = true, optional = true }
rayon = { version = "1.10.0", optional = true }

approx = { version = "0.5", optional = true , default-features = false }

# Use via the `blas` crate feature
cblas-sys = { version = "0.1.4", optional = true, default-features = false }
libc = { version = "0.2.82", optional = true }
Expand All @@ -44,11 +43,10 @@ matrixmultiply = { version = "0.3.2", default-features = false, features=["cgemm
serde = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
rawpointer = { version = "0.2" }


[dev-dependencies]
defmac = "0.2"
quickcheck = { version = "1.0", default-features = false }
approx = "0.5"
quickcheck = { workspace = true }
approx = { workspace = true, default-features = true }
itertools = { version = "0.13.0", default-features = false, features = ["use_std"] }

[features]
Expand All @@ -71,21 +69,14 @@ docs = ["approx", "serde", "rayon"]
std = ["num-traits/std", "matrixmultiply/std"]
rayon = ["dep:rayon", "std"]

portable-atomic-critical-section = ["portable-atomic/critical-section"]

matrixmultiply-threading = ["matrixmultiply/threading"]

portable-atomic-critical-section = ["portable-atomic/critical-section"]

[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies]
portable-atomic = { version = "1.6.0" }
portable-atomic-util = { version = "0.2.0", features = [ "alloc" ] }

[profile.bench]
debug = true
[profile.dev.package.numeric-tests]
opt-level = 2
[profile.test.package.numeric-tests]
opt-level = 2

[workspace]
members = [
"ndarray-rand",
Expand All @@ -96,9 +87,23 @@ members = [

[workspace.dependencies]
ndarray = { path = "." }
ndarray-rand = { path = "ndarray-rand" }

num-integer = { version = "0.1.39", default-features = false }
num-traits = { version = "0.2", default-features = false }
num-complex = { version = "0.4", default-features = false }
ndarray-rand = { path = "./ndarray-rand" }
approx = { version = "0.5", default-features = false }
quickcheck = { version = "1.0", default-features = false }
rand = { version = "0.8.0", features = ["small_rng"] }
rand_distr = { version = "0.4.0" }

[profile.bench]
debug = true

[profile.test.package.numeric-tests]
opt-level = 2
[profile.test.package.blas-tests]
opt-level = 2

[package.metadata.release]
no-dev-version = true
Expand Down
2 changes: 1 addition & 1 deletion extra-tests/blas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ edition = "2018"
test = false

[dev-dependencies]
approx = "0.5"
defmac = "0.2"
approx = { workspace = true }
num-traits = { workspace = true }
num-complex = { workspace = true }

Expand Down
9 changes: 3 additions & 6 deletions extra-tests/numeric/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ publish = false
edition = "2018"

[dependencies]
approx = "0.5"
ndarray = { workspace = true, features = ["approx"] }
ndarray-rand = { workspace = true }
rand_distr = "0.4"
approx = { workspace = true }
rand_distr = { workspace = true }

blas-src = { optional = true, version = "0.10", default-features = false, features = ["openblas"] }
openblas-src = { optional = true, version = "0.10", default-features = false, features = ["cblas", "system"] }

[dependencies.rand]
version = "0.8.0"
features = ["small_rng"]
rand = { workspace = true }

[dev-dependencies]
num-traits = { workspace = true }
Expand Down
21 changes: 7 additions & 14 deletions extra-tests/serialization/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,17 @@ test = false
[dependencies]
ndarray = { workspace = true, features = ["serde"] }

serde = { version = "1.0.100", default-features = false }
ron = { version = "0.8.1", optional = true }

[features]
default = ["ron"]

[dev-dependencies.serde]
version = "1.0.100"
default-features = false

[dev-dependencies.serde_json]
version = "1.0.40"
[dev-dependencies]
serde_json = { version = "1.0.40" }

[dev-dependencies.rmp]
# Old version to work with Rust 1.64+
version = "=0.8.10"

[dev-dependencies.rmp-serde]
rmp = { version = "=0.8.10" }
# Old version to work with Rust 1.64+
version = "0.14"
rmp-serde = { version = "0.14" }

[dependencies.ron]
version = "0.8.1"
optional = true
11 changes: 4 additions & 7 deletions ndarray-rand/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ keywords = ["multidimensional", "matrix", "rand", "ndarray"]

[dependencies]
ndarray = { version = "0.15", path = ".." }
rand_distr = "0.4.0"
quickcheck = { version = "1.0", default-features = false, optional = true }

[dependencies.rand]
version = "0.8.0"
features = ["small_rng"]
rand = { workspace = true }
rand_distr = { workspace = true }
quickcheck = { workspace = true, optional = true }

[dev-dependencies]
rand_isaac = "0.3.0"
quickcheck = { version = "1.0", default-features = false }
quickcheck = { workspace = true }

[package.metadata.release]
no-dev-version = true
Expand Down

0 comments on commit b682885

Please sign in to comment.