Skip to content

Commit 0761802

Browse files
Add python_command and source_path functions
1 parent 4a00deb commit 0761802

File tree

1 file changed

+9
-0
lines changed
  • src/tools/run-make-support/src

1 file changed

+9
-0
lines changed

Diff for: src/tools/run-make-support/src/lib.rs

+9
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ pub fn static_lib(name: &str) -> PathBuf {
5454
tmp_dir().join(static_lib_name(name))
5555
}
5656

57+
pub fn python_command() -> Command {
58+
let python_path = std::env::var("PYTHON").expect("PYTHON environment variable does not exist");
59+
Command::new(python_path)
60+
}
61+
62+
pub fn source_path() -> PathBuf {
63+
std::env::var("S").expect("S variable does not exist").into()
64+
}
65+
5766
/// Construct the static library name based on the platform.
5867
pub fn static_lib_name(name: &str) -> String {
5968
// See tools.mk (irrelevant lines omitted):

0 commit comments

Comments
 (0)