Browse Source

Fix Python CI on windows

tags/v0.3.1-rc5
haixuanTao 2 years ago
parent
commit
20c02089b6
5 changed files with 23 additions and 5 deletions
  1. +1
    -1
      .github/workflows/ci.yml
  2. +7
    -1
      examples/python-dataflow/run.rs
  3. +7
    -1
      examples/python-operator-dataflow/run.rs
  4. +7
    -1
      examples/python-ros2-dataflow/run.rs
  5. +1
    -1
      libraries/core/src/lib.rs

+ 1
- 1
.github/workflows/ci.yml View File

@@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
RUST_LOG: trace
RUST_LOG: INFO

jobs:
test:


+ 7
- 1
examples/python-dataflow/run.rs View File

@@ -24,7 +24,13 @@ async fn main() -> eyre::Result<()> {
venv.to_str().context("venv path not valid unicode")?,
);
let orig_path = std::env::var("PATH")?;
let venv_bin = venv.join("bin");
// bin folder is named Scripts on windows.
// 🤦‍♂️ See: https://github.com/pypa/virtualenv/commit/993ba1316a83b760370f5a3872b3f5ef4dd904c1
let venv_bin = if cfg!(windows) {
venv.join("Scripts")
} else {
venv.join("bin")
};
std::env::set_var(
"PATH",
format!(


+ 7
- 1
examples/python-operator-dataflow/run.rs View File

@@ -24,7 +24,13 @@ async fn main() -> eyre::Result<()> {
venv.to_str().context("venv path not valid unicode")?,
);
let orig_path = std::env::var("PATH")?;
let venv_bin = venv.join("bin");
// bin folder is named Scripts on windows.
// 🤦‍♂️ See: https://github.com/pypa/virtualenv/commit/993ba1316a83b760370f5a3872b3f5ef4dd904c1
let venv_bin = if cfg!(windows) {
venv.join("Scripts")
} else {
venv.join("bin")
};
std::env::set_var(
"PATH",
format!(


+ 7
- 1
examples/python-ros2-dataflow/run.rs View File

@@ -24,7 +24,13 @@ async fn main() -> eyre::Result<()> {
venv.to_str().context("venv path not valid unicode")?,
);
let orig_path = std::env::var("PATH")?;
let venv_bin = venv.join("bin");
// bin folder is named Scripts on windows.
// 🤦‍♂️ See: https://github.com/pypa/virtualenv/commit/993ba1316a83b760370f5a3872b3f5ef4dd904c1
let venv_bin = if cfg!(windows) {
venv.join("Scripts")
} else {
venv.join("bin")
};
std::env::set_var(
"PATH",
format!(


+ 1
- 1
libraries/core/src/lib.rs View File

@@ -1,4 +1,4 @@
use eyre::{bail, eyre, Context, ContextCompat};
use eyre::{bail, eyre, Context};
use std::{
env::consts::{DLL_PREFIX, DLL_SUFFIX},
ffi::OsStr,


Loading…
Cancel
Save