Skip to content

Commit

Permalink
chore(rust): Fix make pre-commit command
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jul 31, 2023
1 parent f00b47d commit 5a739ae
Show file tree
Hide file tree
Showing 31 changed files with 157 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ 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-algo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ polars-core = { version = "0.31.1", path = "../polars-core", features = ["dtype-
polars-lazy = { version = "0.31.1", path = "../polars-lazy", features = ["asof_join", "concat_str", "strings"] }
polars-ops = { version = "0.31.1", path = "../polars-ops", features = ["dtype-categorical", "asof_join"], default-features = false }

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

[package.metadata.docs.rs]
all-features = true
# defines the configuration attribute `docsrs`
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-algo/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-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-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ description = "Error definitions for the Polars DataFrame library"
arrow.workspace = true
regex = { version = "1.6", optional = true }
thiserror.workspace = true

[build-dependencies]
version_check = { workspace = true }
7 changes: 7 additions & 0 deletions crates/polars-error/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-io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ url = { version = "2.3.1", optional = true }
[dev-dependencies]
tempdir = "0.3.7"

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

[package.metadata.docs.rs]
all-features = true
# defines the configuration attribute `docsrs`
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-io/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-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ polars-arrow = { version = "0.31.1", path = "../polars-arrow", default-features
polars-error = { version = "0.31.1", path = "../polars-error" }
polars-utils = { version = "0.31.1", path = "../polars-utils" }
simd-json = { version = "0.10", features = ["allow-non-simd", "known-key"] }

[build-dependencies]
version_check = { workspace = true }
7 changes: 7 additions & 0 deletions crates/polars-json/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-row/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ description = "Row encodings for the Polars DataFrame library"
arrow.workspace = true
polars-error = { version = "0.31.1", path = "../polars-error" }
polars-utils = { version = "0.31.1", path = "../polars-utils" }

[build-dependencies]
version_check = { workspace = true }
7 changes: 7 additions & 0 deletions crates/polars-row/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-sql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ serde = "1"
serde_json = { version = "1" }
# sqlparser = { git = "https://github.com/sqlparser-rs/sqlparser-rs.git", rev = "ae3b5844c839072c235965fe0d1bddc473dced87" }
sqlparser = "0.34"

[build-dependencies]
version_check = { workspace = true }
7 changes: 7 additions & 0 deletions crates/polars-sql/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-time/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ regex = "1.7.1"
serde = { version = "1", features = ["derive"], optional = true }
smartstring.workspace = true

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

[features]
dtype-date = ["polars-core/dtype-date", "polars-core/temporal"]
dtype-datetime = ["polars-core/dtype-date", "polars-core/temporal"]
Expand Down
7 changes: 7 additions & 0 deletions crates/polars-time/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
14 changes: 14 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 5a739ae

Please sign in to comment.