-
-
Notifications
You must be signed in to change notification settings - Fork 243
use uv to bootstrap the host system Python environment #892
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
base: main
Are you sure you want to change the base?
Conversation
Add a new build script which uses uv to bootstrap the Python
environment on the host and run the build.
To use this new script on a host with uv installed use:
uv run ./build-uv.py
|
I'd probably switch CI to use this as a part of this change, wdyt? |
That was the next step I had planned. I see the path being:
These could be done in a single PR or split into separate. I don't have a strong opinion on either. |
Import dependencies using pinning used by existing pip workflow
uv add -r requirements.in -c requirements.txt
|
Note: To upgrade to 3.14 in |
| with: | ||
| python-version: "3.11" | ||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0 |
Check failure
Code scanning / zizmor
runtime artifacts potentially vulnerable to a cache poisoning attack Error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @woodruffw
I imagine we can turn the cache off here? I'm not even sure it's on by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you can turn the cache off there -- I think it's enable-cache: false.
Based on setup-uv's README it's enabled by default for non-self-hosted runners.
|
Can we upgrade to 3.14 separately? That part feels out of scope. |
|
I don't mind if you switch CI separately, but doing it here seems like a great way to demonstrate that it's working on all platforms. I imagine we'll find problems, e.g., on Windows? |
|
I think we can keep the old workflow around for a bit for other consumers. |
Absolutely, the note was mostly for my own benefit if/when the upgrade to 3.14 comes. |
Yes a few. 😄 |
Upgraded to latest dependencies using: uv lock --upgrade
Add a new build script which uses uv to bootstrap the Python environment on the host and runs the build.
To use this new script on a host with uv installed use: