Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/reusable_maturin_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ on:
{ "os": "macos-latest", "target": "aarch64-apple-darwin" },
{ "os": "macos-15-intel", "target": "x86_64-apple-darwin" }
]
version-script-deps:
required: false
type: string
description: >
Pip packages to install before running the version script.
Space-separated. Skipped if empty.
default: "setuptools_scm"
version-script:
required: false
type: string
description: >
Shell command to inject VCS version before building.
Command to inject VCS version before building.
Must be a simple command (no shell operators like && || ;).
Run in bash. Skipped if empty.
default: "pip install setuptools_scm && python scripts/maturin_build.py --version-only"
default: "python scripts/maturin_build.py --version-only"

jobs:
BuildWheels:
Expand All @@ -51,6 +59,13 @@ jobs:
with:
python-version: "3.12"

- name: Install version script dependencies
if: inputs.version-script-deps != ''
env:
DEPS: ${{ inputs.version-script-deps }}
run: "pip install $DEPS"
shell: bash

- name: Inject version
if: inputs.version-script != ''
env:
Expand Down Expand Up @@ -88,6 +103,13 @@ jobs:
with:
python-version: "3.12"

- name: Install version script dependencies
if: inputs.version-script-deps != ''
env:
DEPS: ${{ inputs.version-script-deps }}
run: "pip install $DEPS"
shell: bash

- name: Inject version
if: inputs.version-script != ''
env:
Expand Down