Skip to content

Commit

Permalink
build: Use PYTHON to determine the correct python executable (pydan…
Browse files Browse the repository at this point in the history
…tic#469)

* build: Use `PYTHON` to determine the correct python executable

* Do not set `PYTHON` in CI
  • Loading branch information
xhochy authored Mar 23, 2023
1 parent ab17232 commit dcf1fdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ jobs:

runs-on: ubuntu-latest

env:
PYTHON: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3

Expand Down
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::env;
use std::path::Path;
use std::process::Command;
use std::str::from_utf8;
Expand All @@ -10,7 +11,7 @@ fn generate_self_schema() {
// skip running generate_self_schema.py
return;
}
let output = Command::new("python3")
let output = Command::new(env::var("PYTHON").unwrap_or_else(|_| "python3".to_owned()))
.arg("generate_self_schema.py")
.output()
.expect("failed to execute process");
Expand Down

0 comments on commit dcf1fdd

Please sign in to comment.