Skip to content

Commit 7128288

Browse files
authored
Don't crash if user has set UV_SYSTEM_PYTHON to true (#116)
* Don't crash if user has set UV_SYSTEM_PYTHON to true * Try to set env within * wtf * Try passing argument!? * Use unset instead * Remove extra empty line
1 parent 0397879 commit 7128288

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
env:
1111
FORCE_COLOR: "1" # Make tools pretty.
1212
SETUPTOOLS_SCM_PRETEND_VERSION: "1.0" # avoid warnings about shallow checkout
13+
UV_SYSTEM_PYTHON: "true" # ensure action can deal with this set
1314

1415
jobs:
1516
check-argon2-cffi-bindings:

action.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ outputs:
4040

4141
runs:
4242
using: composite
43+
4344
steps:
4445
- uses: actions/setup-python@v5
4546
id: python-baipp
@@ -65,16 +66,20 @@ runs:
6566
key: baipp-${{ env.REQS_HASH }}
6667

6768
- name: Create venv for tools
68-
run: >
69-
uv venv
70-
/tmp/baipp
71-
--python ${{ steps.python-baipp.outputs.python-path }}
69+
run: |
70+
unset UV_SYSTEM_PYTHON
71+
72+
uv venv \
73+
/tmp/baipp \
74+
--python ${{ steps.python-baipp.outputs.python-path }}
7275
shell: bash
7376

7477
- name: Install our tools
75-
run: >
76-
uv pip sync
77-
${{ github.action_path }}/requirements/tools.txt
78+
run: |
79+
unset UV_SYSTEM_PYTHON
80+
81+
uv pip sync \
82+
${{ github.action_path }}/requirements/tools.txt
7883
shell: bash
7984
env:
8085
VIRTUAL_ENV: /tmp/baipp
@@ -84,6 +89,8 @@ runs:
8489
# reproducibility.
8590
- name: Build package
8691
run: |
92+
unset UV_SYSTEM_PYTHON
93+
8794
echo Setting SOURCE_DATE_EPOCH to $(git log -1 --pretty=%ci).
8895
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
8996

0 commit comments

Comments
 (0)