Skip to content

Commit

Permalink
Need to save version before modification of TOML file
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlancaster authored Nov 16, 2024
1 parent 98ad2ff commit 11f2243
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Query version with setuptools_scm
id: version
run: |
python -m pip install setuptools_scm
VERSION=$(python -c "import setuptools_scm; print(setuptools_scm.get_version())")
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Install toml and remove cffconvert from pyproject.toml
run: |
python -m pip install toml
Expand Down Expand Up @@ -207,7 +213,7 @@ jobs:
env:
# FIXME: only run the slow tests when doing regular pushes, or manual - not for PRs
CIBW_TEST_COMMAND: "pytest -v {package}/tests ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && '--runslow' || '' }}"
CIBW_ENVIRONMENT: SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.ref_name }}
CIBW_ENVIRONMENT: SETUPTOOLS_SCM_PRETEND_VERSION=${{ env.VERSION }}
with:
only: ${{ matrix.only }}
package-dir: .
Expand Down

0 comments on commit 11f2243

Please sign in to comment.