Skip to content

Conversation

@jjhelmus
Copy link
Contributor

@jjhelmus jjhelmus commented Nov 25, 2025

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:

./build-uv.py 

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
@jjhelmus jjhelmus marked this pull request as ready for review November 25, 2025 22:22
@zanieb
Copy link
Member

zanieb commented Nov 26, 2025

I'd probably switch CI to use this as a part of this change, wdyt?

@jjhelmus
Copy link
Contributor Author

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:

  • Add a new workflow for performing builds
  • Switch CI to use this new workflow
  • Remove old workflow

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
@jjhelmus
Copy link
Contributor Author

Note: To upgrade to 3.14 in .python-version the locked packages need to be upgraded which can be done with `uv lock --upgrade. On macOS builds fail as the created bzip2 tarball has symlinks with absolute paths (e.g. deps/bin/bzcmp) which cause failures on extraction when using the 3.14 default 'data' filter.

@jjhelmus jjhelmus added arch:x86_64 platform:linux Specific to the Linux platform python:3.12 labels Nov 26, 2025
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

runtime artifacts potentially vulnerable to a cache poisoning attack
Copy link
Member

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.

Copy link
Member

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.

@zanieb
Copy link
Member

zanieb commented Nov 26, 2025

Can we upgrade to 3.14 separately? That part feels out of scope.

@zanieb
Copy link
Member

zanieb commented Nov 26, 2025

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?

@zanieb
Copy link
Member

zanieb commented Nov 26, 2025

I think we can keep the old workflow around for a bit for other consumers.

@jjhelmus jjhelmus added platform:windows Specific to the Windows platform and removed platform:linux Specific to the Linux platform labels Nov 26, 2025
@jjhelmus
Copy link
Contributor Author

Can we upgrade to 3.14 separately? That part feels out of scope.

Absolutely, the note was mostly for my own benefit if/when the upgrade to 3.14 comes.

@jjhelmus jjhelmus removed platform:windows Specific to the Windows platform python:3.12 arch:x86_64 labels Nov 26, 2025
@jjhelmus
Copy link
Contributor Author

jjhelmus commented Nov 26, 2025

I imagine we'll find problems, e.g., on Windows?

Yes a few. 😄
I ran a smoke test on a local Windows machine but it had Visual Studio 2026 installed and was blocked by #894 for an in-depth test.

@jjhelmus jjhelmus added the platform:windows Specific to the Windows platform label Nov 26, 2025
@jjhelmus jjhelmus added python:3.12 and removed platform:windows Specific to the Windows platform python:3.12 labels Nov 26, 2025
@jjhelmus jjhelmus closed this Nov 26, 2025
@jjhelmus jjhelmus reopened this Nov 26, 2025
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.

3 participants