Skip to content

Commit 15e2e95

Browse files
committed
Set PYTHONHOME for tests
1 parent 096f50a commit 15e2e95

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,17 @@ jobs:
5454
run: |
5555
pip install -v .
5656
57-
- name: Set Python DLL path (non Windows)
57+
- name: Set Python DLL path and PYTHONHOME (non Windows)
5858
if: ${{ matrix.os != 'windows' }}
5959
run: |
6060
echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
61+
echo PYTHONHOME=$(python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
6162
62-
- name: Set Python DLL path (Windows)
63+
- name: Set Python DLL path and PYTHONHOME (Windows)
6364
if: ${{ matrix.os == 'windows' }}
6465
run: |
6566
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(python -m find_libpython)"
67+
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONHOME=$(python -c 'import sys; print(sys.prefix)')"
6668
6769
- name: Embedding tests
6870
run: dotnet test --runtime any-${{ matrix.platform }} --logger "console;verbosity=detailed" src/embed_tests/

0 commit comments

Comments
 (0)