Skip to content

Allow installation of extras in GitHub action - #2630

Merged
joerick merged 1 commit into
pypa:mainfrom
ofek:patch-1
Oct 26, 2025
Merged

joerick merged 1 commit into
pypa:mainfrom
ofek:patch-1

Conversation

@ofek

@ofek ofek commented Oct 19, 2025

Copy link
Copy Markdown
Contributor

When setting the build-frontend to build[uv] one must manually make UV globally available on Windows and macOS. This leads to conditional execution as seen in this snippet of real CI configuration:

    - name: Download source distribution
      uses: actions/download-artifact@v4
      with:
        name: artifact-sdist
        path: dist

    - name: Install UV
      if: runner.os != 'Linux'
      uses: astral-sh/setup-uv@v6

    - name: Build wheels
      uses: pypa/cibuildwheel@v3.2.1
      with:
        package-dir: dist/${{ needs.sdist.outputs.sdist-name }}

Such an option would allow for removing the middle step:

    - name: Download source distribution
      uses: actions/download-artifact@v4
      with:
        name: artifact-sdist
        path: dist

    - name: Build wheels
      uses: pypa/cibuildwheel
      with:
        extras: uv
        package-dir: dist/${{ needs.sdist.outputs.sdist-name }}

Here's a PR to showcase this change being successfully used.

@joerick joerick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks! just wondering if we can simplify a little.

Comment thread action.yml
@joerick

joerick commented Oct 26, 2025

Copy link
Copy Markdown
Contributor

thank you for putting this together @ofek ! A nice improvement for sure.

@joerick
joerick merged commit a3af13a into pypa:main Oct 26, 2025
34 of 35 checks passed
@ofek
ofek deleted the patch-1 branch October 26, 2025 13:30
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.

2 participants