Skip to content

Commit 6f54f7f

Browse files
committed
ci: Update python and venv
1 parent f8d95cc commit 6f54f7f

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

.github/workflows/buildtest.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,25 @@ jobs:
4949
run: |
5050
brew upgrade
5151
brew install lua
52+
- name: Setup Python
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version-file: '.python-version'
56+
- name: Setup venv
57+
run: |
58+
python3 -m venv .venv
59+
source .venv/bin/activate
60+
echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> $GITHUB_ENV
61+
echo "${VIRTUAL_ENV}/bin" >> $GITHUB_PATH
62+
echo "${VIRTUAL_ENV}/lib" >> $GITHUB_PATH
63+
echo "${VIRTUAL_ENV}/lib64" >> $GITHUB_PATH
64+
echo "LD_LIBRARY_PATH=${VIRTUAL_ENV}/lib:${VIRTUAL_ENV}/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
65+
echo "PYTHON_PATH=${VIRTUAL_ENV}/bin" >> "$GITHUB_OUTPUT"
66+
echo "RETICULATE_PYTHON=${VIRTUAL_ENV}/bin/python3" >> "$GITHUB_OUTPUT"
67+
echo "PYTHON_VERSION=$(python --version)" >> "$GITHUB_OUTPUT"
5268
- name: Setup pip
5369
run: |
54-
if [ "${{ matrix.os }}" = "macos-latest" ]; then
55-
sudo pip3 install -U pip --break-system-packages
56-
else
57-
sudo pip3 install -U pip
58-
fi
70+
pip3 install -U pip
5971
- name: Get pip cache
6072
id: pip-cache
6173
run: |
@@ -69,11 +81,7 @@ jobs:
6981
${{ runner.os }}-pip-
7082
- name: Setup cached item
7183
run: |
72-
if [ "${{ matrix.os }}" = "macos-latest" ]; then
73-
pip3 install --user -r requirements.txt --break-system-packages
74-
else
75-
pip3 install --user -r requirements.txt
76-
fi
84+
pip3 install -r requirements.txt
7785
- name: Setup Vim
7886
id: 'vim'
7987
uses: thinca/action-setup-vim@v2

.python-version

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
3.13.0
2+

0 commit comments

Comments
 (0)