diff --git a/Cargo.toml b/Cargo.toml index 7b874c8..9b2fd8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,3 +6,9 @@ members = [ ] default-members = ["netcdf", "netcdf-sys"] resolver = "2" + +[workspace.dependencies] +netcdf = { path = "netcdf", version = "0.9.0" } +netcdf-sys = { path = "netcdf-sys", version = "0.6.0" } +netcdf-src = { path = "netcdf-src", version = "0.3.0" } +hdf5-sys = { version = "0.8.0" } diff --git a/netcdf-src/Cargo.toml b/netcdf-src/Cargo.toml index 56cafd4..dcd8f7a 100644 --- a/netcdf-src/Cargo.toml +++ b/netcdf-src/Cargo.toml @@ -8,7 +8,7 @@ build = "build.rs" repository = "https://github.com/georust/netcdf" license-file = "source/COPYRIGHT" links = "netcdfsrc" -categories = ["ffi"] +categories = ["filesystem"] keywords = ["netcdf"] readme = "README.md" exclude = [ @@ -31,7 +31,7 @@ exclude = [ dap = [] [dependencies] -hdf5-sys = { version = "0.8.0", features = ["hl", "deprecated", "zlib"] } +hdf5-sys = { workspace = true, features = ["hl", "deprecated", "zlib"] } libz-sys = { version = "1.0.25" } [build-dependencies] diff --git a/netcdf-sys/Cargo.toml b/netcdf-sys/Cargo.toml index 108fd07..bd10971 100644 --- a/netcdf-sys/Cargo.toml +++ b/netcdf-sys/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" links = "netcdf" build = "build.rs" readme = "README.md" -categories = ["ffi", "filesystem", "science"] +categories = ["external-ffi-bindings", "filesystem", "science"] exclude = [ "testdata/**", ] @@ -22,15 +22,15 @@ rust-version = "1.70" [dependencies] libz-sys = { version = "1.0.25" } curl-sys = { version = "0.4.51", optional = true } -hdf5-sys = { version = "0.8.0" } -netcdf-src = { path = "../netcdf-src", version = "0.3.0", optional = true } +hdf5-sys = { workspace = true } +netcdf-src = { workspace = true, optional = true } [dev-dependencies] [features] default = [] memio = [] -static = ["libz-sys/static", "hdf5-sys/static", "hdf5-sys/hl", "hdf5-sys/deprecated", "hdf5-sys/zlib", "netcdf-src", "curl-sys?/static-curl", "curl-sys?/static-ssl"] +static = ["libz-sys/static", "hdf5-sys/static", "hdf5-sys/hl", "hdf5-sys/deprecated", "hdf5-sys/zlib", "dep:netcdf-src", "curl-sys?/static-curl", "curl-sys?/static-ssl"] dap = ["dep:curl-sys"] [build-dependencies] diff --git a/netcdf/Cargo.toml b/netcdf/Cargo.toml index 2f4d292..3f305ba 100644 --- a/netcdf/Cargo.toml +++ b/netcdf/Cargo.toml @@ -21,12 +21,12 @@ static = ["netcdf-sys/static"] [dependencies] ndarray = { version = "0.15", optional = true } -netcdf-sys = { path = "../netcdf-sys", version = "0.6.0" } -bitflags = "1.2.1" +netcdf-sys = { workspace = true } +bitflags = "2.4.2" [dev-dependencies] +clap = { version = "4.5.1", features = ["derive"] } tempfile = "3.1.0" -structopt = "0.3.3" [package.metadata.docs.rs] features = ["static"] diff --git a/netcdf/examples/ncdump.rs b/netcdf/examples/ncdump.rs index fa88aa9..e4d2782 100644 --- a/netcdf/examples/ncdump.rs +++ b/netcdf/examples/ncdump.rs @@ -1,12 +1,12 @@ -use structopt::StructOpt; +use clap::Parser; -#[derive(Debug, StructOpt)] +#[derive(Debug, Parser)] struct Opt { path: std::path::PathBuf, } fn main() { - let opt = Opt::from_args(); + let opt = Opt::parse(); match run(&opt.path) { Err(e) => {