Skip to content

action: use a venv to prevent PEP 668 errors - #145

Merged
jku merged 4 commits into
mainfrom
ww/pep-668
Jul 4, 2024
Merged

action: use a venv to prevent PEP 668 errors#145
jku merged 4 commits into
mainfrom
ww/pep-668

Conversation

@woodruffw

@woodruffw woodruffw commented Jul 3, 2024

Copy link
Copy Markdown
Member

WIP.

Closes #144.

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw woodruffw self-assigned this Jul 3, 2024
woodruffw added 2 commits July 3, 2024 09:11
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw
woodruffw marked this pull request as ready for review July 3, 2024 13:21
@woodruffw

Copy link
Copy Markdown
Member Author

This is good to go. To summarize:

We now isolate this action's Python dependencies inside of a virtual environment, rather than using either the distribution or configured Python's user packages site. This makes us both compatible with PEP 668 (the source of the error) and avoids the (slim) likelihood of conflict with other steps running in the same job.

(Plumbing everything through this new venv is a minor adventure, since Windows and *nix venvs have slightly different directory layouts. But the selftests confirm that the specialization for both works.)

This has been true for a while.

Signed-off-by: William Woodruff <william@trailofbits.com>

@jku jku left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, This looks surprisingly complicated to deal with. I don't have a better suggestion so let's go with that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Action fails on ubuntu-24.04 with "This environment is externally managed"

2 participants