Skip to content

Commit 2c7d657

Browse files
committed
try fix env for stubgen
1 parent f3baf59 commit 2c7d657

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,26 @@ jobs:
7373
ccache -s
7474
fi
7575
76+
77+
- name: Set env vars for stubfiles
78+
shell: bash
79+
run: |
80+
#Setup env
81+
echo "PYTHONPATH=$WORKSPACE_INSTALL_PATH/lib/python3/site-packages" | tee -a $GITHUB_ENV
82+
83+
7684
- name: Generate stubfiles
7785
shell: bash
7886
run: |
7987
8088
#Install stubgen
8189
${{ steps.sofa.outputs.python_exe }} -m pip install mypy
8290
83-
#Setup env
84-
OLD_PYTHONPATH=$PYTHONPATH
85-
echo "PYTHONPATH=$WORKSPACE_INSTALL_PATH/lib/python3/site-packages" | tee -a $GITHUB_ENV
86-
87-
8891
#For now use pybind11. This might be parametrized as an input of this action
8992
${{ steps.sofa.outputs.python_exe }} ${{ env.WORKSPACE_SRC_PATH }}/scripts/generate_stubs.py -d $WORKSPACE_INSTALL_PATH/lib/python3/site-packages -m Sofa --use_pybind11
9093
9194
#Go back to previous env
92-
echo "PYTHONPATH=$OLD_PYTHONPATH" | tee -a $GITHUB_ENV
95+
echo "PYTHONPATH=" | tee -a $GITHUB_ENV
9396
9497
9598

0 commit comments

Comments
 (0)