@@ -112,8 +112,17 @@ test_source_distribution() {
112112
113113 curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
114114
115- export PATH=$RUSTUP_HOME /bin:$PATH
116- source $RUSTUP_HOME /env
115+ # On Unix, rustup creates an env file. On Windows GitHub runners (MSYS bash),
116+ # that file may not exist, so fall back to adding Cargo bin directly.
117+ if [ -f " $CARGO_HOME /env" ]; then
118+ # shellcheck disable=SC1090
119+ source " $CARGO_HOME /env"
120+ elif [ -f " $RUSTUP_HOME /env" ]; then
121+ # shellcheck disable=SC1090
122+ source " $RUSTUP_HOME /env"
123+ else
124+ export PATH=" $CARGO_HOME /bin:$PATH "
125+ fi
117126
118127 # build and test rust
119128
@@ -126,10 +135,20 @@ test_source_distribution() {
126135 git clone https://github.com/apache/parquet-testing.git parquet-testing
127136
128137 python3 -m venv .venv
129- source .venv/bin/activate
130- python3 -m pip install -U pip
131- python3 -m pip install -U maturin
132- maturin develop
138+ if [ -x " .venv/bin/python" ]; then
139+ VENV_PYTHON=" .venv/bin/python"
140+ elif [ -x " .venv/Scripts/python.exe" ]; then
141+ VENV_PYTHON=" .venv/Scripts/python.exe"
142+ elif [ -x " .venv/Scripts/python" ]; then
143+ VENV_PYTHON=" .venv/Scripts/python"
144+ else
145+ echo " Unable to find python executable in virtual environment"
146+ exit 1
147+ fi
148+
149+ " $VENV_PYTHON " -m pip install -U pip
150+ " $VENV_PYTHON " -m pip install -U maturin
151+ " $VENV_PYTHON " -m maturin develop
133152
134153 # TODO: we should really run tests here as well
135154 # python3 -m pytest
0 commit comments