Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't crash if user has set UV_SYSTEM_PYTHON to true #116

Merged
merged 6 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
env:
FORCE_COLOR: "1" # Make tools pretty.
SETUPTOOLS_SCM_PRETEND_VERSION: "1.0" # avoid warnings about shallow checkout
UV_SYSTEM_PYTHON: "true" # ensure action can deal with this set

jobs:
check-argon2-cffi-bindings:
Expand Down
21 changes: 14 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ outputs:

runs:
using: composite

steps:
- uses: actions/setup-python@v5
id: python-baipp
Expand All @@ -65,16 +66,20 @@ runs:
key: baipp-${{ env.REQS_HASH }}

- name: Create venv for tools
run: >
uv venv
/tmp/baipp
--python ${{ steps.python-baipp.outputs.python-path }}
run: |
unset UV_SYSTEM_PYTHON

uv venv \
/tmp/baipp \
--python ${{ steps.python-baipp.outputs.python-path }}
shell: bash

- name: Install our tools
run: >
uv pip sync
${{ github.action_path }}/requirements/tools.txt
run: |
unset UV_SYSTEM_PYTHON

uv pip sync \
${{ github.action_path }}/requirements/tools.txt
shell: bash
env:
VIRTUAL_ENV: /tmp/baipp
Expand All @@ -84,6 +89,8 @@ runs:
# reproducibility.
- name: Build package
run: |
unset UV_SYSTEM_PYTHON

echo Setting SOURCE_DATE_EPOCH to $(git log -1 --pretty=%ci).
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)

Expand Down