Skip to content

Commit

Permalink
Revert skip-build-config feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashley Anderson committed Dec 3, 2021
1 parent c0f5ce5 commit 2986aca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ pyo3-build-config = { path = "pyo3-build-config", version = "0.15.1", features =

[features]
default = ["macros"]
skip-build-config = []

# Enables macros: #[pyclass], #[pymodule], #[pyfunction] etc.
macros = ["pyo3-macros", "indoc", "paste", "unindent"]
Expand Down
8 changes: 3 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,8 @@ fn print_config_and_exit(config: &InterpreterConfig) {
}

fn main() {
if cfg!(not(feature="skip-build-config")) {
if let Err(e) = configure_pyo3() {
eprintln!("error: {}", e.report());
std::process::exit(1)
}
if let Err(e) = configure_pyo3() {
eprintln!("error: {}", e.report());
std::process::exit(1)
}
}
4 changes: 1 addition & 3 deletions pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ pub fn cargo_env_var(var: &str) -> Option<String> {
/// Gets an external environment variable, and registers the build script to rerun if
/// the variable changes.
pub fn env_var(var: &str) -> Option<OsString> {
if cfg!(feature = "resolve-config") {
println!("cargo:rerun-if-env-changed={}", var);
}
println!("cargo:rerun-if-env-changed={}", var);
env::var_os(var)
}

Expand Down

0 comments on commit 2986aca

Please sign in to comment.