Skip to content

Commit

Permalink
chore(rust): Fix make pre-commit command (#10205)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Aug 2, 2023
1 parent 41c6624 commit 22a501d
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ smartstring = { version = "1" }
multiversion = "0.7"
either = "1.8"
strum_macros = "0.25"
version_check = "0.9.4"

[workspace.dependencies.arrow]
package = "arrow2"
Expand Down
3 changes: 3 additions & 0 deletions crates/polars-arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ polars-error = { version = "0.31.1", path = "../polars-error" }
serde = { version = "1", features = ["derive"], optional = true }
thiserror.workspace = true

[build-dependencies]
version_check = { workspace = true }

[features]
dtype-decimal = ["atoi", "ethnum"]
dtype-array = []
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-arrow/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ wasm-timer = "0.2.5"
bincode = "1"
serde_json = "1"

[build-dependencies]
version_check = { workspace = true }

[package.metadata.docs.rs]
# not all because arrow 4.3 does not compile with simd
# all-features = true
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-core/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-lazy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ pyo3 = { version = "0.19", optional = true }
rayon.workspace = true
smartstring.workspace = true

[build-dependencies]
version_check = { workspace = true }

[features]
nightly = ["polars-core/nightly", "polars-pipe/nightly", "polars-plan/nightly"]
compile = ["polars-plan/compile"]
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-lazy/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-ops/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
smartstring.workspace = true

[build-dependencies]
version_check = { workspace = true }

[features]
simd = ["argminmax/nightly_simd"]
nightly = ["polars-utils/nightly"]
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-ops/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-pipe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ polars-utils = { version = "0.31.1", path = "../polars-utils", features = ["sysi
rayon.workspace = true
smartstring = { version = "1" }

[build-dependencies]
version_check = { workspace = true }

[features]
compile = ["crossbeam-channel", "crossbeam-queue"]
csv = ["polars-plan/csv", "polars-io/csv"]
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-pipe/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-plan/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ serde = { version = "1", features = ["derive", "rc"], optional = true }
smartstring.workspace = true
strum_macros.workspace = true

[build-dependencies]
version_check = { workspace = true }

[features]
# debugging utility
debugging = []
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-plan/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
3 changes: 3 additions & 0 deletions crates/polars-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ rayon.workspace = true
smartstring.workspace = true
sysinfo = { version = "0.29", default-features = false, optional = true }

[build-dependencies]
version_check = { workspace = true }

[features]
bigidx = []
nightly = []
7 changes: 7 additions & 0 deletions crates/polars-utils/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let channel = version_check::Channel::read().unwrap();
if channel.is_nightly() {
println!("cargo:rustc-cfg=feature=\"nightly\"");
}
}
2 changes: 1 addition & 1 deletion crates/polars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ ahash = "0.8"
rand = "0.8"

[build-dependencies]
version_check = "0.9.4"
version_check = { workspace = true }

[package.metadata.docs.rs]
# all-features = true
Expand Down
7 changes: 7 additions & 0 deletions py-polars/Cargo.lock

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

0 comments on commit 22a501d

Please sign in to comment.