build.rs

changeset 3
c3a4f4bb87f7
parent 1
a4137aedcb3a
--- a/build.rs	Thu Feb 26 09:32:12 2026 -0500
+++ b/build.rs	Wed Apr 22 22:32:00 2026 -0500
@@ -2,6 +2,8 @@
 Build script for `pointsource_pde`
 */
 
+#![feature(path_is_empty)]
+
 //use pyo3::{prepare_freethreaded_python, types::PyModule, PyErr, Python};
 use conda_build::python_config;
 use std::env::split_paths;
@@ -38,7 +40,7 @@
     //     Ok::<_, PyErr>(())
     // })?;
 
-    let (pyc_e, py_is_conda) = python_config();
+    let (pyc_e, _prefix_override, _py_type) = python_config();
     let py_path = pyc_e.and_then(|pyc| pyc.exec_prefix_path())?;
     let py_exec = py_path.join("bin").join("python3");
     let import_check_code = REQUIRED_PYTHON_MODULES
@@ -49,9 +51,8 @@
         .status()?;
     if !res.success() {
         return Err(std::io::Error::other(format!(
-            "Failed to load required Python modules (python execuitable {}{})",
+            "Failed to load required Python modules (python execuitable {})",
             py_exec.display(),
-            if py_is_conda { " from Conda" } else { "" }
         )));
     }
 
@@ -130,7 +131,9 @@
 fn add_dep_ldflags(dep: &str) {
     if let Some(ldflags) = std::env::var_os(&dep) {
         for lp in split_paths(&ldflags) {
-            println!("cargo:rustc-link-arg=-Wl,{}", lp.display());
+            if !lp.is_empty() {
+                println!("cargo:rustc-link-arg=-Wl,{}", lp.display());
+            }
         }
     } else {
         panic!("{dep} unset.");

mercurial